diff --git a/.codecov.yml b/.codecov.yml index fead3ad004f72c..0a5b8d6c8fa7de 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/devcontainer.json b/.devcontainer/ubuntu20.04/devcontainer.json similarity index 84% rename from .devcontainer/devcontainer.json rename to .devcontainer/ubuntu20.04/devcontainer.json index ec4c2690b70e72..325e6e57fdc109 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/ubuntu20.04/devcontainer.json @@ -1,4 +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 00000000000000..c4b5d24302bff2 --- /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 a5b42ffcf76b85..136f798711c372 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/workflows/audit.yaml b/.github/workflows/audit.yaml index f0e9789cae6de4..54760393578f92 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -28,8 +28,8 @@ jobs: run: shell: ${{ matrix.system.shell }} steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: python-version: ${{inputs.python_version}} - name: Install Python packages @@ -40,30 +40,35 @@ jobs: run: | python -m pip install --upgrade pywin32 - name: Package audits (with coverage) + 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 configs coverage run $(which spack) -d audit externals coverage combine - coverage xml - name: Package audits (without coverage) if: ${{ inputs.with_coverage == 'false' && runner.os != 'Windows' }} run: | - . share/spack/setup-env.sh + . 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 + . share/spack/setup-env.sh 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: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be - if: ${{ inputs.with_coverage == 'true' }} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 + if: ${{ inputs.with_coverage == 'true' && runner.os != 'Windows' }} with: - flags: unittests,audits - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true + 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 similarity index 75% rename from .github/workflows/bootstrap-test.sh rename to .github/workflows/bin/bootstrap-test.sh index 563eb286433c4f..0d774c248c3a6a 100755 --- a/.github/workflows/bootstrap-test.sh +++ b/.github/workflows/bin/bootstrap-test.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e source share/spack/setup-env.sh -$PYTHON bin/spack bootstrap disable github-actions-v0.4 +$PYTHON bin/spack bootstrap disable github-actions-v0.5 $PYTHON bin/spack bootstrap disable spack-install $PYTHON bin/spack $SPACK_FLAGS solve zlib tree $BOOTSTRAP/store diff --git a/.github/workflows/execute_installer.ps1 b/.github/workflows/bin/execute_installer.ps1 similarity index 100% rename from .github/workflows/execute_installer.ps1 rename to .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 similarity index 100% rename from .github/workflows/generate_spack_yaml_containerize.sh rename to .github/workflows/bin/generate_spack_yaml_containerize.sh diff --git a/.github/workflows/setup_git.ps1 b/.github/workflows/bin/setup_git.ps1 similarity index 100% rename from .github/workflows/setup_git.ps1 rename to .github/workflows/bin/setup_git.ps1 diff --git a/.github/workflows/setup_git.sh b/.github/workflows/bin/setup_git.sh similarity index 100% rename from .github/workflows/setup_git.sh rename to .github/workflows/bin/setup_git.sh diff --git a/.github/workflows/system_shortcut_check.ps1 b/.github/workflows/bin/system_shortcut_check.ps1 similarity index 100% rename from .github/workflows/system_shortcut_check.ps1 rename to .github/workflows/bin/system_shortcut_check.ps1 diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index d86f826f7c0e14..90b31a098ae90d 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -37,14 +37,14 @@ jobs: make patch unzip which xz python3 python3-devel tree \ cmake bison - name: Checkout - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - 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 -d solve zlib tree ~/.spack/bootstrap/store/ @@ -60,20 +60,20 @@ jobs: run: | brew install cmake bison tree - name: Checkout - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: 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 --not-buildable cmake bison spack -d solve zlib - tree ~/.spack/bootstrap/store/ + tree $HOME/.spack/bootstrap/store/ gnupg-sources: runs-on: ${{ matrix.runner }} @@ -83,24 +83,22 @@ jobs: steps: - name: Setup macOS if: ${{ matrix.runner != 'ubuntu-latest' }} + run: brew install tree gawk + - name: Remove system executables run: | - brew install tree - # Remove GnuPG since we want to bootstrap it - sudo rm -rf /usr/local/bin/gpg - - name: Setup Ubuntu - if: ${{ matrix.runner == 'ubuntu-latest' }} - run: | - sudo rm -rf $(which gpg) $(which gpg2) $(which patchelf) + while [ -n "$(command -v gpg gpg2 patchelf)" ]; do + sudo rm $(command -v gpg gpg2 patchelf) + done - name: Checkout - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - name: Bootstrap GnuPG run: | source share/spack/setup-env.sh 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 -d gpg list tree ~/.spack/bootstrap/store/ @@ -112,19 +110,17 @@ jobs: steps: - name: Setup macOS if: ${{ matrix.runner != 'ubuntu-latest' }} + run: brew install tree + - name: Remove system executables run: | - brew install tree - # Remove GnuPG since we want to bootstrap it - sudo rm -rf /usr/local/bin/gpg - - name: Setup Ubuntu - if: ${{ matrix.runner == 'ubuntu-latest' }} - run: | - sudo rm -rf $(which gpg) $(which gpg2) $(which patchelf) + while [ -n "$(command -v gpg gpg2 patchelf)" ]; do + sudo rm $(command -v gpg gpg2 patchelf) + done - name: Checkout - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: python-version: | 3.8 @@ -132,15 +128,16 @@ jobs: 3.10 3.11 3.12 + 3.13 - name: Set bootstrap sources run: | source share/spack/setup-env.sh - spack bootstrap disable github-actions-v0.4 + spack bootstrap disable github-actions-v0.5 spack bootstrap disable spack-install - name: Bootstrap clingo run: | set -e - for ver in '3.8' '3.9' '3.10' '3.11' '3.12' ; do + 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)" if [[ -d "$ver_dir" ]] ; then @@ -150,7 +147,7 @@ jobs: 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 @@ -163,5 +160,45 @@ jobs: run: | source share/spack/setup-env.sh 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/ + windows: + runs-on: "windows-latest" + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b + with: + python-version: "3.12" + - name: Setup Windows + run: | + Remove-Item -Path (Get-Command gpg).Path + Remove-Item -Path (Get-Command file).Path + - name: Bootstrap clingo + run: | + ./share/spack/setup-env.ps1 + spack bootstrap disable github-actions-v0.6 + spack bootstrap disable github-actions-v0.5 + 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: | + ./share/spack/setup-env.ps1 + spack -d gpg list + ./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 aa50358768bfa5..9151898b86741f 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -40,8 +40,7 @@ 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'], @@ -56,7 +55,7 @@ jobs: if: github.repository == 'spack/spack' steps: - name: Checkout - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 id: docker_meta @@ -77,7 +76,7 @@ jobs: 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 @@ -88,19 +87,19 @@ jobs: fi - name: Upload Dockerfile - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: 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@d70bba72b1f3fd22344832f00baa16ece964efeb + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 - name: Log in to GitHub Container Registry - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 with: registry: ghcr.io username: ${{ github.actor }} @@ -108,13 +107,13 @@ jobs: - name: Log in to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 + 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@2cdde995de11925a030ce8070c3d77a52ffcf1c0 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 with: context: dockerfiles/${{ matrix.dockerfile[0] }} platforms: ${{ matrix.dockerfile[1] }} @@ -127,7 +126,7 @@ jobs: needs: deploy-images steps: - name: Merge Artifacts - uses: actions/upload-artifact/merge@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: name: dockerfiles pattern: dockerfiles_* diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bb33d718662d35..2024014f1bb58d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,18 +15,6 @@ concurrency: cancel-in-progress: true jobs: - prechecks: - needs: [ changes ] - uses: ./.github/workflows/valid-style.yml - secrets: inherit - 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 @@ -36,7 +24,7 @@ jobs: core: ${{ steps.filter.outputs.core }} packages: ${{ steps.filter.outputs.packages }} steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 if: ${{ github.event_name == 'push' }} with: fetch-depth: 0 @@ -53,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' @@ -72,18 +67,34 @@ jobs: 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 secrets: inherit - windows: - if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }} + + 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 + runs-on: ubuntu-latest + steps: + - name: Success + run: "true" + + coverage: + needs: [ unit-tests, prechecks ] + uses: ./.github/workflows/coverage.yml secrets: inherit + all: - needs: [ windows, unit-tests, bootstrap ] + needs: [ coverage, bootstrap ] runs-on: ubuntu-latest steps: - name: Success diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000000000..c9f1a2e004a62c --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,34 @@ +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@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 + with: + verbose: true diff --git a/.github/workflows/install_spack.sh b/.github/workflows/install_spack.sh deleted file mode 100755 index be8ec8af21d301..00000000000000 --- 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 3ca13964755854..11f19c9244c288 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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d + - 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 00000000000000..1bf0f9a76bf272 --- /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 00000000000000..be2bfefc80bb11 --- /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.20241009 +vermin==1.6.0 diff --git a/.github/workflows/style/requirements.txt b/.github/workflows/style/requirements.txt deleted file mode 100644 index a6602ddcfd0eab..00000000000000 --- a/.github/workflows/style/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -black==24.4.2 -clingo==5.7.1 -flake8==7.0.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 1ac376611c22e2..9d9940843bbf7f 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -28,45 +28,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.10' - 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.11' + - 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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: python-version: ${{ matrix.python-version }} - name: Install System packages @@ -88,7 +77,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: @@ -101,27 +90,27 @@ jobs: - name: Run unit tests env: SPACK_PYTHON: python - SPACK_TEST_SOLVER: ${{ matrix.concretizer }} SPACK_TEST_PARALLEL: 2 COVERAGE: true - UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.10' }} + 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@5ecb98a3c6b747ed38dc09f787459979aebb39be + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: - flags: unittests,linux,${{ matrix.concretizer }} - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true + 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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: - python-version: '3.10' + python-version: '3.11' - name: Install System packages run: | sudo apt-get -y update @@ -134,7 +123,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: remove-extension run: | source share/spack/setup-env.sh @@ -144,11 +133,11 @@ jobs: COVERAGE: true run: | share/spack/qa/run-shell-tests - - uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: - flags: shelltests,linux - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true + 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 @@ -161,13 +150,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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - 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: remove-extension @@ -185,25 +174,20 @@ jobs: clingo-cffi: runs-on: ubuntu-latest steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: - python-version: '3.10' + 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: remove-extension run: | source share/spack/setup-env.sh @@ -211,14 +195,20 @@ jobs: - 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@5ecb98a3c6b747ed38dc09f787459979aebb39be + . 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/concretize.py + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: - flags: unittests,linux,clingo - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true + name: coverage-clingo-cffi + path: coverage + include-hidden-files: true # Run unit tests on MacOS macos: runs-on: ${{ matrix.os }} @@ -227,10 +217,10 @@ jobs: os: [macos-13, macos-14] python-version: ["3.11"] steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: python-version: ${{ matrix.python-version }} - name: Install Python packages @@ -239,25 +229,64 @@ 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: remove-extension run: | source share/spack/setup-env.sh spack config --scope=defaults rm "config:extensions" - 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@5ecb98a3c6b747ed38dc09f787459979aebb39be + - 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: + # DH* + # Can't run this on other repos than spack/spack + if: github.repository == 'spack/spack' + # *DH + 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: remove-extension + run: | + source share/spack/setup-env.sh + spack config --scope=defaults rm "config:extensions" + - 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 - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true + name: coverage-windows + path: coverage + include-hidden-files: true diff --git a/.github/workflows/valid-style.yml b/.github/workflows/valid-style.yml index fa7ab86afa2b2a..ad96ff2cc5604c 100644 --- a/.github/workflows/valid-style.yml +++ b/.github/workflows/valid-style.yml @@ -1,20 +1,11 @@ name: style on: - push: - branches: - - develop - - releases/** - - spack-stack-dev - - release/** - pull_request: - branches: - - develop - - releases/** - - spack-stack-dev - - release/** - workflow_dispatch: workflow_call: + inputs: + with_coverage: + required: true + type: string concurrency: group: style-${{github.ref}}-${{github.event.pull_request.number || github.run_number}} @@ -27,15 +18,15 @@ jobs: validate: runs-on: ubuntu-latest steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d + - 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) @@ -44,22 +35,22 @@ jobs: style: runs-on: ubuntu-latest steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d + - 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 @@ -79,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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - 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 @@ -94,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 bf4f172de8241e..00000000000000 --- a/.github/workflows/windows_python.yml +++ /dev/null @@ -1,83 +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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - with: - fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d - 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@5ecb98a3c6b747ed38dc09f787459979aebb39be - with: - flags: unittests,windows - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - unit-tests-cmd: - runs-on: windows-latest - steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - with: - fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d - 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@5ecb98a3c6b747ed38dc09f787459979aebb39be - with: - flags: unittests,windows - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - build-abseil: - runs-on: windows-latest - steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - with: - fetch-depth: 0 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d - 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 ff477536131e6b..012a6e6e0ae1d6 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 9ec04198b22912..1d17e49d59656e 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 `: 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 2986ff32ad36b0..af2ee583de74e7 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 ---------------- diff --git a/bin/spack-python b/bin/spack-python index ff555aa93b2d34..b8e76f826b7683 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 832801359967b3..a5a5384e9f13c7 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 5a82b0b620cfee..1ceeb0a250e6fe 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 392e42d29b63db..da7b67e3bc5ae6 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 6f2dbe171c5f60..b2e2c0f37385ed 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 5bbf580bcf826a..fef46967a84a58 100644 --- a/etc/spack/defaults/concretizer.yaml +++ b/etc/spack/defaults/concretizer.yaml @@ -42,8 +42,8 @@ concretizer: # "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 compatiblity 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 + # 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: {} diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml index 532e3db270cf86..b9c4aee64eee3c 100644 --- a/etc/spack/defaults/config.yaml +++ b/etc/spack/defaults/config.yaml @@ -115,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 @@ -170,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 a80f87b16ab400..00000000000000 --- 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/cray/packages.yaml b/etc/spack/defaults/cray/packages.yaml deleted file mode 100644 index 6b2c5f2c56a9a1..00000000000000 --- a/etc/spack/defaults/cray/packages.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------------- -# This file controls default concretization preferences for Spack. -# -# 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/packages.yaml -# -# Per-user settings (overrides default and site settings): -# ~/.spack/packages.yaml -# ------------------------------------------------------------------------- -packages: - all: - providers: - iconv: [glibc, musl, libiconv] diff --git a/etc/spack/defaults/linux/packages.yaml b/etc/spack/defaults/linux/packages.yaml deleted file mode 100644 index 6b2c5f2c56a9a1..00000000000000 --- a/etc/spack/defaults/linux/packages.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------------- -# This file controls default concretization preferences for Spack. -# -# 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/packages.yaml -# -# Per-user settings (overrides default and site settings): -# ~/.spack/packages.yaml -# ------------------------------------------------------------------------- -packages: - all: - providers: - iconv: [glibc, musl, libiconv] diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index d637f3c93e174b..b9fdd4b3dbaf86 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -20,11 +20,14 @@ packages: 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] @@ -37,11 +40,10 @@ packages: jpeg: [libjpeg-turbo, libjpeg] lapack: [openblas, amdlibflame] libc: [glibc, musl] - libgfortran: [ gcc-runtime ] - libglx: [mesa+glx, mesa18+glx] - libifcore: [ intel-oneapi-runtime ] + 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] @@ -62,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] @@ -69,3 +72,13 @@ packages: permissions: read: world write: user + cray-mpich: + buildable: false + cray-mvapich2: + 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 53116391ccef6c..eaa336dca2b45f 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/basic_usage.rst b/lib/spack/docs/basic_usage.rst index e49ca3073ef978..171a82b6ea1e37 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -1175,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 `_ and `equals `_ + Below are more details about the specifiers that you can add to specs. .. _version-specifier: @@ -1433,22 +1444,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: diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst index d545c70d18dcb3..97c81bf17a40ea 100644 --- a/lib/spack/docs/build_settings.rst +++ b/lib/spack/docs/build_settings.rst @@ -166,3 +166,74 @@ 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. diff --git a/lib/spack/docs/build_systems/autotoolspackage.rst b/lib/spack/docs/build_systems/autotoolspackage.rst index c0adcda178bb42..392feb3ed48c8a 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 `, 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/custompackage.rst b/lib/spack/docs/build_systems/custompackage.rst index 35475fc8ecb2f6..cf5862d6a0db95 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 feae03a280d24d..ea1882eaf7052c 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 ``_ for the full +packages. Search for ``oneAPI`` at `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/sconspackage.rst b/lib/spack/docs/build_systems/sconspackage.rst index 8200d0998d73eb..5e4b888c1c239c 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 e4a275df662f47..46300e6681a1fd 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 `. 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 e0542640a2dec5..4873e3e104d6b3 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -206,6 +206,7 @@ def setup(sphinx): ("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"), @@ -217,6 +218,10 @@ def setup(sphinx): ("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"), + # 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/configuration.rst b/lib/spack/docs/configuration.rst index 1d216b692528c6..b416c9149907d2 100644 --- a/lib/spack/docs/configuration.rst +++ b/lib/spack/docs/configuration.rst @@ -281,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). @@ -511,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 2f7b1ae9af4f2b..38a384754902f4 100644 --- a/lib/spack/docs/containers.rst +++ b/lib/spack/docs/containers.rst @@ -203,12 +203,9 @@ The OS that are currently supported are summarized in the table below: * - Ubuntu 24.04 - ``ubuntu:24.04`` - ``spack/ubuntu-noble`` - * - CentOS 7 - - ``centos:7`` - - ``spack/centos7`` - * - CentOS Stream - - ``quay.io/centos/centos:stream`` - - ``spack/centos-stream`` + * - CentOS Stream9 + - ``quay.io/centos/centos:stream9`` + - ``spack/centos-stream9`` * - openSUSE Leap - ``opensuse/leap`` - ``spack/leap15`` diff --git a/lib/spack/docs/contribution_guide.rst b/lib/spack/docs/contribution_guide.rst index 68a381be9f7f80..110bea56daf2d6 100644 --- a/lib/spack/docs/contribution_guide.rst +++ b/lib/spack/docs/contribution_guide.rst @@ -184,7 +184,7 @@ Style Tests Spack uses `Flake8 `_ to test for `PEP 8 `_ conformance and -`mypy ` for type checking. PEP 8 is +`mypy `_ 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//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 `_. 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 `_ + +Registration Token +~~~~~~~~~~~~~~~~~~ + +The first step to contribute new runners is to open an issue in the `spack infrastructure `_ +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 91550f795fd86c..21204ba0778ed0 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 @@ -716,27 +708,27 @@ Release branches ^^^^^^^^^^^^^^^^ There are currently two types of Spack releases: :ref:`major releases -` (``0.17.0``, ``0.18.0``, etc.) and :ref:`point releases -` (``0.17.1``, ``0.17.2``, ``0.17.3``, etc.). Here is a +` (``0.21.0``, ``0.22.0``, etc.) and :ref:`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 |/ @@ -747,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``. @@ -778,27 +770,40 @@ for more details. Scheduling work for releases ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -We schedule work for releases by creating `GitHub 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 +`_ and `GitHub Projects +`_, while **patch releases** use `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 `_ 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 -`_. +^^^^^^^^^^^^^^^^^^^^^ +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: @@ -806,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: - -#. Create two new project boards: +Assuming all required work from the milestone is completed, the steps to make the major release +are: - * One for the next major release - * One for the next point release +#. `Create a new milestone `_ for the next major + release. -#. Move any optional tasks that are not done to one of the new project boards. +#. `Create a new label `_ for the next patch release. - 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`` @@ -860,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`. @@ -870,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: +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. -#. Create a new project board for the next point release. +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. -#. Move any optional tasks that are not done to the next project board. - -#. Check out the release branch (it should already exist). - - 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``: - - .. 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 - `_ 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 +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. - $ 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 `_ ``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. @@ -954,20 +925,22 @@ completed, the steps to make the point release are: release branch. See `the changelog from 0.14.1 `_. -#. 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 `_ - 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`. @@ -1042,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: diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst index 193258e04729ac..2a9bb5c3f2f347 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 `_ or `Python Virtual Environments `_. 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 -`_ and other package -managers. The user input file is named ``spack.yaml`` and the lock -file is named ``spack.lock`` +`_ 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. + +.. note:: -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. + 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 `. ^^^^^^^^^^^^^^^^^^^^^^^^^ 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,8 +154,11 @@ 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 does not already -exist. +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 @@ -168,49 +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: -Apart from managed environments, Spack also supports anonymous environments. +^^^^^^^^^^^^^^^^^^^^^^^^ +Independent Environments +^^^^^^^^^^^^^^^^^^^^^^^^ -Anonymous environments can be placed in any directory of choice. +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 anonymous + that are still used in a managed environment. This is not the case for independent environments. -To create an anonymous environment, use one of the following commands: +To create an independent environment, use one of the following commands: .. code-block:: console $ spack env create --dir my_env $ spack env create ./my_env -As a shorthand, you can also create an anonymous environment upon activation if it does not +As a shorthand, you can also create an independent environment upon activation if it does not already exist: .. code-block:: console $ spack env activate --create ./my_env -For convenience, Spack can also place an anonymous environment in a temporary directory for you: +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 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^ +Environment-Aware 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. +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 @@ -255,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 @@ -300,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 @@ -313,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 @@ -355,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:: @@ -385,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 @@ -409,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. @@ -424,7 +450,7 @@ 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 @@ -609,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`` @@ -634,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 @@ -647,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 @@ -661,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 @@ -769,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 @@ -844,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 @@ -863,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:: @@ -931,32 +960,84 @@ This allows for a much-needed reduction in redundancy between packages and constraints. ----------------- -Filesystem Views ----------------- +----------------- +Environment 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. +Spack Environments can have an associated filesystem view, which is a directory +with a more traditional structure ``/bin``, ``/lib``, ``/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 ``/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 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``. -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 +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +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 @@ -1001,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 @@ -1119,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 `` 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 `` 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 @@ -1146,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: @@ -1218,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/ @@ -1306,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/getting_started.rst b/lib/spack/docs/getting_started.rst index 9435111c8ea8e8..cb8a586e3c94c4 100644 --- a/lib/spack/docs/getting_started.rst +++ b/lib/spack/docs/getting_started.rst @@ -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: ^^^^^^^^^^^^^ @@ -1364,187 +1369,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: ---------------- @@ -1656,16 +1480,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 @@ -1730,7 +1552,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. ^^^^^^^^^^^^^^^^^ @@ -1744,21 +1566,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 - -""""""""""""""""""""""""""" -Windows Compatible Packages -""""""""""""""""""""""""""" +If in the previous step, you did not have CMake or Ninja installed, running the command above should install both packages -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:: 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 -.. 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 @@ -1768,6 +1581,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 a87c800ef5d282..00000000000000 Binary files a/lib/spack/docs/images/pr-commit.png and /dev/null differ diff --git a/lib/spack/docs/images/projects.png b/lib/spack/docs/images/projects.png deleted file mode 100644 index bd2971ff625ddb..00000000000000 Binary files a/lib/spack/docs/images/projects.png and /dev/null differ diff --git a/lib/spack/docs/images/splices.png b/lib/spack/docs/images/splices.png new file mode 100644 index 00000000000000..b2a3e998373478 Binary files /dev/null and b/lib/spack/docs/images/splices.png differ diff --git a/lib/spack/docs/index.rst b/lib/spack/docs/index.rst index 410cb8e41c77bd..accedfee98554d 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 `_. - 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 fad1e414fcaf16..80e3c2ee668427 100644 --- a/lib/spack/docs/module_file_support.rst +++ b/lib/spack/docs/module_file_support.rst @@ -457,11 +457,11 @@ For instance, the following config options, tcl: all: suffixes: - ^python@3.12: 'python-3.12' + ^python@3: 'python{^python.version}' ^openblas: 'openblas' -will add a ``python-3.12`` version string to any packages compiled with -Python matching the spec, ``python@3.12``. This is useful to know which +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. diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 46ab71b93f0a71..a736ff8c793005 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1263,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. @@ -1361,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: ^^^^^^ @@ -2344,6 +2384,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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -5173,12 +5234,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 """""""""""""""""""""""""""""""" @@ -5216,38 +5271,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:: - - 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. + assess whether installed specs work on the system. Spack cannot spare + resources for more extensive testing of packages included in CI stacks. - 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: @@ -5255,30 +5314,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 `. 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 `. 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 `. +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: @@ -5291,61 +5346,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 ` and +:ref:`spec constraints ` 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. - If ``MyPackage`` were a recipe for a library, the tests should build - an example or test program that is then executed. +.. admonition:: Test methods for library packages should build test executables. -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. + 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. -.. _test-part: + 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. + +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. + +.. admonition:: Test method and test part names **must** be unique. + + Test results reporting requires that test methods and embedded test parts + within a package have unique names. The signature for ``test_part`` is: @@ -5367,40 +5505,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 @@ -5410,50 +5576,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 ... - FAILED - ==> [2023-03-10-16:03:56.625555] test: test_example_ex2: run installed ex2 + PASSED: MyPackage::test_series_setup + ==> [2024-03-10-16:03:56.625555] test: test_series_run: perform operation ... - PASSED + FAILED: MyPackage::test_series_run + ==> [2024-03-10-16:03:57.003456] test: test_series_report: generate report + ... + 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 ` and -:ref:`spec constraints ` 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 `. + 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: -.. _test-compilation: +""""""""""""""""""""""""""""""""""""" +Building and running test executables +""""""""""""""""""""""""""""""""""""" -""""""""""""""""""""""""" -Enabling test compilation -""""""""""""""""""""""""" +.. admonition:: Re-use build-time sources and (small) input data sets when possible. -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``. + 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`. -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``). + 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. -.. note:: +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``. + +.. admonition:: ``test_requires_compiler = True`` is required to build test executables. + + 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 @@ -5477,28 +5661,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 `). 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: @@ -5513,46 +5691,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:: + + *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`). -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. +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:: @@ -5561,43 +5762,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. + copied **after** the provided build stage (``install``) when the installation + prefix **and** files 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: + 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. -* ``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:: - - 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 ``filter_file`` function can be quite useful for such changes. - See :ref:`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: @@ -5605,8 +5781,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 @@ -5614,17 +5791,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 `), 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 @@ -5634,17 +5809,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: @@ -5653,9 +5840,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: @@ -5665,10 +5851,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 ` 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 `) 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 @@ -5690,8 +5879,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 @@ -5699,17 +5889,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: @@ -5717,9 +5914,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: @@ -5745,11 +5942,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 @@ -5758,8 +5961,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 ` 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. @@ -5788,7 +5990,6 @@ repository, and installation. - ``self.test_suite.current_test_data_dir`` - ``join_path(self.test_suite.current_test_data_dir, "hello.f90")`` - .. _inheriting-tests: """""""""""""""""""""""""""" @@ -5831,7 +6032,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. @@ -5996,6 +6197,8 @@ running: This is already part of the boilerplate for packages created with ``spack create``. +.. _file-filtering: + ^^^^^^^^^^^^^^^^^^^ Filtering functions ^^^^^^^^^^^^^^^^^^^ diff --git a/lib/spack/docs/pipelines.rst b/lib/spack/docs/pipelines.rst index 8aeefd116efc2e..67c8a065aab6c2 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 `_ +examined live at this example `project `_ 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 [:PORT][/PATH]?spec=``. + +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 ^^^^^^^^^^^^^^^^ diff --git a/lib/spack/docs/repositories.rst b/lib/spack/docs/repositories.rst index ae8f2929456ff4..3b20c78bfcc97a 100644 --- a/lib/spack/docs/repositories.rst +++ b/lib/spack/docs/repositories.rst @@ -476,9 +476,3 @@ implemented using Python's built-in `sys.path :py:mod:`spack.repo` module implements a custom `Python importer `_. -.. 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 d57c00e6c8bd11..f9c3ccc1b60de4 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.25.1 +sphinx_design==0.6.1 +sphinx-rtd-theme==3.0.1 +python-levenshtein==0.26.0 docutils==0.20.1 pygments==2.18.0 -urllib3==2.2.1 -pytest==8.2.0 +urllib3==2.2.3 +pytest==8.3.3 isort==5.13.2 -black==24.4.2 -flake8==7.0.0 -mypy==1.10.0 +black==24.10.0 +flake8==7.1.1 +mypy==1.11.1 diff --git a/lib/spack/external/__init__.py b/lib/spack/external/__init__.py index 26ac1f63d00080..672bf17f80895c 100644 --- a/lib/spack/external/__init__.py +++ b/lib/spack/external/__init__.py @@ -18,7 +18,7 @@ * Homepage: https://pypi.python.org/pypi/archspec * Usage: Labeling, comparison and detection of microarchitectures -* Version: 0.2.4 (commit 48b92512b9ce203ded0ebd1ac41b42593e931f7c) +* 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 89e1868047225b..50c3b18d4d4e00 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/_vendoring/jsonschema/_format.py b/lib/spack/external/_vendoring/jsonschema/_format.py index 281a7cfcffe9c3..29061e3661f1c1 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/archspec/cpu/detect.py b/lib/spack/external/archspec/cpu/detect.py index d99295d90719bd..f9f095f78a6c05 100644 --- a/lib/spack/external/archspec/cpu/detect.py +++ b/lib/spack/external/archspec/cpu/detect.py @@ -47,7 +47,11 @@ def decorator(factory): def partial_uarch( - name: str = "", vendor: str = "", features: Optional[Set[str]] = None, generation: int = 0 + 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( @@ -57,6 +61,7 @@ def partial_uarch( features=features or set(), compilers={}, generation=generation, + cpu_part=cpu_part, ) @@ -90,6 +95,7 @@ def proc_cpuinfo() -> Microarchitecture: 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): @@ -345,6 +351,10 @@ def sorting_fn(item): 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 diff --git a/lib/spack/external/archspec/cpu/microarchitecture.py b/lib/spack/external/archspec/cpu/microarchitecture.py index 7a251b905e26bf..bb85b9f37c0966 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 @@ -65,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): @@ -111,8 +117,12 @@ def __eq__(self, other): 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 @@ -143,7 +153,8 @@ def __repr__(self): 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) @@ -168,18 +179,22 @@ def __contains__(self, feature): @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)) + 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.""" @@ -190,6 +205,7 @@ def to_dict(self): "generation": self.generation, "parents": [str(x) for x in self.parents], "compilers": self.compilers, + "cpupart": self.cpu_part, } @staticmethod @@ -202,6 +218,7 @@ def from_dict(data) -> "Microarchitecture": features=set(data["features"]), compilers=data.get("compilers", {}), generation=data.get("generation", 0), + cpu_part=data.get("cpupart", ""), ) def optimization_flags(self, compiler, version): @@ -360,8 +377,11 @@ def fill_target_from_dict(name, data, targets): 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) + targets[name] = Microarchitecture( + name, parents, vendor, features, compilers, generation=generation, cpu_part=cpu_part + ) known_targets = {} data = archspec.cpu.schema.TARGETS_JSON["microarchitectures"] diff --git a/lib/spack/external/archspec/json/cpu/microarchitectures.json b/lib/spack/external/archspec/json/cpu/microarchitectures.json index 1e8a8caa35ca77..9275422ef4da53 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,7 +3018,6 @@ "uscat", "ilrcpc", "flagm", - "ssbs", "dcpodp", "svei8mm", "svebf16", @@ -3004,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:", @@ -3028,7 +3109,8 @@ "flags": "-tp {name}" } ] - } + }, + "cpupart": "0xd40" }, "neoverse_v2": { "from": ["neoverse_n1", "armv9.0a"], @@ -3052,32 +3134,22 @@ "lrcpc", "dcpop", "sha3", - "sm3", - "sm4", "asimddp", "sha512", "sve", "asimdfhm", - "dit", "uscat", "ilrcpc", "flagm", - "ssbs", "sb", "dcpodp", "sve2", - "sveaes", - "svepmull", - "svebitperm", - "svesha3", - "svesm4", "flagm2", "frint", "svei8mm", "svebf16", "i8mm", - "bf16", - "dgh" + "bf16" ], "compilers" : { "gcc": [ @@ -3102,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" } ], @@ -3145,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"], @@ -3211,7 +3392,8 @@ "flags" : "-mcpu=apple-m1" } ] - } + }, + "cpupart": "0x022" }, "m2": { "from": ["m1", "armv8.5a"], @@ -3289,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 c21a3a1b372088..085e5b95772e6a 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/patches/distro.patch b/lib/spack/external/patches/distro.patch new file mode 100644 index 00000000000000..067df63d45a7c2 --- /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 d22d87a3d63f2f..c753c641c13d29 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/llnl/path.py b/lib/spack/llnl/path.py index 9ef90eec4c03e5..4c5da8472d2710 100644 --- a/lib/spack/llnl/path.py +++ b/lib/spack/llnl/path.py @@ -98,3 +98,10 @@ def path_filter_caller(*args, **kwargs): 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 d2995f34c1b6a9..0ad67d6775fc71 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/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index f9cee1e118ca6d..00bb270151908c 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -27,8 +27,6 @@ from llnl.util.lang import dedupe, 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 +47,11 @@ "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", @@ -187,12 +185,18 @@ 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() @@ -213,6 +217,15 @@ def _win_rename(src, 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 @@ -233,42 +246,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") - - -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 - - #: This generates the library filenames that may appear on any OS. library_extensions = ["a", "la", "so", "tbd", "dylib"] @@ -553,7 +530,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) @@ -745,7 +728,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, ): @@ -768,8 +750,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 @@ -777,8 +757,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: @@ -822,7 +800,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): @@ -851,16 +829,14 @@ def escaped_path(path): 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 @@ -871,21 +847,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 @@ -1619,6 +1586,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) @@ -1668,41 +1641,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. @@ -2429,9 +2367,10 @@ def add_library_dependent(self, *dest): """ 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): @@ -2509,8 +2448,14 @@ def establish_link(self): # 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 diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py index c3e67f205d870b..f43773346a948d 100644 --- a/lib/spack/llnl/util/lang.py +++ b/lib/spack/llnl/util/lang.py @@ -6,17 +6,17 @@ import collections.abc import contextlib import functools -import inspect import itertools import os import re import sys import traceback +import warnings from datetime import datetime, timedelta -from typing import Any, Callable, Iterable, List, Tuple +from typing import Callable, Iterable, List, Tuple, TypeVar # Ignore emacs backups when listing modules -ignore_modules = [r"^\.#", "~$"] +ignore_modules = r"^\.#|~$" def index_by(objects, *funcs): @@ -84,20 +84,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 attr_setdefault(obj, name, value): """Like dict.setdefault, but for objects.""" if not hasattr(obj, name): @@ -105,15 +91,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. @@ -178,19 +155,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): @@ -237,8 +217,8 @@ def setter(name, value): 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()) @@ -388,8 +368,8 @@ def cd_fun(): 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): @@ -864,20 +844,19 @@ def uniq(sequence): return uniq_list -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 @contextlib.contextmanager @@ -892,18 +871,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: @@ -915,12 +888,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 @@ -932,6 +906,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. @@ -1036,3 +1025,42 @@ def __init__(self, callback): 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/symlink.py b/lib/spack/llnl/util/symlink.py index ec45787a96668a..be758c4d132866 100644 --- a/lib/spack/llnl/util/symlink.py +++ b/lib/spack/llnl/util/symlink.py @@ -8,100 +8,75 @@ 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. @@ -247,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): @@ -269,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: @@ -338,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/color.py b/lib/spack/llnl/util/tty/color.py index 710196783d57e6..51a5a1b5b1e1f6 100644 --- a/lib/spack/llnl/util/tty/color.py +++ b/lib/spack/llnl/util/tty/color.py @@ -263,7 +263,9 @@ def match_to_ansi(match): f"Incomplete color format: '{match.group(0)}' in '{match.string}'" ) - ansi_code = _escape(f"{styles[style]};{colors.get(color_code, '')}", color, enclose, zsh) + 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: diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py index 16fe45edfc7267..534472dbecdf3e 100644 --- a/lib/spack/llnl/util/tty/log.py +++ b/lib/spack/llnl/util/tty/log.py @@ -18,9 +18,10 @@ 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 @@ 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 "\" or "", +# with no intervening ""/"" 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 @@ def close(self): 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 @@ def __enter__(self): # 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 @@ def __enter__(self): 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 @@ def __enter__(self): 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 @@ def __enter__(self): 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 @@ def __enter__(self): 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 @@ def __exit__(self, exc_type, exc_val, exc_tb): 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 @@ def force_echo(self): 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 = "\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 2e2342ac803a71..9a83564db7daa9 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 ... string -__version__ = "0.22.0.dev0" +__version__ = "0.23.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 ' ()'. + + 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 33bc6293f5d561..00000000000000 --- 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 50eb8b8ec5d788..dc988ac90edd97 100644 --- a/lib/spack/spack/audit.py +++ b/lib/spack/spack/audit.py @@ -42,15 +42,20 @@ def _search_duplicate_compilers(error_cls): 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 @@ def __init__(self, summary, details): 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 @@ def _search_duplicate_compilers(error_cls): 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): @@ -252,40 +264,6 @@ def _search_duplicate_specs_in_externals(error_cls): return errors -@config_packages -def _deprecated_preferences(error_cls): - """Search package preferences deprecated in v0.21 (and slated for removal in v0.23)""" - # TODO (v0.23): 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.""" @@ -306,7 +284,7 @@ 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}'" @@ -315,9 +293,8 @@ def _avoid_mismatched_variants(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 " @@ -351,6 +328,43 @@ def _wrongly_named_spec(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") @@ -374,6 +388,14 @@ def _make_config_error(config_data, summary, error_cls): ) +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", @@ -392,22 +414,23 @@ def _make_config_error(config_data, summary, error_cls): ) -@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 @@ -421,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 = ( @@ -436,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"^(.*)(? 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""" badname_regex, errors = re.compile(r"[_A-Z]"), [] for pkg_name in pkgs: 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 @@ -638,12 +713,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 Value objects (for conditional values) or the values themselves + build_system_names = set( + v.value if isinstance(v, spack.variant.Value) 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 @@ -659,6 +739,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""" @@ -779,7 +1024,7 @@ def check_virtual_with_variants(spec, msg): return error = error_cls( f"{pkg_name}: {msg}", - f"remove variants from '{spec}' in depends_on directive in {filename}", + [f"remove variants from '{spec}' in depends_on directive in {filename}"], ) errors.append(error) @@ -825,20 +1070,22 @@ def check_virtual_with_variants(spec, msg): # check variants dependency_variants = dep.spec.variants - for name, value in dependency_variants.items(): + 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 = ( f"{pkg_name}: wrong variant used for dependency in 'depends_on()'" ) + error_msg = str(e) if isinstance(e, KeyError): error_msg = ( f"variant {str(e).strip()} does not exist in package {dep_name}" + f" in package '{dep_name}'" ) - error_msg += f" in package '{dep_name}'" errors.append( error_cls(summary=summary, details=[error_msg, f"in {filename}"]) @@ -850,39 +1097,38 @@ def check_virtual_with_variants(spec, msg): @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 @@ -892,11 +1138,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 @@ -953,29 +1199,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) - - error_msg = str(e).strip() - if isinstance(e, KeyError): - error_msg = "the variant {0} does not exist".format(error_msg) + variant_names = pkg.variant_names() + summary = f"{pkg.name}: wrong variant in '{directive}' directive" + filename = spack.repo.PATH.filename_for_package_name(pkg.name) - 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 @@ -1013,9 +1256,10 @@ def _extracts_errors(triggers, summary): 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 when, providers, details in _error_items(pkg_cls.provided): errors.extend( diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 4292d6449da440..2f74f38dac3200 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -5,6 +5,8 @@ import codecs import collections +import concurrent.futures +import copy import hashlib import io import itertools @@ -22,42 +24,63 @@ import urllib.request import warnings from contextlib import closing -from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple -from urllib.error import HTTPError, URLError +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.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 @@ -83,7 +106,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 @@ -229,7 +252,7 @@ def _associate_built_specs_with_mirror(self, cache_key, mirror_url): spec_list = [ s - for s in db.query_local(installed=any, in_buildcache=any) + for s in db.query_local(installed=any) if s.external or db.query_local_by_spec_hash(s.dag_hash()).in_buildcache ] @@ -658,14 +681,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? :( @@ -690,15 +713,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): @@ -714,7 +754,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)}, } @@ -745,37 +785,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. @@ -799,7 +832,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 @@ -880,7 +913,7 @@ def file_read_method(file_path): 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: @@ -898,32 +931,31 @@ def url_read_method(url): 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 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 is Exception. Just print a warning and return - tty.warn(f"Encountered problem listing packages at {cache_prefix}: {err}") + 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 @@ -932,56 +964,49 @@ 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) + file_list, read_fn = _spec_files_from_cache(url) except ListMirrorSpecsError as e: raise GenerateIndexError(f"Unable to generate package index: {e}") from e - tty.debug(f"Retrieving spec descriptor files from {cache_prefix} to build index") - - 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) + _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 {cache_prefix}: {e}" - ) from e - finally: - shutil.rmtree(tmpdir, ignore_errors=True) + 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 @@ -999,36 +1024,23 @@ def generate_key_index(key_prefix, tmpdir=None): except Exception as e: raise CannotListKeys(f"Encountered problem listing keys at {key_prefix}: {e}") from e - remove_tmpdir = False - - 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 e: - raise GenerateIndexError( - f"Encountered problem pushing key index to {key_prefix}: {e}" - ) from e - finally: - if remove_tmpdir: - shutil.rmtree(tmpdir, ignore_errors=True) + 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: @@ -1079,180 +1091,749 @@ def _do_create_tarball(tarfile_path: str, binaries_dir: str, buildinfo: dict): return inner_checksum.hexdigest(), outer_checksum.hexdigest() -class PushOptions(NamedTuple): - #: Overwrite existing tarball/metadata files in buildcache - force: bool = False +class ExistsInBuildcache(NamedTuple): + signed: bool + unsigned: bool + tarball: bool - #: Regenerated indices after pushing - regenerate_index: bool = False - #: Whether to sign or not. - unsigned: bool = False +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"), + ) - #: What key to use for signing - key: Optional[str] = None + 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") -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 ). + def local_tarball(self) -> str: + return os.path.join(self.local, f"{self.spec.dag_hash()}.tar.gz") - This method raises :py:class:`NoOverwriteException` when ``force=False`` and the tarball or - spec.json file already exist in the buildcache. It raises :py:class:`PushToBuildCacheError` - when the tarball or spec.json file cannot be pushed to the buildcache. - """ - if not spec.concrete: - raise ValueError("spec must be concrete to build tarball") - with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir: - _build_tarball_in_stage_dir(spec, out_url, stage_dir=tmpdir, options=options) +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 _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)) +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} - mkdirp(tarfile_dir) - if web_util.url_exists(remote_spackfile_path): - if options.force: - web_util.remove_url(remote_spackfile_path) - else: - raise NoOverwriteException(url_util.format(remote_spackfile_path)) + 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) - # need to copy the spec file so the build cache can be downloaded - # without concretizing with the current spack packages - # and preferences + 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=(",", ":")) - 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) + # sign the tarball and spec file with gpg + if signing_key: + specfile = sign_specfile(signing_key, specfile) - remote_specfile_path = url_util.join( - out_url, os.path.relpath(specfile_path, os.path.realpath(stage_dir)) + web_util.push_to_url( + specfile, files.remote_specfile(signed=bool(signing_key)), keep_original=False ) - 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) +class Uploader: + def __init__(self, mirror: spack.mirror.Mirror, force: bool, update_index: bool): + self.mirror = mirror + self.force = force + self.update_index = update_index + + self.tmpdir: str + self.executor: concurrent.futures.Executor - checksum, _ = _do_create_tarball(tarfile_path, binaries_dir, buildinfo) + def __enter__(self): + self._tmpdir = tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) + self._executor = spack.util.parallel.make_concurrent_executor() - # 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) + self.tmpdir = self._tmpdir.__enter__() + self.executor = self.executor = self._executor.__enter__() + + return self + + def __exit__(self, *args): + self._executor.__exit__(*args) + self._tmpdir.__exit__(*args) + + 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.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, + ) + + self._base_images = base_images + self._checksums = checksums + + # 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) + + return skipped, upload_errors + + 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 + ) + + +class URLUploader(Uploader): + def __init__( + self, + mirror: spack.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, + ) + + +def make_uploader( + mirror: spack.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 + ) + + +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 + ] + + exists = { + spec.dag_hash(): exists_future.result() + for spec, exists_future in zip(specs, exists_futures) + } + + 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 + + if not specs_to_upload: + return skipped, errors + + total = len(specs_to_upload) + + 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 + ] + + uploaded_any = False + fancy_progress = FancyProgress(total) + + 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 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} + fancy_progress.fail() + errors.append((spec, error)) - 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=(",", ":")) + # don't bother pushing keys / index if all failed to upload + if not uploaded_any: + return skipped, errors - # 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) + 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) + 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)" + ) + + +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: - # 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, + 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 as e: - raise PushToBuildCacheError( - f"Encountered problem pushing binary {remote_spackfile_path}: {e}" - ) from e + except Exception: + return None + - # 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) +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") - # 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))) + # 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) + ) + blob = spack.oci.oci.Blob( + Digest.from_sha256(compressed_tarfile_checksum), + Digest.from_sha256(tarfile_checksum), + os.path.getsize(filename), + ) -class NotInstalledError(spack.error.SpackError): - """Raised when a spec is not installed but picked to be packaged.""" + # Upload the blob + start = time.time() + upload_blob_with_retry(image_ref, file=filename, digest=blob.compressed_digest) + elapsed = time.time() - start - def __init__(self, specs: List[Spec]): - super().__init__( - "Cannot push non-installed packages", - ", ".join(s.cformat("{name}{@version}{/hash:7}") for s in specs), - ) + # delete the file + os.unlink(filename) + return blob, elapsed -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_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: - 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 + 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() - if not root and not dependencies: - return [] + 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 _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 + + if not blobs_to_upload: + return skipped, base_images, checksums, [] + + 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 skipped, base_images, checksums, errors + + +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) + + # 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 _oci_update_index( + image_ref: ImageReference, tmpdir: str, pool: concurrent.futures.Executor +) -> None: + tags = list_tags(image_ref) - return [s for s in itertools.chain(roots, deps) if not s.external] + # 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): @@ -1637,11 +2218,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 @@ -1956,7 +2562,13 @@ def _ensure_common_prefix(tar: tarfile.TarFile) -> str: 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 @@ -1965,11 +2577,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: @@ -1979,10 +2590,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) @@ -2001,8 +2612,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): @@ -2039,21 +2655,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() @@ -2138,6 +2750,9 @@ def get_keys(install=False, trust=False, force=False, mirrors=None): 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 ) @@ -2148,19 +2763,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 @@ -2189,67 +2797,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.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): @@ -2440,7 +3013,7 @@ def get_remote_hash(self): 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 @@ -2462,7 +3035,7 @@ def conditional_fetch(self) -> FetchIndexResult: 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: @@ -2503,10 +3076,7 @@ def __init__(self, url, etag, urlopen=web_util.urlopen): 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)) @@ -2514,14 +3084,14 @@ def conditional_fetch(self) -> FetchIndexResult: 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) @@ -2552,21 +3122,19 @@ def conditional_fetch(self) -> FetchIndexResult: 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: diff --git a/lib/spack/spack/bootstrap/__init__.py b/lib/spack/spack/bootstrap/__init__.py index 85935cd0e021b2..d710caee68cc2f 100644 --- a/lib/spack/spack/bootstrap/__init__.py +++ b/lib/spack/spack/bootstrap/__init__.py @@ -9,6 +9,7 @@ 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, ) @@ -19,6 +20,7 @@ "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", diff --git a/lib/spack/spack/bootstrap/_common.py b/lib/spack/spack/bootstrap/_common.py index 5c3ca93e94711b..2a33fa9aba02de 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 @@ def _python_import(module: str) -> bool: try: - __import__(module) + importlib.import_module(module) except ImportError: return False return True @@ -59,10 +61,19 @@ def _try_import_from_store( python, *_ = candidate_spec.dependencies("python-venv") else: python, *_ = candidate_spec.dependencies("python") - module_paths = [ - os.path.join(candidate_spec.prefix, python.package.purelib), - os.path.join(candidate_spec.prefix, python.package.platlib), - ] + + # 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 @@ -213,15 +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": + 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 00000000000000..fb0150f49d4c20 --- /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 8cba750fc59eda..1781b3cc7e9ce3 100644 --- a/lib/spack/spack/bootstrap/config.py +++ b/lib/spack/spack/bootstrap/config.py @@ -14,6 +14,7 @@ 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) + 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 e5e0983c24e7bd..0c6127e63e8289 100644 --- a/lib/spack/spack/bootstrap/core.py +++ b/lib/spack/spack/bootstrap/core.py @@ -37,23 +37,19 @@ import spack.binary_distribution import spack.config import spack.detection -import spack.environment -import spack.modules -import spack.paths +import spack.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 @@ def __init__(self, conf: ConfigDictionary) -> None: 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.mirror.Mirror(conf["info"]["url"]).fetch_url @property def mirror_scope(self) -> spack.config.InternalConfigScope: @@ -179,7 +170,15 @@ def _install_by_hash( 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( - match, unsigned=True, force=True, sha256=pkg_sha256 + # 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( @@ -268,15 +267,13 @@ def try_import(self, module: str, abstract_spec_str: str) -> bool: # 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()) - 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" @@ -284,7 +281,7 @@ def try_import(self, module: str, abstract_spec_str: str) -> bool: # 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 @@ -303,18 +300,11 @@ def try_search_path(self, executables: Tuple[str], abstract_spec_str: str) -> bo # 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 @@ -480,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: @@ -490,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. @@ -573,14 +577,15 @@ 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): @@ -597,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 13942ba86f4693..39c8aa2fa5cbc5 100644 --- a/lib/spack/spack/bootstrap/environment.py +++ b/lib/spack/spack/bootstrap/environment.py @@ -14,9 +14,9 @@ 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 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 00000000000000..f313e4544fa94a --- /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 00000000000000..7251eef5160850 --- /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 00000000000000..ba661aa4f859d7 --- /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 00000000000000..d0692a81963011 --- /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 00000000000000..9e170a92bb3566 --- /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 00000000000000..a1c94c3b93b0b2 --- /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 00000000000000..f95ffefd1cecc4 --- /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 37b6bc37da925e..6d3270b42c97ab 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 00c1c5ab4fa401..33586eccde2974 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -37,13 +37,17 @@ 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, Set, 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,8 +55,8 @@ 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._checks import spack.build_systems.cmake import spack.build_systems.meson import spack.build_systems.python @@ -61,25 +65,21 @@ import spack.config import spack.deptypes as dt import spack.error -import spack.main +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_DIR_CASE_ENTRY, EnvironmentModifications, @@ -91,7 +91,7 @@ ) 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. @@ -190,14 +190,6 @@ def __call__(self, *args, **kwargs): 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 @@ -241,17 +233,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 = [ @@ -381,11 +362,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. @@ -430,6 +407,65 @@ def set_compiler_environment_variables(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. @@ -477,79 +513,81 @@ 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 `. + 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) + + # 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). @@ -579,14 +617,12 @@ def set_package_py_globals(pkg, context: Context = Context.BUILD): """ module = ModuleChangePropagator(pkg) + jobs = spack.config.determine_number_of_jobs(parallel=pkg.parallel) + module.make_jobs = jobs if context == Context.BUILD: - module.std_cmake_args = spack.build_systems.cmake.CMakeBuilder.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) - jobs = determine_number_of_jobs(parallel=pkg.parallel) - module.make_jobs = jobs - # TODO: make these build deps that can be installed if not found. module.make = MakeExecutable("make", jobs) module.gmake = MakeExecutable("gmake", jobs) @@ -730,25 +766,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 -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))) + return list(by_name.values()) + + +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): @@ -792,7 +831,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") @@ -817,23 +855,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 and 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() @@ -1023,6 +1046,12 @@ def set_all_package_py_globals(self): # 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. @@ -1032,6 +1061,15 @@ def set_all_package_py_globals(self): 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: @@ -1101,45 +1139,61 @@ def _make_runnable(self, dep: spack.spec.Spec, env: EnvironmentModifications): 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() @@ -1151,17 +1205,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. @@ -1178,8 +1233,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 {}. " @@ -1189,7 +1244,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) @@ -1207,8 +1262,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): @@ -1235,23 +1290,9 @@ def child_fun(): 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 @@ -1260,14 +1301,13 @@ def child_fun(): 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, @@ -1276,7 +1316,7 @@ def child_fun(): function, kwargs, write_pipe, - input_multiprocess_fd, + input_fd, jobserver_fd1, jobserver_fd2, ), @@ -1296,8 +1336,8 @@ def child_fun(): 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" @@ -1312,7 +1352,7 @@ def exitcode_msg(p): 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 @@ -1488,7 +1528,7 @@ def long_message(self): 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") @@ -1521,17 +1561,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) @@ -1565,21 +1594,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 dfda043fad08ef..e15409fc38d80d 100644 --- a/lib/spack/spack/build_systems/_checks.py +++ b/lib/spack/spack/build_systems/_checks.py @@ -8,7 +8,7 @@ import llnl.util.lang import spack.builder -import spack.installer +import spack.error import spack.relocate import spack.spec import spack.store @@ -34,7 +34,7 @@ def check_paths(path_list, filetype, predicate): 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 +42,7 @@ def check_paths(path_list, filetype, predicate): 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): diff --git a/lib/spack/spack/build_systems/aspell_dict.py b/lib/spack/spack/build_systems/aspell_dict.py index e9fc4e14978e9e..6c55c363ab6678 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 ce4d6bc27915fd..47911271fef860 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.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 os.path import stat @@ -14,6 +13,7 @@ import spack.build_environment import spack.builder +import spack.error import spack.package_base from spack.directives import build_system, conflicts, depends_on from spack.multimethod import when @@ -249,7 +249,7 @@ def runs_ok(script_abs_path): # 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 +269,7 @@ def runs_ok(script_abs_path): 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 +294,7 @@ def runs_ok(script_abs_path): 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.name)) # Copy the good files over the bad ones for abs_path in to_be_patched: @@ -549,13 +547,12 @@ def autoreconf(self, pkg, spec, prefix): 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) + self.pkg.module.autoreconf(*autoreconf_args) @property def autoreconf_search_path_args(self): @@ -579,7 +576,9 @@ def set_configure_or_die(self): 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): """Return the list of all the arguments that must be passed to configure, @@ -596,7 +595,7 @@ def configure(self, pkg, spec, prefix): options += self.configure_args() with fs.working_dir(self.build_directory, create=True): - inspect.getmodule(self.pkg).configure(*options) + pkg.module.configure(*options) def build(self, pkg, spec, prefix): """Run "make" on the build targets specified by the builder.""" @@ -604,12 +603,12 @@ def build(self, pkg, spec, prefix): params = ["V=1"] params += self.build_targets with fs.working_dir(self.build_directory): - inspect.getmodule(self.pkg).make(*params) + pkg.module.make(*params) def install(self, pkg, spec, prefix): """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) @@ -688,9 +687,8 @@ def _activate_or_not( 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)) @@ -699,27 +697,19 @@ def _activate_or_not( # 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)): # 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 = [(value, f"{variant}={value}" in spec) for value in feature_values] # For each allowed value in the list of values for option_value, activated in options: diff --git a/lib/spack/spack/build_systems/cached_cmake.py b/lib/spack/spack/build_systems/cached_cmake.py index 48c714f31a2af8..d9b415cbc76416 100644 --- a/lib/spack/spack/build_systems/cached_cmake.py +++ b/lib/spack/spack/build_systems/cached_cmake.py @@ -10,7 +10,6 @@ import llnl.util.filesystem as fs import llnl.util.tty as tty -import spack.build_environment import spack.builder from .cmake import CMakeBuilder, CMakePackage @@ -89,7 +88,7 @@ def define_cmake_cache_from_variant(self, cmake_var, variant=None, comment=""): 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: @@ -162,7 +161,9 @@ def initconfig_compiler_entries(self): 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)) @@ -295,18 +296,6 @@ def initconfig_hardware_entries(self): 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), @@ -316,8 +305,6 @@ def std_initconfig_entries(self): "#------------------{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"), ] diff --git a/lib/spack/spack/build_systems/cargo.py b/lib/spack/spack/build_systems/cargo.py index 2fd952d8c2fa3d..4dded46559fb3a 100644 --- a/lib/spack/spack/build_systems/cargo.py +++ b/lib/spack/spack/build_systems/cargo.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import inspect - import llnl.util.filesystem as fs import spack.builder @@ -72,9 +70,7 @@ def check_args(self): 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.""" @@ -86,4 +82,4 @@ def install(self, pkg, spec, prefix): 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 a64904715e0027..f6d346155c2632 100644 --- a/lib/spack/spack/build_systems/cmake.py +++ b/lib/spack/spack/build_systems/cmake.py @@ -3,22 +3,24 @@ # # 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 List, Optional, Set, 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 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 @@ -108,6 +110,11 @@ def _conditional_cmake_defaults(pkg: spack.package_base.PackageBase, args: List[ if _supports_compilation_databases(pkg): args.append(CMakeBuilder.define("CMAKE_EXPORT_COMPILE_COMMANDS", True)) + # 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(CMakeBuilder.define("CMAKE_POLICY_DEFAULT_CMP0042", "NEW")) + def generator(*names: str, default: Optional[str] = None): """The build system generator to use. @@ -141,11 +148,30 @@ def _values(x): 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.""" + # Add direct build/test deps + selected: Set[str] = {s.dag_hash() for s in pkg.spec.dependencies(deptype=dt.BUILD | dt.TEST)} + # Add transitive link deps + selected.update(s.dag_hash() for s in pkg.spec.traverse(root=False, deptype=dt.LINK)) + # Separate out externals so they do not shadow Spack prefixes + externals, spack_built = stable_partition( + (s for s in pkg.spec.traverse(root=False, order="topo") if s.dag_hash() in selected), + 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 @@ -340,7 +366,7 @@ def std_args(pkg, generator=None): 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 @@ -352,6 +378,16 @@ def std_args(pkg, generator=None): "-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), ] @@ -366,15 +402,6 @@ def std_args(pkg, generator=None): _conditional_cmake_defaults(pkg, args) _maybe_set_python_hints(pkg, args) - # 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)), - ] - ) - return args @staticmethod @@ -500,7 +527,7 @@ def define_from_variant(self, cmake_var, variant=None): 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: @@ -535,28 +562,35 @@ def cmake_args(self): def cmake(self, pkg, spec, prefix): """Runs ``cmake`` in the build directory""" + + # 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 + 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) + pkg.module.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) + pkg.module.make(*self.build_targets) elif self.generator == "Ninja": self.build_targets.append("-v") - inspect.getmodule(self.pkg).ninja(*self.build_targets) + pkg.module.ninja(*self.build_targets) 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) + pkg.module.make(*self.install_targets) elif self.generator == "Ninja": - inspect.getmodule(self.pkg).ninja(*self.install_targets) + pkg.module.ninja(*self.install_targets) spack.builder.run_after("build")(execute_build_time_tests) diff --git a/lib/spack/spack/build_systems/compiler.py b/lib/spack/spack/build_systems/compiler.py index d441b57b2e88c4..65a85ecddff87e 100644 --- a/lib/spack/spack/build_systems/compiler.py +++ b/lib/spack/spack/build_systems/compiler.py @@ -14,6 +14,7 @@ import spack.compiler import spack.package_base +import spack.util.executable # Local "type" for type hints Path = Union[str, pathlib.Path] diff --git a/lib/spack/spack/build_systems/cuda.py b/lib/spack/spack/build_systems/cuda.py index 4311df3a1746c7..5bfe0cfcadf679 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 @@ def cuda_flags(arch_list): 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 @@ def cuda_flags(arch_list): 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 @@ def cuda_flags(arch_list): 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 @@ def cuda_flags(arch_list): # 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 @@ def cuda_flags(arch_list): 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") @@ -209,12 +239,21 @@ def cuda_flags(arch_list): 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/go.py b/lib/spack/spack/build_systems/go.py index 95472642f68695..ae588789c774d5 100644 --- a/lib/spack/spack/build_systems/go.py +++ b/lib/spack/spack/build_systems/go.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import inspect - import llnl.util.filesystem as fs import spack.builder @@ -46,16 +44,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 +81,7 @@ def build_directory(self): 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 +91,7 @@ def check_args(self): 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.""" @@ -95,4 +104,4 @@ def install(self, pkg, spec, prefix): 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 1a6e0b7acbde52..9f82bae14d39b0 100644 --- a/lib/spack/spack/build_systems/intel.py +++ b/lib/spack/spack/build_systems/intel.py @@ -22,9 +22,10 @@ install, ) +import spack.builder import spack.error 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 @@ -846,6 +847,7 @@ def scalapack_libs(self): "^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 @@ def mpi_setup_dependent_build_environment(self, env, dependent_spec, compilers_o "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, diff --git a/lib/spack/spack/build_systems/makefile.py b/lib/spack/spack/build_systems/makefile.py index 915f71d33238bf..25f25adfe3d716 100644 --- a/lib/spack/spack/build_systems/makefile.py +++ b/lib/spack/spack/build_systems/makefile.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 import llnl.util.filesystem as fs @@ -103,12 +102,12 @@ def edit(self, pkg, spec, prefix): def build(self, pkg, spec, prefix): """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) + pkg.module.make(*self.build_targets) def install(self, pkg, spec, prefix): """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) diff --git a/lib/spack/spack/build_systems/meson.py b/lib/spack/spack/build_systems/meson.py index 2c2bc0d1a0ca40..cf3cd24e2032f7 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 @@ -195,19 +194,19 @@ def meson(self, pkg, spec, prefix): options += self.std_meson_args options += self.meson_args() with fs.working_dir(self.build_directory, create=True): - inspect.getmodule(self.pkg).meson(*options) + pkg.module.meson(*options) def build(self, pkg, spec, prefix): """Make the build targets""" options = ["-v"] options += self.build_targets with fs.working_dir(self.build_directory): - inspect.getmodule(self.pkg).ninja(*options) + pkg.module.ninja(*options) def install(self, pkg, spec, prefix): """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) diff --git a/lib/spack/spack/build_systems/msbuild.py b/lib/spack/spack/build_systems/msbuild.py index 1520ebc21d0b43..8fb4ef936e0758 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 @@ -24,7 +23,6 @@ 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") @@ -105,7 +103,7 @@ def msbuild_install_args(self): 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 @@ def install(self, pkg, spec, prefix): """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 f8823548dee764..50232f3e2da993 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 @@ -24,7 +23,6 @@ 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") @@ -133,9 +131,7 @@ def build(self, pkg, spec, prefix): 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. @@ -145,8 +141,6 @@ def install(self, pkg, spec, prefix): 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 64958ce94179a9..1b0a88c6e76551 100644 --- a/lib/spack/spack/build_systems/octave.py +++ b/lib/spack/spack/build_systems/octave.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 inspect - import spack.builder import spack.package_base from spack.directives import build_system, extends @@ -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 6988307f0b85fa..6d60a7ae4f329e 100644 --- a/lib/spack/spack/build_systems/oneapi.py +++ b/lib/spack/spack/build_systems/oneapi.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """Common utilities for managing intel oneapi packages.""" -import getpass import os import platform import shutil @@ -13,9 +12,10 @@ from llnl.util.filesystem import HeaderList, LibraryList, find_libraries, join_path, mkdirp from llnl.util.link_tree import LinkTree +import spack.util.path from spack.build_environment import dso_suffix from spack.directives import conflicts, license, redistribute, variant -from spack.package_base import InstallError +from spack.error import InstallError from spack.util.environment import EnvironmentModifications from spack.util.executable import Executable @@ -36,9 +36,8 @@ class IntelOneApiPackage(Package): "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") @@ -100,7 +99,7 @@ def install_component(self, installer_path): # 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") @@ -123,7 +122,7 @@ def install_component(self, installer_path): 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 diff --git a/lib/spack/spack/build_systems/perl.py b/lib/spack/spack/build_systems/perl.py index 773a6a98e6c3b9..4caab7131b096f 100644 --- a/lib/spack/spack/build_systems/perl.py +++ b/lib/spack/spack/build_systems/perl.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 Iterable @@ -134,7 +133,7 @@ def build_method(self): 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 @@ -158,7 +157,7 @@ def configure(self, pkg, spec, prefix): 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 diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py index c94e2db700ee44..b951ec2a977814 100644 --- a/lib/spack/spack/build_systems/python.py +++ b/lib/spack/spack/build_systems/python.py @@ -4,7 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import functools -import inspect import operator import os import re @@ -17,7 +16,7 @@ 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 @@ -25,6 +24,8 @@ import spack.detection import spack.multimethod import spack.package_base +import spack.platforms +import spack.repo import spack.spec import spack.store from spack.directives import build_system, depends_on, extends @@ -121,10 +122,10 @@ def skip_modules(self) -> Iterable[str]: return [] @property - def python_spec(self): - """Get python-venv if it exists or python otherwise.""" - python, *_ = self.spec.dependencies("python-venv") or self.spec.dependencies("python") - return python + 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. @@ -146,8 +147,12 @@ def view_file_conflicts(self, view, merge_map): 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. - python = self.python_spec - if not self.extendee_spec or python.external: + 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. @@ -224,7 +229,7 @@ def test_imports(self) -> None: # 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, @@ -311,9 +316,9 @@ def get_external_python_for_prefix(self): ) 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] @@ -334,7 +339,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") @@ -368,6 +373,12 @@ def list_url(cls) -> Optional[str]: # type: ignore[override] return f"https://pypi.org/simple/{name}/" return None + @property + def python_spec(self): + """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.""" @@ -418,7 +429,7 @@ class PythonPipBuilder(BaseBuilder): 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") @@ -427,7 +438,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]: diff --git a/lib/spack/spack/build_systems/qmake.py b/lib/spack/spack/build_systems/qmake.py index a1e679b50c609f..75ad3860b4b2dc 100644 --- a/lib/spack/spack/build_systems/qmake.py +++ b/lib/spack/spack/build_systems/qmake.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 inspect - from llnl.util.filesystem import working_dir import spack.builder @@ -66,17 +64,17 @@ def qmake_args(self): 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.""" diff --git a/lib/spack/spack/build_systems/r.py b/lib/spack/spack/build_systems/r.py index 5154f5a42dd3a4..07bdb3d0ae0bbd 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 @@ def configure_vars(self): 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 @@ def install(self, pkg, spec, prefix): 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 facac62032cf54..7e48f8b370f0b3 100644 --- a/lib/spack/spack/build_systems/racket.py +++ b/lib/spack/spack/build_systems/racket.py @@ -11,9 +11,9 @@ 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/ruby.py b/lib/spack/spack/build_systems/ruby.py index 0f069e99f28fcc..77d7ef289c7460 100644 --- a/lib/spack/spack/build_systems/ruby.py +++ b/lib/spack/spack/build_systems/ruby.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import glob -import inspect import spack.builder import spack.package_base @@ -52,10 +51,10 @@ def build(self, pkg, spec, prefix): 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 @@ def install(self, pkg, spec, prefix): # 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 0d2ea175a12358..4a32b690f794ae 100644 --- a/lib/spack/spack/build_systems/scons.py +++ b/lib/spack/spack/build_systems/scons.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 inspect - import spack.builder import spack.package_base from spack.directives import build_system, depends_on @@ -63,8 +61,7 @@ def build_args(self, spec, prefix): 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 +69,7 @@ def install_args(self, spec, prefix): 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. diff --git a/lib/spack/spack/build_systems/sip.py b/lib/spack/spack/build_systems/sip.py index 5d93e23ac2d52d..f297c59a00be97 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 @@ -86,14 +85,13 @@ def import_modules(self): 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,7 +99,7 @@ def test_imports(self): 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") @@ -136,9 +134,13 @@ def configure(self, pkg, spec, prefix): """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 +153,7 @@ def build(self, pkg, spec, prefix): 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,7 +164,7 @@ def install(self, pkg, spec, prefix): 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.""" diff --git a/lib/spack/spack/build_systems/waf.py b/lib/spack/spack/build_systems/waf.py index 0fd78d48da7ea7..a0110c5c3480b3 100644 --- a/lib/spack/spack/build_systems/waf.py +++ b/lib/spack/spack/build_systems/waf.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 inspect - from llnl.util.filesystem import working_dir import spack.builder @@ -90,11 +88,11 @@ def build_directory(self): 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) diff --git a/lib/spack/spack/builder.py b/lib/spack/spack/builder.py index 00734d5533796c..b767f15b6dc765 100644 --- a/lib/spack/spack/builder.py +++ b/lib/spack/spack/builder.py @@ -6,12 +6,13 @@ import collections.abc import copy import functools -import inspect from typing import List, Optional, Tuple from llnl.util import lang -import spack.build_environment +import spack.error +import spack.multimethod +import spack.repo #: Builder classes, as registered by the "builder" decorator BUILDER_CLS = {} @@ -74,6 +75,14 @@ def __call__(self, spec, prefix): return self.phase_fn(self.builder.pkg, spec, prefix) +def get_builder_class(pkg, name: str) -> Optional[type]: + """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): """Return a new builder object for the package object being passed as argument. @@ -96,13 +105,13 @@ class hierarchy (look at AspellDictPackage for an example of that) Args: pkg (spack.package_base.PackageBase): 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. @@ -295,7 +304,11 @@ def _decorator(fn): return _decorator -class BuilderMeta(PhaseCallbacksMeta, type(collections.abc.Sequence)): # type: ignore +class BuilderMeta( + PhaseCallbacksMeta, + spack.multimethod.MultiMethodMeta, + type(collections.abc.Sequence), # type: ignore +): pass @@ -458,15 +471,13 @@ def _on_phase_start(self, instance): # 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) @@ -520,10 +531,6 @@ def stage(self): def prefix(self): return self.pkg.prefix - def test(self): - # Defer tests to virtual and concrete packages - pass - def setup_build_environment(self, env): """Sets up the build environment for a package. diff --git a/lib/spack/spack/caches.py b/lib/spack/spack/caches.py index 19c736748e37e9..f2d4bfeec07a33 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 @@ def store(self, fetcher, relative_dest): 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 4c21772ff9b1ed..5a8b2ae1e7d49a 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -10,6 +10,7 @@ import os import re import shutil +import ssl import stat import subprocess import sys @@ -19,18 +20,21 @@ 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.concretize import spack.config as cfg -import spack.environment as ev +import spack.error import spack.main import spack.mirror import spack.paths @@ -44,8 +48,34 @@ 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,10 +95,8 @@ 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") @@ -171,11 +199,11 @@ def _remove_satisfied_deps(deps, satisfied_list): 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.mirror.MirrorCollection(binary=True) tty.msg("Checked the following mirrors for binaries:") for m in mirrors.values(): tty.msg(f" {m.fetch_url}") @@ -222,21 +250,14 @@ 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_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 @@ -380,12 +401,6 @@ def __init__(self, ci_config, spec_labels, stages): 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", []), @@ -401,9 +416,20 @@ def __init__(self, ci_config, spec_labels, stages): 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, @@ -496,6 +522,7 @@ def generate_ir(self): 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: @@ -538,6 +565,108 @@ def _apply_section(dest, src): 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"]: @@ -550,19 +679,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. @@ -574,48 +701,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 @@ -676,46 +779,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.", - ) + + 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 (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.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 - - # 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") + 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 @@ -725,55 +816,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()) @@ -782,9 +828,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")) @@ -797,7 +842,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) ] @@ -806,11 +852,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)) @@ -818,8 +860,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 @@ -833,8 +873,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 @@ -896,7 +934,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 @@ -938,36 +976,16 @@ def main_script_replacements(cmd): 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 @@ -1024,6 +1042,7 @@ def main_script_replacements(cmd): # 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: @@ -1048,19 +1067,6 @@ def main_script_replacements(cmd): }, ) - # 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 @@ -1075,15 +1081,7 @@ def main_script_replacements(cmd): job_id += 1 if print_summary: - _print_staging_summary(spec_labels, stages, mirrors_to_check, 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()) + _print_staging_summary(spec_labels, stages, rebuild_decisions) tty.debug(f"{job_id} build jobs generated in {stage_id} stages") @@ -1094,9 +1092,10 @@ def main_script_replacements(cmd): if cdash_handler and cdash_handler.auth_token: try: cdash_handler.populate_buildgroup(all_job_names) - except (SpackError, HTTPError, URLError) as err: + except (SpackError, HTTPError, URLError, TimeoutError) as err: tty.warn(f"Problem populating buildgroup: {err}") - else: + elif cdash_config: + # warn only if there was actually a CDash configuration. tty.warn("Unable to populate buildgroup without CDash credentials") service_job_retries = { @@ -1104,7 +1103,7 @@ def main_script_replacements(cmd): "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" @@ -1114,17 +1113,12 @@ def main_script_replacements(cmd): 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"] = [] @@ -1132,27 +1126,6 @@ def main_script_replacements(cmd): 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" @@ -1169,11 +1142,9 @@ def main_script_replacements(cmd): 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 @@ -1184,9 +1155,7 @@ def main_script_replacements(cmd): 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), @@ -1204,33 +1173,26 @@ def main_script_replacements(cmd): # 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: @@ -1251,31 +1213,15 @@ def main_script_replacements(cmd): 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"}]} @@ -1283,7 +1229,6 @@ def main_script_replacements(cmd): 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) @@ -1291,8 +1236,11 @@ def main_script_replacements(cmd): 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): @@ -1363,15 +1311,6 @@ def can_verify_binaries(): return len(gpg_util.public_keys()) >= 1 -def _push_to_build_cache(spec: spack.spec.Spec, sign_binaries: bool, mirror_url: str) -> None: - """Unchecked version of the public API, for easier mocking""" - bindist.push_or_raise( - spec, - spack.mirror.Mirror.from_url(mirror_url).push_url, - bindist.PushOptions(force=True, unsigned=not 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. @@ -1382,20 +1321,15 @@ def push_to_build_cache(spec: spack.spec.Spec, mirror_url: str, sign_binaries: b 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.mirror.Mirror.from_url(mirror_url) try: - _push_to_build_cache(spec, sign_binaries, mirror_url) + 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(str(e)) + tty.error(f"Problem writing to {mirror_url}: {e}") return False - except Exception as e: - # TODO (zackgalbreath): write an adapter for boto3 exceptions so we can catch a specific - # exception instead of parsing str(e)... - msg = str(e) - if any(x in msg for x in ["Access Denied", "InvalidAccessKeyId"]): - tty.error(f"Permission problem writing to {mirror_url}: {msg}") - return False - raise def remove_other_mirrors(mirrors_to_keep, scope=None): @@ -1441,10 +1375,6 @@ def copy_stage_logs_to_artifacts(job_spec: spack.spec.Spec, job_log_dir: str) -> job_log_dir: path into which build log should be copied """ tty.debug(f"job spec: {job_spec}") - if not job_spec: - msg = f"Cannot copy stage logs: job spec ({job_spec}) is required" - tty.error(msg) - return try: pkg_cls = spack.repo.PATH.get_pkg_class(job_spec.name) @@ -1478,6 +1408,12 @@ def copy_test_logs_to_artifacts(test_stage, job_test_dir): 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 @@ -1500,7 +1436,7 @@ 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: @@ -1942,9 +1878,9 @@ def compose_command_err_handling(args): # but we need to handle EXEs (git, etc) ourselves catch_exe_failure = ( """ -if ($LASTEXITCODE -ne 0){ - throw "Command {} has failed" -} +if ($LASTEXITCODE -ne 0){{ + throw 'Command {} has failed' +}} """ if IS_WINDOWS else "" @@ -2070,7 +2006,7 @@ def read_broken_spec(broken_spec_url): """ try: _, _, fs = web_util.read_from_url(broken_spec_url) - except (URLError, web_util.SpackWebError, HTTPError): + except web_util.SpackWebError: tty.warn(f"Unable to read broken spec from {broken_spec_url}") return None @@ -2176,13 +2112,13 @@ def __init__(self, ci_cdash): 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 @@ -2248,7 +2184,7 @@ def create_buildgroup(self, opener, headers, url, group_name, group_type): 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]: @@ -2294,7 +2230,7 @@ def populate_buildgroup(self, job_names): 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: @@ -2323,83 +2259,6 @@ def report_skipped(self, spec: spack.spec.Spec, report_dir: str, reason: Optiona 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 b89de48f8f5290..00000000000000 --- a/lib/spack/spack/ci_needs_workaround.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 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 7d799fc907e172..00000000000000 --- 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 bd6a3eb7681c31..c481e931312988 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import argparse +import importlib import os import re import sys @@ -16,7 +17,7 @@ from llnl.util.tty.colify import colify from llnl.util.tty.color import colorize -import spack.config +import spack.config # breaks a cycle. import spack.environment as ev import spack.error import spack.extensions @@ -114,8 +115,8 @@ 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) @@ -237,7 +238,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 @@ -336,6 +337,7 @@ def display_specs(specs, args=None, **kwargs): groups (bool): display specs grouped by arch/compiler (default True) 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`` """ @@ -359,6 +361,7 @@ def get_arg(name, default=None): 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: @@ -386,6 +389,13 @@ def get_arg(name, default=None): 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 * " " @@ -444,7 +454,7 @@ def format_list(specs): 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] diff --git a/lib/spack/spack/cmd/arch.py b/lib/spack/spack/cmd/arch.py index 56f597d778d1d4..c684a5fa4b3d30 100644 --- a/lib/spack/spack/cmd/arch.py +++ b/lib/spack/spack/cmd/arch.py @@ -11,6 +11,7 @@ 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 @@ 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_target_group(header, target_group): 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 77bbbc5d82b7d4..e5512d9a903662 100644 --- a/lib/spack/spack/cmd/audit.py +++ b/lib/spack/spack/cmd/audit.py @@ -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 5221a980c78b3a..8704f2c7a411e9 100644 --- a/lib/spack/spack/cmd/bootstrap.py +++ b/lib/spack/spack/cmd/bootstrap.py @@ -16,11 +16,11 @@ import spack.bootstrap.config import spack.bootstrap.core import spack.config -import spack.main import spack.mirror 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 diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 543570cf28604e..960f468c7d13b6 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -3,60 +3,35 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import argparse -import copy import glob -import hashlib import json -import multiprocessing -import multiprocessing.pool import os import shutil import sys import tempfile -import urllib.request -from typing import Dict, List, Optional, Tuple, Union +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.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 description = "create, download and install binary packages" @@ -70,12 +45,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", @@ -118,6 +87,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", @@ -190,10 +170,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( @@ -339,39 +315,6 @@ 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 "" - - -class NoPool: - 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 - - -MaybePool = Union[multiprocessing.pool.Pool, NoPool] - - -def _make_pool() -> MaybePool: - """Can't use threading because it's unsafe, and can't use spawned processes because of globals. - That leaves only forking""" - if multiprocessing.get_start_method() == "fork": - return multiprocessing.pool.Pool(determine_number_of_jobs(parallel=True)) - else: - return NoPool() - - def _skip_no_redistribute_for_public(specs): remaining_specs = list() removed_specs = list() @@ -391,6 +334,45 @@ def _skip_no_redistribute_for_public(specs): return remaining_specs +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): """create a binary package and push it to a mirror""" if args.spec_file: @@ -404,18 +386,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.mirror.Mirror) push_url = mirror.push_url @@ -426,92 +398,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 + + # Select a signing key, or None if unsigned. + signing_key = None if unsigned else (args.key or bindist.select_signing_key()) - # This is a list of installed, non-external specs. - specs = bindist.specs_to_be_packaged( + 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, ) + if not args.private: specs = _skip_no_redistribute_for_public(specs) - # When pushing multiple specs, print the url once ahead of time, as well as how - # many specs are being pushed. 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: @@ -523,7 +455,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)) ) ) @@ -534,393 +466,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) - - # 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 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) - - 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 dependencies ), - ], - } - - 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 _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: MaybePool, - 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: MaybePool) -> None: - request = urllib.request.Request(url=image_ref.tags_url()) - response = spack.oci.opener.urlopen(request) - spack.oci.opener.ensure_status(request, 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""" @@ -963,14 +518,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 @@ -1208,14 +755,15 @@ 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( @@ -1223,7 +771,8 @@ def update_index(mirror: spack.mirror.Mirror, update_keys=False): ) try: - bindist.generate_key_index(keys_url) + 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. diff --git a/lib/spack/spack/cmd/change.py b/lib/spack/spack/cmd/change.py index 9807d5cc55786c..d2c8d9ae5d7dbb 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 44478c61ce7ea9..92413f6f0033fb 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -15,7 +15,6 @@ 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 ( diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py index 9ed0fc1a51182d..8d835b0af41f59 100644 --- a/lib/spack/spack/cmd/ci.py +++ b/lib/spack/spack/cmd/ci.py @@ -6,6 +6,7 @@ import json import os import shutil +import warnings from urllib.parse import urlparse, urlunparse import llnl.util.filesystem as fs @@ -18,7 +19,6 @@ 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.util.gpg as gpg_util @@ -31,7 +31,6 @@ level = "long" SPACK_COMMAND = "spack" -MAKE_COMMAND = "make" INSTALL_FAIL_CODE = 1 FAILED_CREATE_BUILDCACHE_CODE = 100 @@ -40,6 +39,12 @@ 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") @@ -57,18 +62,11 @@ def setup_parser(subparser): "path to the file where generated jobs file should be written. " "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", ) @@ -76,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( @@ -195,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") @@ -229,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 @@ -285,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") @@ -320,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 @@ -357,51 +329,11 @@ 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 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: @@ -476,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 @@ -529,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) @@ -708,17 +544,11 @@ def ci_rebuild(args): cdash_handler.copy_test_results(reports_dir, job_test_dir) if install_exit_code == 0: - # If the install succeeded, push it to one or more mirrors. Failure to push to any mirror + # 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. - mirror_urls = [buildcache_mirror_url] - - # TODO: Remove this block in Spack 0.23 - if pipeline_mirror_url: - mirror_urls.append(pipeline_mirror_url) - 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(), ): if not result.success: diff --git a/lib/spack/spack/cmd/clean.py b/lib/spack/spack/cmd/clean.py index 3a9a7f32abc546..0b8fb6d6bbf6f2 100644 --- a/lib/spack/spack/cmd/clean.py +++ b/lib/spack/spack/cmd/clean.py @@ -10,11 +10,9 @@ 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,8 @@ 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 = list(spack.cmd.matching_spec_from_env(x) for x in 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 f9979339edb644..875d34ee3531cf 100644 --- a/lib/spack/spack/cmd/commands.py +++ b/lib/spack/spack/cmd/commands.py @@ -7,18 +7,20 @@ 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 @@ def usage(self, usage: str) -> str: cmd = self.parser.prog.replace(" ", "-") if cmd in self.documented: - string += "\n:ref:`More documentation `\n".format(cmd) + string = f"{string}\n:ref:`More documentation `\n" return string @@ -250,33 +252,27 @@ def body( 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 @@ def optionals(self, optionals: Sequence[str]) -> str: 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 @@ def subcommands(self, subcommands: Sequence[str]) -> str: 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 @@ def format(self, cmd: Command) -> str: + 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 @@ def optspecs( 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 @@ def optspecs( 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 @@ def optspecs( # 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 @@ def complete_head( 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 @@ def positionals( 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 @@ def optionals( 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 @@ def subcommands(self, prog: str, subcommands: List[Tuple[ArgumentParser, str, st 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 `" % (cmd, cmd) + ref = f":ref:`{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 aa652919f84690..6a4a43e9e93746 100644 --- a/lib/spack/spack/cmd/common/arguments.py +++ b/lib/spack/spack/cmd/common/arguments.py @@ -15,7 +15,6 @@ import spack.deptypes as dt import spack.environment as ev import spack.mirror -import spack.modules import spack.reporters import spack.spec import spack.store @@ -661,34 +660,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: + if "/" in m or "\\" in m or m in (".", ".."): return spack.mirror.Mirror(m) # Otherwise, the named mirror is required to exist. try: return spack.mirror.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) 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) 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) 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 8033e776b9ba07..7e805b196cbf72 100644 --- a/lib/spack/spack/cmd/common/confirmation.py +++ b/lib/spack/spack/cmd/common/confirmation.py @@ -9,6 +9,7 @@ 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 1d04e199d9cced..6371ef65a8365b 100644 --- a/lib/spack/spack/cmd/common/env_utility.py +++ b/lib/spack/spack/cmd/common/env_utility.py @@ -10,7 +10,6 @@ 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 860f0a9ee0b91c..2eb23bf7143760 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) 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 e07c0eb18ccfd4..061a03fc4d8c3a 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 61b27bcdfe7f2d..aef2d7a54120f2 100644 --- a/lib/spack/spack/cmd/config.py +++ b/lib/spack/spack/cmd/config.py @@ -13,9 +13,9 @@ 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 @@ -156,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: @@ -256,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) @@ -264,7 +264,9 @@ 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): @@ -338,7 +340,7 @@ def _config_change(config_path, match_spec_str=None): if not changed: existing_requirements = spack.config.get(key_path) if isinstance(existing_requirements, str): - raise spack.config.ConfigError( + raise spack.error.ConfigError( "'config change' needs to append a requirement," " but existing require: config is not a list" ) @@ -362,14 +364,11 @@ def config_change(args): 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: @@ -447,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"]) @@ -537,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) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 49f4ae217786e5..1aa619149706c9 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 @@ -90,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( @@ -107,7 +118,7 @@ def write(self, pkg_path): 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, ) ) @@ -126,8 +137,8 @@ def install(self, spec, prefix): 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) @@ -215,13 +226,13 @@ def luarocks_args(self): 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): @@ -322,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): @@ -362,7 +373,7 @@ def config_settings(self, spec, prefix): 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 @@ -416,7 +427,7 @@ def __init__(self, name, url, *args, **kwargs): + self.url_line ) - super().__init__(name, url, *args, **kwargs) + super().__init__(name, url, versions, languages) class RPackageTemplate(PackageTemplate): @@ -435,7 +446,7 @@ def configure_args(self): 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 @@ -455,7 +466,7 @@ def __init__(self, name, url, *args, **kwargs): 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): @@ -475,14 +486,14 @@ def configure_args(self): 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): @@ -507,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-"): @@ -515,7 +526,7 @@ def __init__(self, name, *args, **kwargs): 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): @@ -535,7 +546,7 @@ def build(self, spec, prefix): # 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-"): @@ -543,7 +554,7 @@ def __init__(self, name, *args, **kwargs): 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): @@ -581,14 +592,14 @@ def configure_args(self, spec, prefix): 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 = { @@ -659,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 """ @@ -668,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): @@ -812,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. @@ -821,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 @@ -835,7 +924,7 @@ def get_versions(args, name): # version("1.2.4")""" # Default guesser - guesser = BuildSystemGuesser() + guesser = BuildSystemAndLanguageGuesser() valid_url = True try: @@ -848,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: @@ -875,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 @@ -883,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 @@ -934,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 " @@ -942,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() @@ -963,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 1c9fb214f41fa9..02c22c70fd325f 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 ffb05eebe71ffa..7e2feab5aa0926 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 676da2f089f8f5..51d2389f796d34 100644 --- a/lib/spack/spack/cmd/dependencies.py +++ b/lib/spack/spack/cmd/dependencies.py @@ -11,7 +11,6 @@ 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 4cbb7cdd3cdc51..7c997bad9d5b35 100644 --- a/lib/spack/spack/cmd/dependents.py +++ b/lib/spack/spack/cmd/dependents.py @@ -47,16 +47,6 @@ def inverted_dependencies(): dependents of, e.g., `mpi`, but virtuals are not included as actual dependents. """ - dag = {} - for pkg_cls in spack.repo.PATH.all_package_classes(): - dag.setdefault(pkg_cls.name, set()) - for dep in pkg_cls.dependencies_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)] - dag = collections.defaultdict(set) for pkg_cls in spack.repo.PATH.all_package_classes(): for _, deps_by_name in pkg_cls.dependencies.items(): diff --git a/lib/spack/spack/cmd/deprecate.py b/lib/spack/spack/cmd/deprecate.py index dd61b0915ba49d..abca550ccad4a0 100644 --- a/lib/spack/spack/cmd/deprecate.py +++ b/lib/spack/spack/cmd/deprecate.py @@ -14,13 +14,13 @@ 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 @@ -76,12 +76,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,6 +86,9 @@ 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) @@ -144,7 +142,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 0a8dc493098420..696c16f4dcd808 100644 --- a/lib/spack/spack/cmd/dev_build.py +++ b/lib/spack/spack/cmd/dev_build.py @@ -8,10 +8,13 @@ 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" @@ -129,9 +132,9 @@ def dev_build(self, args): 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, @@ -139,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 0c9db3274c1860..1025b1bb691550 100644 --- a/lib/spack/spack/cmd/develop.py +++ b/lib/spack/spack/cmd/develop.py @@ -9,7 +9,10 @@ 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 @@ -60,7 +63,7 @@ def change_fn(section): 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 @@ -69,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") @@ -111,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 @@ -144,13 +157,6 @@ 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: diff --git a/lib/spack/spack/cmd/diff.py b/lib/spack/spack/cmd/diff.py index a841986355b71f..3a9311e0e6f311 100644 --- a/lib/spack/spack/cmd/diff.py +++ b/lib/spack/spack/cmd/diff.py @@ -12,7 +12,6 @@ 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 0134a522d82153..9951bb65a3f8e2 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 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 2ccb88fd1af9a4..2136bb1305c253 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -21,15 +21,12 @@ 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 @@ -60,35 +57,41 @@ # env create # def env_create_setup_parser(subparser): - """create a new environment""" - subparser.add_argument("env_name", metavar="env", help="name or directory of environment") + """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 relative develop paths verbatim into the new environment" - " when initializing from envfile", + 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="specify that this environment should maintain a view at the" - " specified path (by default the view is maintained in the" - " environment directory)", + "--with-view", help="maintain view at WITH_VIEW (vs. environment's directory)" ) subparser.add_argument( "envfile", nargs="?", default=None, - help="either a lockfile (must end with '.json' or '.lock') or a manifest file", + help="manifest or lock file (ends with '.json' or '.lock')", ) subparser.add_argument( - "--include-concrete", action="append", help="name of old environment to copy specs from" + "--include-concrete", + action="append", + help="copy concrete specs from INCLUDE_CONCRETE's environment", ) @@ -176,7 +179,7 @@ def _env_create( # 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", @@ -216,14 +219,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", ) @@ -233,14 +236,14 @@ 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", ) 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", ) subparser.add_argument( "--create", @@ -252,13 +255,12 @@ def env_activate_setup_parser(subparser): "--envfile", nargs="?", default=None, - help="either a lockfile (must end with '.json' or '.lock') or a manifest file", + help="manifest or lock file (ends with '.json' or '.lock')", ) subparser.add_argument( "--keep-relative", action="store_true", - help="copy relative develop paths verbatim into the new environment" - " when initializing from envfile", + help="copy envfile's relative develop paths verbatim when create", ) subparser.add_argument( "-d", @@ -272,10 +274,7 @@ def env_activate_setup_parser(subparser): dest="env_name", nargs="?", default=None, - help=( - "name of managed environment or directory of the anonymous env" - " (when using --dir/-d) to activate" - ), + help=("name or directory of the environment being activated"), ) @@ -388,7 +387,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", @@ -451,49 +450,51 @@ def env_deactivate(args): # 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="remove the environment even if it is included in another environment", + help="force removal even when included in other environment(s)", ) def env_remove(args): - """Remove a *named* environment. - - This removes an environment managed by Spack. Directory environments - and manifests embedded in repositories should be removed manually. - """ - read_envs = [] + """remove existing environment(s)""" + remove_envs = [] valid_envs = [] bad_envs = [] - invalid_envs = [] for env_name in ev.all_environment_names(): try: env = ev.read(env_name) - valid_envs.append(env_name) + valid_envs.append(env) if env_name in args.rm_env: - read_envs.append(env) + remove_envs.append(env) except (spack.config.ConfigFormatError, ev.SpackEnvironmentConfigError): - invalid_envs.append(env_name) - if env_name in args.rm_env: bad_envs.append(env_name) - # Check if env is linked to another before trying to remove - for name in valid_envs: + # Check if remove_env is included from another env before trying to remove + for env in valid_envs: + for remove_env in remove_envs: # don't check if environment is included to itself - if name == env_name: + if env.name == remove_env.name: continue - environ = ev.Environment(ev.root(name)) - if ev.root(env_name) in environ.included_concrete_envs: - msg = f'Environment "{env_name}" is being used by environment "{name}"' + + if remove_env.path in env.included_concrete_envs: + msg = f'Environment "{remove_env.name}" is being used by environment "{env.name}"' if args.force: tty.warn(msg) else: @@ -506,7 +507,7 @@ def env_remove(args): if not answer: tty.die("Will not remove any environments") - for env in read_envs: + for env in remove_envs: name = env.name if env.active: tty.die(f"Environment {name} can't be removed while activated.") @@ -524,29 +525,32 @@ def env_remove(args): # env rename # def env_rename_setup_parser(subparser): - """rename an existing environment""" - subparser.add_argument( - "mv_from", metavar="from", help="name (or path) of existing environment" - ) + """rename an existing environment + + rename a managed environment or move an independent/directory environment + + operation cannot be performed to or from an active environment + """ subparser.add_argument( - "mv_to", metavar="to", help="new name (or path) for existing environment" + "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="the specified arguments correspond to directory paths", + help="positional arguments are environment directory paths", ) subparser.add_argument( - "-f", "--force", action="store_true", help="allow overwriting of an existing environment" + "-f", + "--force", + action="store_true", + help="force renaming even if overwriting an existing environment", ) def env_rename(args): - """Rename an environment. - - This renames a managed environment or moves an anonymous environment. - """ + """rename or move an existing environment""" # Directory option has been specified if args.dir: @@ -595,7 +599,7 @@ def env_rename(args): # env list # def env_list_setup_parser(subparser): - """list managed environments""" + """list all managed environments""" def env_list(args): @@ -631,13 +635,14 @@ def actions(): # 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): @@ -665,7 +670,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): @@ -725,14 +730,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" @@ -762,14 +775,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" @@ -801,15 +822,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 /\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 /,\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", @@ -824,8 +849,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", @@ -839,14 +864,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", ) @@ -915,7 +940,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 8b6e75093251d8..ca32035cd77eec 100644 --- a/lib/spack/spack/cmd/external.py +++ b/lib/spack/spack/cmd/external.py @@ -7,7 +7,7 @@ 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,8 +18,9 @@ import spack.cray_manifest as cray_manifest import spack.detection import spack.error +import spack.package_base import spack.repo -import spack.util.environment +import spack.spec from spack.cmd.common import arguments description = "manage external packages in Spack configuration" @@ -138,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") diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py index 0d794eb54787dc..ef831dd05413f4 100644 --- a/lib/spack/spack/cmd/fetch.py +++ b/lib/spack/spack/cmd/fetch.py @@ -8,7 +8,6 @@ import spack.cmd import spack.config import spack.environment as ev -import spack.repo import spack.traverse from spack.cmd.common import arguments diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index c4e2c775526167..079c5bf4d31913 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -10,10 +10,11 @@ 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 @@ -46,6 +47,10 @@ def setup_parser(subparser): help="output specs as machine-readable json records", ) + 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" ) @@ -169,17 +174,17 @@ def query_arguments(args): if (args.missing or args.only_missing) and not args.only_deprecated: installed.append(InstallStatuses.MISSING) - known = any + 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", {}) @@ -293,25 +298,24 @@ def root_decorator(spec, string): ) 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 and not args.only_roots: - tty.msg("Installed packages") - def find(parser, args): - q_args = query_arguments(args) - results = args.specs(**q_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") + + if env: + if args.constraint: + init_specs = spack.cmd.parse_specs(args.constraint) + results = env.all_matching_specs(*init_specs) + else: + results = env.all_specs() + else: + q_args = query_arguments(args) + results = args.specs(**q_args) decorator = make_env_decorator(env) if env else lambda s, f: f @@ -332,6 +336,11 @@ def find(parser, args): if args.loaded: results = spack.cmd.filter_loaded_specs(results) + 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) @@ -340,12 +349,34 @@ def find(parser, args): if env: display_env(env, args, decorator, results) - count_suffix = " (not shown)" if not args.only_roots: - cmd.display_specs(results, args, decorator=decorator, all_headers=True) - count_suffix = "" + display_results = results + if not args.show_concretized: + display_results = list(x for x in results if x.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, suffix=count_suffix) + spack.cmd.print_how_many_pkgs( + list(x for x in results if x.installed), pkg_type, suffix=installed_suffix + ) + + if env: + spack.cmd.print_how_many_pkgs( + list(x for x in results if not x.installed), + "concretized", + suffix=concretized_suffix, + ) diff --git a/lib/spack/spack/cmd/gc.py b/lib/spack/spack/cmd/gc.py index 7e55dc42406f56..63e7aacfb8aa18 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 d05db0a61e9493..288212b51fc6c1 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.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, @@ -220,9 +223,10 @@ def gpg_publish(args): elif args.mirror_url: mirror = spack.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/help.py b/lib/spack/spack/cmd/help.py index 05679ff0805e10..9a4023c87a4bb3 100644 --- a/lib/spack/spack/cmd/help.py +++ b/lib/spack/spack/cmd/help.py @@ -50,7 +50,7 @@ @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 @m{target=target} specific processor @m{arch=platform-os-target} shortcut for all three above diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index 3075107d078ace..890b32b3002507 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -16,7 +16,7 @@ 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 +48,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,6 +190,15 @@ 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""" @@ -323,26 +333,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 +343,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 +376,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): @@ -502,7 +481,7 @@ def print_licenses(pkg, args): 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 @@ -522,6 +501,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 755fab7fa67ace..5040032f2bcd09 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -10,20 +10,18 @@ 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), @@ -287,7 +284,7 @@ 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.log_path): @@ -352,7 +349,7 @@ def reporter_factory(specs): 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 @@ -376,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. @@ -473,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/load.py b/lib/spack/spack/cmd/load.py index 81f13194844de4..d88d4b771f10c9 100644 --- a/lib/spack/spack/cmd/load.py +++ b/lib/spack/spack/cmd/load.py @@ -6,11 +6,10 @@ import sys 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" diff --git a/lib/spack/spack/cmd/mark.py b/lib/spack/spack/cmd/mark.py index cf816a21f544cf..0069008c4f05ac 100644 --- a/lib/spack/spack/cmd/mark.py +++ b/lib/spack/spack/cmd/mark.py @@ -8,9 +8,6 @@ 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 @@ -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) @@ -119,6 +116,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 d25a9018e88b71..af6a45e3990752 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -17,7 +17,6 @@ import spack.mirror 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 diff --git a/lib/spack/spack/cmd/modules/__init__.py b/lib/spack/spack/cmd/modules/__init__.py index 1cb04189b9278a..754813addcdc24 100644 --- a/lib/spack/spack/cmd/modules/__init__.py +++ b/lib/spack/spack/cmd/modules/__init__.py @@ -15,6 +15,7 @@ import spack.cmd import spack.config +import spack.error import spack.modules import spack.modules.common import spack.repo @@ -124,13 +125,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 +173,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 +222,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 +233,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 +378,10 @@ def refresh(module_type, specs, args): 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/patch.py b/lib/spack/spack/cmd/patch.py index b5805afd8058c6..885ff2f746c352 100644 --- a/lib/spack/spack/cmd/patch.py +++ b/lib/spack/spack/cmd/patch.py @@ -9,7 +9,6 @@ import spack.config import spack.environment as ev import spack.package_base -import spack.repo import spack.traverse from spack.cmd.common import arguments diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py index e4e616db563f13..fa4084437ffa78 100644 --- a/lib/spack/spack/cmd/pkg.py +++ b/lib/spack/spack/cmd/pkg.py @@ -12,7 +12,6 @@ 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 a4f177fa38263e..6f96234642970f 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): diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py index 68af91cd918fc4..e41e21f0a5b17e 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 a21317405c459a..d3d596fa12915d 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 165ede0dbcd20d..8adc06fdfbe24c 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 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,9 +48,8 @@ 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): @@ -114,15 +76,16 @@ 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: @@ -162,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 e2d5cb10557eff..188e5360886856 100644 --- a/lib/spack/spack/cmd/spec.py +++ b/lib/spack/spack/cmd/spec.py @@ -14,6 +14,7 @@ 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" @@ -95,21 +96,28 @@ def spec(parser, args): 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)) + elif env: + env.concretize() + specs = env.concretized_specs() + + if not args.format: + # environments are printed together in a combined tree() invocation, + # except when using --yaml or --json, which we print spec by spec below. + tree_kwargs["key"] = spack.traverse.by_dag_hash + tree_kwargs["hashes"] = args.long or args.very_long + print(spack.spec.tree([concrete for _, concrete in specs], **tree_kwargs)) + return 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") + 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. + # With --yaml or --json, just print the raw specs to output if args.format: if args.format == "yaml": # use write because to_yaml already has a newline. diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py index 10a94e34102c37..af5fa412ea7e1a 100644 --- a/lib/spack/spack/cmd/stage.py +++ b/lib/spack/spack/cmd/stage.py @@ -11,8 +11,6 @@ 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 diff --git a/lib/spack/spack/cmd/tags.py b/lib/spack/spack/cmd/tags.py index a4f9786b93de34..e43740abc72656 100644 --- a/lib/spack/spack/cmd/tags.py +++ b/lib/spack/spack/cmd/tags.py @@ -9,8 +9,8 @@ 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 5aded576b05e84..14578043829a4b 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -15,11 +15,12 @@ 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 diff --git a/lib/spack/spack/cmd/tutorial.py b/lib/spack/spack/cmd/tutorial.py index 3dd7746f81b214..478ca52b7f565b 100644 --- a/lib/spack/spack/cmd/tutorial.py +++ b/lib/spack/spack/cmd/tutorial.py @@ -10,6 +10,7 @@ from llnl.util.filesystem import working_dir import spack +import spack.cmd import spack.config import spack.paths import spack.util.git diff --git a/lib/spack/spack/cmd/undevelop.py b/lib/spack/spack/cmd/undevelop.py index 539ddb850d0d8a..a4c6371ae591ca 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 62a7ac1f327e0f..5d6779eea9195a 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -90,6 +90,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,7 +99,7 @@ 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] @@ -116,7 +117,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 +152,8 @@ def is_installed(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 +214,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 +241,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 +302,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 c46012d5dc86d3..4717c9ee9bd26b 100644 --- a/lib/spack/spack/cmd/unit_test.py +++ b/lib/spack/spack/cmd/unit_test.py @@ -10,6 +10,8 @@ import re import sys +import spack.extensions + try: import pytest except ImportError: diff --git a/lib/spack/spack/cmd/unload.py b/lib/spack/spack/cmd/unload.py index 3bafe5e8c62d83..f937ebd3138b6c 100644 --- a/lib/spack/spack/cmd/unload.py +++ b/lib/spack/spack/cmd/unload.py @@ -7,9 +7,10 @@ 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 38dd6a4aeb05d1..cb151b26d99015 100644 --- a/lib/spack/spack/cmd/url.py +++ b/lib/spack/spack/cmd/url.py @@ -339,7 +339,7 @@ def add(self, pkg_name, fetcher): 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 383e9e046baaaf..57b30788324d61 100644 --- a/lib/spack/spack/cmd/verify.py +++ b/lib/spack/spack/cmd/verify.py @@ -6,6 +6,7 @@ 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 fb1a303713cd9f..2735b6a31f93bb 100644 --- a/lib/spack/spack/cmd/versions.py +++ b/lib/spack/spack/cmd/versions.py @@ -23,11 +23,6 @@ def setup_parser(subparser): output.add_argument( "-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" ) @@ -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 586a9c6eb41fca..374aa570d2e493 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -33,15 +33,17 @@ 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 72d56e590f4657..31067a14d9fb59 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -18,7 +18,6 @@ import llnl.util.tty as tty from llnl.util.filesystem import path_contains_subdirectory, paths_containing_libs -import spack.compilers import spack.error import spack.schema.environment import spack.spec @@ -30,6 +29,9 @@ __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=()): @@ -200,18 +202,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] = [] @@ -279,18 +269,13 @@ def debug_flags(self): 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, @@ -430,14 +415,19 @@ def implicit_rpaths(self) -> List[str]: return list(paths_containing_libs(link_dirs, all_required_libs)) @property - def default_libc(self) -> Optional["spack.spec.Spec"]: - """Determine libc targeted by the compiler from link line""" + 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 - dynamic_linker = spack.util.libc.parse_dynamic_linker(output) + 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""" + dynamic_linker = self.default_dynamic_linker if not dynamic_linker: return None @@ -622,18 +612,6 @@ def extract_version_from_output(cls, output): def cc_version(cls, cc): 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. @@ -695,10 +673,6 @@ def compiler_environment(self): 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 @@ -710,6 +684,30 @@ def compiler_environment(self): 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): diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 8ce9d811207637..bfb781685f834a 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -6,12 +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 +import re +import sys import warnings -from typing import Dict, List, Optional, Tuple +from typing import Dict, List, Optional import archspec.cpu @@ -22,16 +22,14 @@ 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", @@ -63,6 +61,10 @@ } +#: 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(): @@ -85,29 +87,7 @@ def converter(cspec_like, *args, **kwargs): 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": d} + return {"compiler": compiler.to_dict()} def get_compiler_config( @@ -127,7 +107,7 @@ def get_compiler_config( # Do not init config because there is a non-empty scope return config - _init_compiler_config(configuration, scope=scope) + find_compilers(scope=scope) config = configuration.get("compilers", scope=scope) return config @@ -136,131 +116,14 @@ def get_compiler_config_from_packages( configuration: "spack.config.Configuration", *, scope: Optional[str] = None ) -> List[Dict]: """Return the compiler configuration from packages.yaml""" - config = configuration.get("packages", scope=scope) - if not config: - return [] - - packages = [] - compiler_package_names = supported_compilers() + list(package_name_to_compiler_name.keys()) - for name, entry in config.items(): - if name not in compiler_package_names: - continue - externals_config = entry.get("externals", None) - if not externals_config: - continue - packages.extend(_compiler_config_from_package_config(externals_config)) - - return packages - - -def _compiler_config_from_package_config(config): - compilers = [] - for entry in config: - compiler = _compiler_config_from_external(entry) - if compiler: - compilers.append(compiler) - - return compilers - - -def _compiler_config_from_external(config): - extra_attributes_key = "extra_attributes" - compilers_key = "compilers" - c_key, cxx_key, fortran_key = "c", "cxx", "fortran" - - # Allow `@x.y.z` instead of `@=x.y.z` - spec = spack.spec.parse_with_version_concrete(config["spec"]) - - compiler_spec = spack.spec.CompilerSpec( - package_name_to_compiler_name.get(spec.name, spec.name), spec.version - ) - - err_header = f"The external spec '{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] - - # 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" - paths = { - "cc": c_compiler, - "cxx": attribute_compilers.get(cxx_key, None), - "fc": attribute_compilers.get(fortran_key, None), - "f77": attribute_compilers.get(fortran_key, None), - } - - if not spec.architecture: - host_platform = spack.platforms.host() - operating_system = host_platform.operating_system("default_os") - target = host_platform.target("default_target").microarchitecture - else: - target = spec.target - if not target: - host_platform = spack.platforms.host() - target = host_platform.target("default_target").microarchitecture - - operating_system = spec.os - if not operating_system: - host_platform = spack.platforms.host() - operating_system = host_platform.operating_system("default_os") - - compiler_entry = { - "compiler": { - "spec": str(compiler_spec), - "paths": paths, - "flags": extra_attributes.get("flags", {}), - "operating_system": str(operating_system), - "target": str(target.family), - "modules": config.get("modules", []), - "environment": extra_attributes.get("environment", {}), - "extra_rpaths": extra_attributes.get("extra_rpaths", []), - "implicit_rpaths": extra_attributes.get("implicit_rpaths", None), - } - } - return compiler_entry - - -def _init_compiler_config( - configuration: "spack.config.Configuration", *, scope: Optional[str] -) -> None: - """Compiler search used when Spack has no compilers.""" - compilers = find_compilers() - compilers_dict = [] - for compiler in compilers: - compilers_dict.append(_to_dict(compiler)) - configuration.set("compilers", compilers_dict, scope=scope) + 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: @@ -278,9 +141,7 @@ def add_compilers_to_config(compilers, scope=None): compilers: a list of Compiler objects. scope: configuration scope to modify. """ - compiler_config = get_compiler_config( - configuration=spack.config.CONFIG, scope=scope, init_config=False - ) + 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") @@ -329,9 +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( - configuration=spack.config.CONFIG, scope=scope, init_config=False - ) + compiler_config = get_compiler_config(configuration=spack.config.CONFIG, scope=scope) filtered_compiler_config = [ compiler_entry for compiler_entry in compiler_config @@ -380,79 +239,77 @@ def all_compiler_specs(scope=None, init_config=True): 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): @@ -462,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) @@ -488,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 @@ -510,8 +369,9 @@ def replace_apple_clang(name): 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 @@ -531,7 +391,12 @@ 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): @@ -553,14 +418,11 @@ def all_compilers_from(configuration, scope=None, init_config=True): @_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. """ 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: @@ -569,7 +431,7 @@ def compilers_for_spec( def compilers_for_arch(arch_spec, scope=None): - config = all_compilers_config(spack.config.CONFIG, scope=scope) + config = all_compilers_config(spack.config.CONFIG, scope=scope, init_config=False) return list(get_compilers(config, arch_spec=arch_spec)) @@ -601,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) @@ -694,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 @@ -735,24 +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) - 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.""" @@ -766,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. @@ -775,272 +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: List["spack.compiler.Compiler"] = [] - for compiler_id, _, compiler in flat_compilers: - make_compilers = getattr(compiler_id.os, "make_compilers", _default_make_compilers) - candidates = make_compilers(compiler_id, compiler) - compilers.extend(x for x in candidates if x.cc is not None) - - 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. @@ -1048,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)) @@ -1087,20 +668,163 @@ def name_matches(name, name_list): 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)) @@ -1111,25 +835,3 @@ def __init__(self, compiler_spec, target): 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 ad67e173380e47..7ac861c745733d 100644 --- a/lib/spack/spack/compilers/aocc.py +++ b/lib/spack/spack/compilers/aocc.py @@ -13,21 +13,6 @@ 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 diff --git a/lib/spack/spack/compilers/apple_clang.py b/lib/spack/spack/compilers/apple_clang.py index 9201b164027e48..7537620709ac2e 100644 --- a/lib/spack/spack/compilers/apple_clang.py +++ b/lib/spack/spack/compilers/apple_clang.py @@ -8,7 +8,6 @@ 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 3bf40aec200519..84e661337bddd8 100644 --- a/lib/spack/spack/compilers/arm.py +++ b/lib/spack/spack/compilers/arm.py @@ -9,18 +9,6 @@ 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 @@ def fc_pic_flag(self): 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 e9377a0bb1bab7..7082ffa3c98e82 100644 --- a/lib/spack/spack/compilers/cce.py +++ b/lib/spack/spack/compilers/cce.py @@ -19,27 +19,12 @@ def __init__(self, *args, **kwargs): 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 4f93d04f5f5d25..98e00aa270f8a8 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -31,18 +31,6 @@ 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-new", "flang"] - - # Subclasses use possible names of Fortran 90 compiler - fc_names = ["flang-new", "flang"] - version_argument = "--version" @property @@ -96,6 +84,8 @@ def verbose_flag(self): openmp_flag = "-fopenmp" + # C++ flags based on CMake Modules/Compiler/Clang.cmake + @property def cxx11_flag(self): if self.real_version < Version("3.3"): @@ -120,6 +110,24 @@ def cxx17_flag(self): 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 +150,10 @@ def c17_flag(self): 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): diff --git a/lib/spack/spack/compilers/fj.py b/lib/spack/spack/compilers/fj.py index a9df7d2c23cfe9..54fa832fd70a81 100644 --- a/lib/spack/spack/compilers/fj.py +++ b/lib/spack/spack/compilers/fj.py @@ -9,18 +9,6 @@ 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 6d635523ae4e74..41915f5a8aea73 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 @@ 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 @@ def default_version(cls, cc): 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 023248b86e57e5..46e058477880c9 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -11,18 +11,6 @@ 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: @@ -107,6 +92,14 @@ def c11_flag(self): else: 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" @@ -131,9 +124,8 @@ 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.cc and self.cc.endswith("icc") and self.real_version >= Version("2021"): + if self.real_version >= Version("2021") and self.real_version < Version("2024"): env.append_flags("SPACK_ALWAYS_CFLAGS", "-diag-disable=10441") - if self.cxx and self.cxx.endswith("icpc") and self.real_version >= Version("2021"): env.append_flags("SPACK_ALWAYS_CXXFLAGS", "-diag-disable=10441") - if self.fc and self.fc.endswith("ifort") and self.real_version >= Version("2021"): + 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 9914e5242a624e..c3e9e13d71ea90 100644 --- a/lib/spack/spack/compilers/msvc.py +++ b/lib/spack/spack/compilers/msvc.py @@ -8,7 +8,7 @@ import subprocess import sys import tempfile -from typing import Dict, List +from typing import Dict import archspec.cpu @@ -117,18 +117,6 @@ def get_valid_fortran_pth(): 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 @@ -223,6 +211,30 @@ def get_oneapi_root(pth: str): ) 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 @@ -231,24 +243,66 @@ def msvc_version(self): @property def short_msvc_version(self): + """This is the shorthand VCToolset version of form + MSVC """ - This is the shorthand VCToolset version of form - MSVC *NOT* the full version, for that see + return "MSVC" + self.vc_toolset_ver + + @property + def vc_toolset_ver(self): + """ + 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""" @@ -338,7 +392,3 @@ def fc_version(cls, fc): ) clp = spack.util.executable.which_string("cl", path=sps) return cls.default_version(clp) if clp else fc_ver - - @classmethod - def f77_version(cls, f77): - return cls.fc_version(f77) diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py index 6040b74a149ead..4c735c35624971 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 @@ 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 = { diff --git a/lib/spack/spack/compilers/nvhpc.py b/lib/spack/spack/compilers/nvhpc.py index 1078e921081af9..9031ee8fc35c32 100644 --- a/lib/spack/spack/compilers/nvhpc.py +++ b/lib/spack/spack/compilers/nvhpc.py @@ -9,18 +9,6 @@ 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 fd8908be13bca8..75cee851d720b7 100644 --- a/lib/spack/spack/compilers/oneapi.py +++ b/lib/spack/spack/compilers/oneapi.py @@ -4,27 +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"), @@ -33,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+)" @@ -131,22 +118,47 @@ def fc_pic_flag(self): def stdcxx_libs(self): return ("-cxxlib",) + @property + def prefix(self): + # OneAPI reports its install prefix when running ``--version`` + # on the line ``InstalledDir: /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 /bin/compiler to + 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). - if self.cc and self.cc.endswith("icc") and self.real_version >= Version("2021"): + # 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") - if self.cxx and self.cxx.endswith("icpc") and self.real_version >= Version("2021"): env.append_flags("SPACK_ALWAYS_CXXFLAGS", "-diag-disable=10441") - if self.fc and self.fc.endswith("ifort") and self.real_version >= Version("2021"): + 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 diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index 1e8656fd3fbfb3..bb7f290be3bb7c 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -10,18 +10,6 @@ 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"), @@ -30,9 +18,6 @@ class Pgi(Compiler): "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 " diff --git a/lib/spack/spack/compilers/rocmcc.py b/lib/spack/spack/compilers/rocmcc.py index 863d3c2cbfbd6b..04c3456066afd2 100644 --- a/lib/spack/spack/compilers/rocmcc.py +++ b/lib/spack/spack/compilers/rocmcc.py @@ -11,21 +11,6 @@ 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 @@ def extract_version_from_output(cls, output): 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 1c1be0e41b4378..f3232e5807ef69 100644 --- a/lib/spack/spack/compilers/xl.py +++ b/lib/spack/spack/compilers/xl.py @@ -10,18 +10,6 @@ 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 @@ def fflags(self): # 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 15bcb7234f89b3..7a3007a9c4439a 100644 --- a/lib/spack/spack/compilers/xl_r.py +++ b/lib/spack/spack/compilers/xl_r.py @@ -9,18 +9,6 @@ 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 b311d777f45698..387c7f2de27efd 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -2,690 +2,32 @@ # 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. +(DEPRECATED) Used to contain the code for the original concretizer """ -import functools -import platform -import tempfile from contextlib import contextmanager from itertools import chain -from typing import Union - -import archspec.cpu - -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 - - #: Packages that the old concretizer cannot deal with correctly, and cannot build anyway. - #: Those will not be considered as providers for virtuals. - non_buildable_packages = {"glibc", "musl"} - - 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 = [ - s - for s in spack.repo.PATH.providers_for(spec) - if s.name not in self.non_buildable_packages - ] - 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 - ) - - 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 + CHECK_COMPILER_EXISTENCE = saved def find_spec(spec, condition, default=None): @@ -719,19 +61,6 @@ def find_spec(spec, condition, default=None): 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) - - def concretize_specs_together(*abstract_specs, **kwargs): """Given a number of specs as input, tries to concretize them together. @@ -744,12 +73,6 @@ def concretize_specs_together(*abstract_specs, **kwargs): Returns: List of concretized specs """ - if spack.config.get("config:concretizer", "clingo") == "original": - return _concretize_specs_together_original(*abstract_specs, **kwargs) - return _concretize_specs_together_new(*abstract_specs, **kwargs) - - -def _concretize_specs_together_new(*abstract_specs, **kwargs): import spack.solver.asp allow_deprecated = spack.config.get("config:deprecated", False) @@ -760,51 +83,6 @@ def _concretize_specs_together_new(*abstract_specs, **kwargs): return [s.copy() for s in result.specs] -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) - ] - 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) - ) - - 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) - ) - - super().__init__(err_msg, "Run 'spack compiler find' to add compilers.") - - class UnavailableCompilerVersionError(spack.error.SpackError): """Raised when there is no available compiler that satisfies a compiler spec.""" @@ -820,37 +98,3 @@ def __init__(self, compiler_spec, arch=None): "'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 2a2f180f45392d..afd8f30baccbb9 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -35,11 +35,11 @@ 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,17 +49,19 @@ 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 @@ -100,7 +102,6 @@ "dirty": False, "build_jobs": min(16, cpus_available()), "build_stage": "$tempdir/spack-stage", - "concretizer": "clingo", "license_dir": spack.paths.default_license_dir, } } @@ -117,21 +118,39 @@ 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"" + + +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""" @@ -148,14 +167,15 @@ def get_section(self, section: str) -> Optional[YamlConfigDict]: 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) @@ -164,19 +184,23 @@ def _write_section(self, section: str) -> None: 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"" + @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. @@ -195,15 +219,13 @@ def __init__( 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 @@ -257,6 +279,8 @@ def get_section(self, section: str) -> Optional[YamlConfigDict]: 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 @@ -301,19 +325,6 @@ def __repr__(self) -> str: return f"" -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"" - - class InternalConfigScope(ConfigScope): """An internal configuration scope that is not persisted to a file. @@ -323,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: @@ -333,9 +344,6 @@ def __init__(self, name: str, data: Optional[YamlConfigDict] = None) -> None: 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: @@ -440,27 +448,21 @@ def remove_scope(self, scope_name: str) -> Optional[ConfigScope]: 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]: """ @@ -706,13 +708,13 @@ def print_section(self, section: str, blame: bool = False, *, scope=None) -> Non 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: @@ -754,14 +756,13 @@ def override( 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 config_paths_from_entry_points() -> List[Tuple[str, str]]: @@ -789,25 +790,28 @@ def config_paths_from_entry_points() -> List[Tuple[str, str]]: return config_paths -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 _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 - Command line scopes are named after their position in the arg list. - """ 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: @@ -851,10 +855,10 @@ 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_platform_scope(cfg, name, path) # add command-line scopes _add_command_line_scopes(cfg, COMMAND_LINE_SCOPES) @@ -867,7 +871,7 @@ def create() -> Configuration: #: 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: @@ -969,7 +973,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]: @@ -978,19 +982,10 @@ def scopes() -> Dict[str, ConfigScope]: def writable_scopes() -> List[ConfigScope]: - """ - Return list of writable scopes. Higher-priority scopes come first in the - list. - """ - 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]: @@ -1023,7 +1018,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``, @@ -1036,14 +1031,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: @@ -1055,7 +1050,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: @@ -1080,11 +1075,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 @@ -1093,11 +1085,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. @@ -1107,21 +1099,9 @@ 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: @@ -1132,15 +1112,20 @@ def read_config_file( 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. @@ -1239,7 +1224,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): @@ -1282,7 +1267,7 @@ def they_are(t): 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 @@ -1599,7 +1584,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 @@ -1719,40 +1704,48 @@ def get_mark_from_yaml_data(obj): return mark -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. +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 - Arguments: - string: a string representing a ``Spec`` from config YAML. + cfg = config or CONFIG - """ + # Command line overrides all try: - spec = spack.spec.Spec(string) - return spec - except spack.parser.SpecSyntaxError as e: - mark = spack.config.get_mark_from_yaml_data(string) - if mark: - msg = f"{mark.name}:{mark.line + 1}: {str(e)}" - raise spack.parser.SpecSyntaxError(msg) from e - raise e - + command_line = cfg.get("config:build_jobs", default=None, scope="command_line") + if command_line is not None: + return command_line + except ValueError: + pass -class ConfigError(SpackError): - """Superclass for all Spack config related errors.""" + return min(max_cpus, cfg.get("config:build_jobs", 16)) -class ConfigSectionError(ConfigError): +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__( diff --git a/lib/spack/spack/container/images.json b/lib/spack/spack/container/images.json index 4283f3d2fbcb5e..72029faceafd23 100644 --- a/lib/spack/spack/container/images.json +++ b/lib/spack/spack/container/images.json @@ -78,24 +78,17 @@ "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" + "image": "quay.io/centos/centos:stream9" } }, - "centos:7": { - "bootstrap": { - "template": "container/centos_7.dockerfile" - }, - "os_package_manager": "yum", - "build": "spack/centos7" - }, "opensuse/leap:15": { "bootstrap": { "template": "container/leap-15.dockerfile" diff --git a/lib/spack/spack/container/writers/__init__.py b/lib/spack/spack/container/writers.py similarity index 87% rename from lib/spack/spack/container/writers/__init__.py rename to lib/spack/spack/container/writers.py index 1be85aaf2ae051..ab23fa7a207afd 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.tengine as tengine import spack.util.spack_yaml as syaml -from ..images import ( +from .images import ( bootstrap_template_for, build_info, checkout_command, @@ -320,8 +321,54 @@ def __call__(self): 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 287ef9d1ac79cc..00000000000000 --- 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 5cbb055fd3fd5f..00000000000000 --- 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 22371f68f27498..41767bdf0649fa 100644 --- a/lib/spack/spack/cray_manifest.py +++ b/lib/spack/spack/cray_manifest.py @@ -14,12 +14,14 @@ 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] @@ -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 3c7dff96dbb802..12f6ac24659fb3 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -32,6 +32,7 @@ Container, Dict, Generator, + Iterable, List, NamedTuple, Optional, @@ -50,6 +51,7 @@ pass import llnl.util.filesystem as fs +import llnl.util.lang import llnl.util.tty as tty import spack.deptypes as dt @@ -59,7 +61,11 @@ 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 @@ -117,6 +123,17 @@ ) +@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, @@ -203,12 +220,12 @@ 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, ): @@ -274,55 +291,6 @@ def __reduce__(self): 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 @@ -588,6 +556,9 @@ def _path(self, spec: "spack.spec.Spec") -> pathlib.Path: 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 @@ -595,9 +566,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. @@ -620,6 +593,7 @@ def __init__( """ 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") @@ -664,14 +638,6 @@ def __init__( 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 @@ -774,7 +740,13 @@ def query_local_by_spec_hash(self, hash_key): 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 @@ -787,26 +759,20 @@ def _assign_dependencies(self, spec_reader, hash_key, installs, data): 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) @@ -846,7 +812,7 @@ def check(cond, msg): ): tty.warn(f"Spack database version changed from {version} to {_DB_VERSION}. Upgrading.") - self.reindex(spack.store.STORE.layout) + self.reindex() installs = dict( (k, v.to_dict(include_fields=self._record_fields)) for k, v in self._data.items() ) @@ -873,8 +839,8 @@ def invalid_record(hash_key, error): # (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 @@ -911,7 +877,7 @@ def invalid_record(hash_key, error): 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. @@ -926,105 +892,116 @@ def _read_suppress_error(): 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. @@ -1033,7 +1010,7 @@ def _check_ref_counts(self): 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): @@ -1074,7 +1051,7 @@ def _write(self, type, value, traceback): 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: @@ -1117,29 +1094,23 @@ def _read(self): 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 @@ -1150,48 +1121,42 @@ def _add( 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 @@ -1202,23 +1167,27 @@ def _add( 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 @@ -1231,7 +1200,7 @@ def _add( 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. @@ -1240,9 +1209,9 @@ def add(self, spec, directory_layout, explicit=False): # 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) @@ -1254,12 +1223,12 @@ def _get_matching_spec_key(self, spec, **kwargs): 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: @@ -1276,7 +1245,7 @@ def _decrement_ref_count(self, spec): 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: @@ -1285,14 +1254,14 @@ def _increment_ref_count(self, spec): 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: @@ -1316,7 +1285,7 @@ def _remove(self, spec): 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: @@ -1331,7 +1300,7 @@ def remove(self, spec): 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) @@ -1342,14 +1311,14 @@ def deprecator(self, spec): 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] @@ -1367,17 +1336,17 @@ def _deprecate(self, spec, deprecator): self._data[spec_key] = spec_rec @_autospec - def mark(self, spec, key, value): + def mark(self, spec: "spack.spec.Spec", key, value) -> 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) @@ -1385,16 +1354,16 @@ def deprecate(self, spec, deprecator): @_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) @@ -1405,17 +1374,13 @@ def installed_relatives( 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: @@ -1425,7 +1390,7 @@ def installed_relatives( 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): @@ -1515,62 +1480,51 @@ def get_by_hash(self, dag_hash, default=None, installed=any): 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, InstallStatus, List[InstallStatus]] = 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"]: + + # 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: @@ -1578,7 +1532,7 @@ def _query( 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 @@ -1596,36 +1550,118 @@ def _query( # 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, InstallStatus, List[InstallStatus]] = 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. + + 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. - def query_local(self, *args, **kwargs): - """Query only the local Spack database. + hashes: list of hashes used to restrict the search - This function doesn't guarantee any sorting of the returned - data for performance reason, since comparing specs for __lt__ - may be an expensive operation. + 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, + ) + + def query( + self, + query_spec: Optional[Union[str, "spack.spec.Spec"]] = None, + *, + predicate_fn: Optional[SelectType] = None, + installed: Union[bool, InstallStatus, List[InstallStatus]] = 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", + ): + """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. - if query_local.__doc__ is None: - query_local.__doc__ = "" - query_local.__doc__ += _QUERY_DOCSTRING + 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. - def query(self, *args, **kwargs): - """Query the Spack database including all upstream databases. + 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. - Additional Arguments: - install_tree (str): query 'all' (default), 'local', 'upstream', or upstream path + hashes: list of hashes used to restrict the search + + install_tree: query 'all' (default), 'local', 'upstream', or upstream path + + origin: origin of the spec """ - install_tree = kwargs.pop("install_tree", "all") 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" @@ -1641,28 +1677,54 @@ def query(self, *args, **kwargs): # 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 = [] + local_results: Set["spack.spec.Spec"] = set() if install_tree in ("all", "local") or self.root == install_tree: - local_results = set(self.query_local(*args, **kwargs)) + 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) - 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, InstallStatus, List[InstallStatus]] = 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 @@ -1684,7 +1746,7 @@ def unused_specs( 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 @@ -1728,6 +1790,33 @@ def update_explicit(self, spec, explicit): 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): """Raised when an operation would need to lock an upstream database""" diff --git a/lib/spack/spack/deptypes.py b/lib/spack/spack/deptypes.py index df965a87f12f6b..53e138e1c25460 100644 --- a/lib/spack/spack/deptypes.py +++ b/lib/spack/spack/deptypes.py @@ -43,6 +43,31 @@ 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 44225ef0620087..e2909d5c14e645 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 516bd11c8d506b..1b16aa6ccd434b 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 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 @@ def _externals_in_packages_yaml() -> Set[spack.spec.Spec]: 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 711e17467e4fc1..d529f94f290ee6 100644 --- a/lib/spack/spack/detection/path.py +++ b/lib/spack/spack/detection/path.py @@ -11,20 +11,23 @@ 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,7 +98,8 @@ 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) + # 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): @@ -141,7 +160,7 @@ 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 = elf_utils.get_elf_compat(sys.executable) @@ -187,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) @@ -200,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: @@ -226,8 +245,8 @@ def prefix_from_path(self, *, path: str) -> str: 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: @@ -243,7 +262,9 @@ def detect_specs( 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 @@ -255,8 +276,12 @@ def detect_specs( ) 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: @@ -291,27 +316,25 @@ def detect_specs( 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 [] @@ -327,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() @@ -335,13 +358,10 @@ def search_patterns(self, *, pkg: "spack.package_base.PackageBase") -> List[str] 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) @@ -356,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 @@ -385,11 +405,11 @@ def prefix_from_path(self, *, path: str) -> str: 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. @@ -399,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 @@ -426,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 353a0a56602d60..1d56e8522cd1cb 100644 --- a/lib/spack/spack/detection/test.py +++ b/lib/spack/spack/detection/test.py @@ -68,7 +68,7 @@ def execute(self) -> List[spack.spec.Spec]: 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 @@ -104,7 +104,9 @@ def _create_executable_scripts(self, mock_executables: MockExecutables) -> List[ @property def expected_specs(self) -> List[spack.spec.Spec]: return [ - spack.spec.Spec.from_detection(item.spec, extra_attributes=item.extra_attributes) + spack.spec.Spec.from_detection( + item.spec, external_path=self.tmpdir.name, extra_attributes=item.extra_attributes + ) for item in self.test.results ] diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index b69f83a75d2571..8f9e43bf8bfbba 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -32,22 +32,20 @@ class OpenMpi(Package): """ import collections import collections.abc -import functools import os.path import re -from typing import TYPE_CHECKING, Any, Callable, List, Optional, Set, Tuple, Union +from typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple, Union import llnl.util.lang import llnl.util.tty.color import spack.deptypes as dt -import spack.error import spack.patch import spack.spec -import spack.url import spack.util.crypto import spack.variant from spack.dependency import Dependency +from spack.directives_meta import DirectiveError, DirectiveMeta from spack.fetch_strategy import from_kwargs from spack.resource import Resource from spack.version import ( @@ -80,24 +78,17 @@ class OpenMpi(Package): "redistribute", ] -#: These are variant names used by Spack internally; packages can't use them -reserved_names = ["patches", "dev_path"] - -#: 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 = Union["spack.spec.Spec", str] +SpecType = str DepType = Union[Tuple[str, ...], str] WhenType = Optional[Union["spack.spec.Spec", str, bool]] Patcher = Callable[[Union["spack.package_base.PackageBase", Dependency]], None] PatchesType = Optional[Union[Patcher, str, List[Union[Patcher, str]]]] -SUPPORTED_LANGUAGES = ("fortran", "cxx") +SUPPORTED_LANGUAGES = ("fortran", "cxx", "c") def _make_when_spec(value: WhenType) -> Optional["spack.spec.Spec"]: @@ -145,219 +136,6 @@ def _make_when_spec(value: WhenType) -> Optional["spack.spec.Spec"]: 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. - # 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): - """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 @@ -475,7 +253,7 @@ def _execute_version(pkg, ver, **kwargs): def _depends_on( pkg: "spack.package_base.PackageBase", - spec: SpecType, + spec: "spack.spec.Spec", *, when: WhenType = None, type: DepType = dt.DEFAULT_TYPES, @@ -485,11 +263,10 @@ def _depends_on( 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) @@ -505,7 +282,7 @@ def _depends_on( # 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 @@ -520,13 +297,13 @@ def _depends_on( # this is where we actually add the dependency to this package deps_by_name = pkg.dependencies.setdefault(when_spec, {}) - dependency = deps_by_name.get(dep_spec.name) + dependency = deps_by_name.get(spec.name) if not dependency: - dependency = Dependency(pkg, dep_spec, depflag=depflag) - deps_by_name[dep_spec.name] = dependency + dependency = Dependency(pkg, spec, depflag=depflag) + deps_by_name[spec.name] = dependency else: - dependency.spec.constrain(dep_spec, deps=False) + dependency.spec.constrain(spec, deps=False) dependency.depflag |= depflag # apply patches to the dependency @@ -591,12 +368,13 @@ def depends_on( @see The section "Dependency specs" in the Spack Packaging Guide. """ - if spack.spec.Spec(spec).name in SUPPORTED_LANGUAGES: + 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: "spack.package_base.PackageBase"): - _depends_on(pkg, spec, when=when, type=type, patches=patches) + _depends_on(pkg, dep_spec, when=when, type=type, patches=patches) return _execute_depends_on @@ -666,25 +444,24 @@ def extends(spec, when=None, type=("build", "run"), patches=None): 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_spec = _make_when_spec(when) if not when_spec: return - _depends_on(pkg, spec, when=when, type=type, patches=patches) - spec_obj = spack.spec.Spec(spec) + 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 spec_obj.name == "python" and not pkg.name == "python-venv": - _depends_on(pkg, "python-venv", when=when, type=("build", "run")) + 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[spec_obj.name] = (spec_obj, None) + pkg.extendees[dep_spec.name] = (dep_spec, None) return _execute_extends @@ -837,7 +614,7 @@ def format_error(msg, pkg): 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 @@ -896,22 +673,25 @@ def _raise_default_not_set(pkg): def _execute_variant(pkg): when_spec = _make_when_spec(when) - when_specs = [when_spec] 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 @@ -1101,10 +881,6 @@ def _execute_languages(pkg: "spack.package_base.PackageBase"): return _execute_languages -class DirectiveError(spack.error.SpackError): - """This is raised when something is wrong with a package directive.""" - - class DependencyError(DirectiveError): """This is raised when a dependency specification is invalid.""" diff --git a/lib/spack/spack/directives_meta.py b/lib/spack/spack/directives_meta.py new file mode 100644 index 00000000000000..70ba0298a88a82 --- /dev/null +++ b/lib/spack/spack/directives_meta.py @@ -0,0 +1,235 @@ +# Copyright 2013-2024 Lawrence Livermore 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 List, Set + +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[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 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): + """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 + + +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 b7a9b93431ce00..19f5582bce4aac 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 @@ def read_spec(self, path): 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 @@ def deprecated_file_path(self, deprecated_spec, deprecator_spec=None): 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 @@ def deprecated_file_path(self, deprecated_spec, deprecator_spec=None): 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 @@ def ensure_installed(self, spec): "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 @@ def remove_install_directory(self, spec, deprecated=False): 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/environment/depfile.py b/lib/spack/spack/environment/depfile.py index 06dc8f157d05ec..38d673192be591 100644 --- a/lib/spack/spack/environment/depfile.py +++ b/lib/spack/spack/environment/depfile.py @@ -9,11 +9,13 @@ 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 @@ def to_dict(self): "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 cd7221d4257c05..b00405b5d1e277 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -5,7 +5,7 @@ import collections import collections.abc import contextlib -import copy +import errno import os import pathlib import re @@ -22,26 +22,26 @@ import llnl.util.tty as tty import llnl.util.tty.color as clr from llnl.util.link_tree import ConflictingSpecsError -from llnl.util.symlink import symlink +from llnl.util.symlink import readlink, symlink +import spack +import spack.caches import spack.compilers 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 @@ -50,15 +50,12 @@ 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 #: environment variable used to indicate the active environment spack_env_var = "SPACK_ENV" @@ -267,9 +264,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): @@ -528,8 +523,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): @@ -551,8 +546,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 @@ -560,9 +554,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): @@ -606,7 +601,7 @@ def __init__( 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): @@ -640,7 +635,7 @@ def to_dict(self): 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 @@ -662,7 +657,7 @@ def _current_root(self): if not os.path.islink(self.root): return None - root = os.readlink(self.root) + root = readlink(self.root) if os.path.isabs(root): return root @@ -690,7 +685,7 @@ def get_projection_for_spec(self, spec): to exist on the filesystem.""" return self._view(self.root).get_projection_for_spec(spec) - def view(self, new: Optional[str] = None) -> SimpleFilesystemView: + def view(self, new: Optional[str] = None) -> fsv.SimpleFilesystemView: """ 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 @@ -710,14 +705,14 @@ def view(self, new: Optional[str] = None) -> SimpleFilesystemView: ) return self._view(path) - def _view(self, root: str) -> SimpleFilesystemView: + def _view(self, root: str) -> fsv.SimpleFilesystemView: """Returns a view object for a given root dir.""" - return SimpleFilesystemView( + 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): @@ -789,6 +784,23 @@ def regenerate(self, concrete_roots: List[Spec]) -> None: 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) @@ -920,7 +932,7 @@ def __init__(self, manifest_dir: Union[str, pathlib.Path]) -> None: def _load_manifest_file(self): """Instantiate and load the manifest file contents into memory.""" with lk.ReadTransaction(self.txlock): - self.manifest = EnvironmentManifestFile(self.path) + self.manifest = EnvironmentManifestFile(self.path, self.name) with self.manifest.use_config(): self._read() @@ -957,18 +969,25 @@ def write_transaction(self): """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) - else: - self.spec_lists[name] = 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. @@ -1140,6 +1159,8 @@ def clear(self, re_read=False): # things that cannot be recreated from file self.new_specs = [] # write packages for these on write() + self.manifest.clear() + @property def active(self): """True if this environment is currently active.""" @@ -1190,7 +1211,6 @@ def scope_name(self): def include_concrete_envs(self): """Copy and save the included envs' specs internally""" - lockfile_meta = None root_hash_seen = set() concrete_hash_seen = set() self.included_concrete_spec_data = {} @@ -1201,37 +1221,26 @@ def include_concrete_envs(self): raise SpackEnvironmentError(f"Unable to find env at {env_path}") env = Environment(env_path) - - with open(env.lock_path) as f: - lockfile_as_dict = env._read_lockfile(f) - - # Lockfile_meta must match each env and use at least format version 5 - if lockfile_meta is None: - lockfile_meta = lockfile_as_dict["_meta"] - elif lockfile_meta != lockfile_as_dict["_meta"]: - raise SpackEnvironmentError("All lockfile _meta values must match") - elif lockfile_meta["lockfile-version"] < 5: - raise SpackEnvironmentError("The lockfile format must be at version 5 or higher") + self.included_concrete_spec_data[env_path] = {"roots": [], "concrete_specs": {}} # Copy unique root specs from env - self.included_concrete_spec_data[env_path] = {"roots": []} - for root_dict in lockfile_as_dict["roots"]: + 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 concrete_spec in lockfile_as_dict["concrete_specs"]: - if concrete_spec not in concrete_hash_seen: - self.included_concrete_spec_data[env_path].update( - {"concrete_specs": lockfile_as_dict["concrete_specs"]} + 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(concrete_spec) + concrete_hash_seen.add(dag_hash) - if "include_concrete" in lockfile_as_dict.keys(): - self.included_concrete_spec_data[env_path]["include_concrete"] = lockfile_as_dict[ - "include_concrete" - ] + # Copy transitive include data + transitive = env.included_concrete_spec_data + if transitive: + self.included_concrete_spec_data[env_path]["include_concrete"] = transitive self._read_lockfile_dict(self._to_lockfile_dict()) self.write() @@ -1613,16 +1622,15 @@ def _concretize_separately(self, tests=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): + for uspec in self.user_specs: if uspec not in old_concretized_user_specs: root_specs.append(uspec) - args.append((i, [str(x) for x in uspec_constraints], tests)) + args.append((i, str(uspec), 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_clingo_importable_or_raise() + 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 @@ -1633,7 +1641,7 @@ def _concretize_separately(self, tests=False): # Ensure we have compilers in compilers.yaml to avoid that # processes try to write the config file in parallel - _ = spack.compilers.get_compiler_config(spack.config.CONFIG, init_config=True) + _ = spack.compilers.all_compilers_config(spack.config.CONFIG) # Early return if there is nothing to do if len(args) == 0: @@ -1641,7 +1649,7 @@ def _concretize_separately(self, tests=False): # Solve the environment in parallel on Linux start = time.time() - num_procs = min(len(args), spack.util.cpus.determine_number_of_jobs(parallel=True)) + num_procs = min(len(args), spack.config.determine_number_of_jobs(parallel=True)) # TODO: support parallel concretization on macOS and Windows msg = "Starting concretization" @@ -1948,13 +1956,18 @@ def install_specs(self, specs: Optional[List[Spec]] = None, **install_args): specs = specs if specs is not None else roots # 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() - ) + install_args["overwrite"] = { + *install_args.get("overwrite", ()), + *self._dev_specs_that_need_overwrite(), + } - installs = [(spec.package, {**install_args, "explicit": spec in roots}) for spec in specs] + # Only environment roots are marked explicit + install_args["explicit"] = { + *install_args.get("explicit", ()), + *(s.dag_hash() for s in roots), + } - PackageInstaller(installs).install() + PackageInstaller([spec.package for spec in specs], **install_args).install() def all_specs_generator(self) -> Iterable[Spec]: """Returns a generator for all concrete specs""" @@ -2144,8 +2157,7 @@ def _get_environment_specs(self, recurse_dependencies=True): 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) @@ -2153,10 +2165,25 @@ def _to_lockfile_dict(self): 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 @@ -2174,7 +2201,7 @@ def _to_lockfile_dict(self): # 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, } @@ -2303,7 +2330,7 @@ def filter_specs(self, reader, json_specs_by_hash, order_concretized): 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): @@ -2311,6 +2338,10 @@ def filter_specs(self, reader, json_specs_by_hash, order_concretized): 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 @@ -2467,81 +2498,34 @@ 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) + 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 _concretize_task(packed_arguments) -> Tuple[int, Spec, float]: - index, spec_constraints, tests = packed_arguments - spec_constraints = [Spec(x) for x in spec_constraints] + index, spec_str, tests = packed_arguments with tty.SuppressOutput(msg_enabled=False): start = time.time() - spec = _concretize_from_constraints(spec_constraints, tests) + spec = Spec(spec_str).concretized(tests=tests) return index, spec, time.time() - start 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): @@ -2550,7 +2534,7 @@ 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 @@ -2751,10 +2735,11 @@ def from_lockfile(manifest_dir: Union[pathlib.Path, str]) -> "EnvironmentManifes 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:{environment_name(self.manifest_dir)}" + 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 @@ -2766,12 +2751,8 @@ def __init__(self, manifest_dir: Union[pathlib.Path, str]) -> None: 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]: @@ -2785,7 +2766,7 @@ def _all_matches(self, user_spec: str) -> List[str]: 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) @@ -2800,7 +2781,6 @@ def add_user_spec(self, user_spec: str) -> None: 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 @@ -2815,13 +2795,17 @@ def remove_user_spec(self, user_spec: str) -> None: """ 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. @@ -2833,7 +2817,6 @@ def override_user_spec(self, user_spec: str, idx: int) -> None: 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}" @@ -2846,10 +2829,10 @@ def set_include_concrete(self, include_concrete: List[str]) -> None: Args: include_concrete: list of already existing concrete environments to include """ - self.pristine_configuration[included_concrete_name] = [] + self.configuration[included_concrete_name] = [] for env_path in include_concrete: - self.pristine_configuration[included_concrete_name].append(env_path) + self.configuration[included_concrete_name].append(env_path) self.changed = True @@ -2863,14 +2846,13 @@ def add_definition(self, user_spec: str, list_name: str) -> None: 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: @@ -2884,7 +2866,7 @@ def remove_definition(self, user_spec: str, list_name: str) -> None: 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" @@ -2897,7 +2879,6 @@ def remove_definition(self, user_spec: str, list_name: str) -> None: 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: @@ -2912,7 +2893,7 @@ def override_definition(self, user_spec: str, *, override: str, list_name: str) 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): @@ -2923,7 +2904,6 @@ def override_definition(self, user_spec: str, *, override: str, list_name: str) 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): @@ -2955,7 +2935,6 @@ def set_default_view(self, view: Union[bool, str, pathlib.Path, Dict[str, str]]) 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 @@ -2963,15 +2942,13 @@ def set_default_view(self, view: Union[bool, str, pathlib.Path, Dict[str, str]]) 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 @@ -2984,17 +2961,12 @@ def flush(self) -> None: 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): @@ -3026,64 +2998,65 @@ def included_config_scopes(self) -> List[spack.config.ConfigScope]: SpackEnvironmentError: if the manifest includes a remote file but no configuration stage directory has been identified """ - scopes = [] + 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", []) - env_name = environment_name(self.manifest_dir) 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, str(self.config_stage_dir), skip_existing=True + # 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 [] ) - if not staged_path: - raise SpackEnvironmentError( - "Unable to fetch remote configuration {0}".format(config_path) + 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) ) - config_path = staged_path - elif include_url.scheme: - raise ValueError( - f"Unsupported URL scheme ({include_url.scheme}) for " - f"environment include: {config_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): @@ -3092,24 +3065,22 @@ def included_config_scopes(self) -> List[spack.config.ConfigScope]: if os.path.isdir(config_path): # directories are treated as regular ConfigScopes - config_name = "env:%s:%s" % (env_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) + 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 = "env:%s:%s" % (env_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 + 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 - scopes.append(scope) - if missing: msg = "Detected {0} missing include path(s):".format(len(missing)) msg += "\n {0}".format("\n ".join(missing)) @@ -3126,7 +3097,10 @@ def env_config_scopes(self) -> List[spack.config.ConfigScope]: scopes: List[spack.config.ConfigScope] = [ *self.included_config_scopes, spack.config.SingleFileScope( - self.scope_name, str(self.manifest_file), spack.schema.env.schema, [TOP_LEVEL_KEY] + self.scope_name, + str(self.manifest_file), + spack.schema.env.schema, + yaml_path=[TOP_LEVEL_KEY], ), ] ensure_no_disallowed_env_config_mods(scopes) diff --git a/lib/spack/spack/environment/shell.py b/lib/spack/spack/environment/shell.py index b1d87a48fd7649..bb2dea04c0297e 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 804dc6867b20f1..45a39a4f201d97 100644 --- a/lib/spack/spack/error.py +++ b/lib/spack/spack/error.py @@ -12,6 +12,9 @@ #: 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,60 @@ def __init__(self, provided, required, constraint_type): 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) diff --git a/lib/spack/spack/extensions.py b/lib/spack/spack/extensions.py index a561c50ecf5f84..e13e3f17d42a0a 100644 --- a/lib/spack/spack/extensions.py +++ b/lib/spack/spack/extensions.py @@ -17,6 +17,7 @@ import llnl.util.lang +import spack.cmd import spack.config import spack.error import spack.util.path diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index c803b304c2ca32..54e8a80b8af96a 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -24,12 +24,14 @@ """ 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 @@ -44,7 +46,6 @@ 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 @@ -53,24 +54,11 @@ 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" - " ', 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 @@ -245,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): @@ -297,27 +278,23 @@ def candidate_urls(self): @_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": @@ -331,32 +308,45 @@ def _check_headers(self, headers): # 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): @@ -365,7 +355,7 @@ def _fetch_curl(self, url): 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", @@ -405,8 +395,8 @@ def _fetch_curl(self, url): 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) @@ -473,9 +463,9 @@ def check(self): """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): @@ -484,8 +474,8 @@ def reset(self): """ 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 @@ -498,14 +488,10 @@ def reset(self): 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 @@ -518,7 +504,7 @@ def fetch(self): # 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 @@ -528,8 +514,8 @@ def fetch(self): # 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() @@ -538,12 +524,12 @@ def fetch(self): 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) @@ -554,13 +540,13 @@ def fetch(self): 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) @@ -588,18 +574,18 @@ def __init__(self, **kwargs): # 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, *, exclude: Optional[str] = None): @@ -619,10 +605,10 @@ def archive(self, destination, *, exclude: Optional[str] = None): ) 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 @@ -725,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) @@ -740,6 +732,7 @@ def __init__(self, **kwargs): 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): @@ -777,68 +770,71 @@ def git(self): @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] @@ -857,7 +853,7 @@ def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False): ) with working_dir(dest): - checkout_args = ["checkout", commit] + checkout_args = ["checkout", self.commit] if not debug: checkout_args.insert(1, "--quiet") git(*checkout_args) @@ -869,10 +865,10 @@ def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False): 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 @@ -904,7 +900,7 @@ def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False): # 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 @@ -917,6 +913,79 @@ def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False): 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: @@ -969,7 +1038,7 @@ def protocol_supports_shallow_clone(self): 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 @@ -1293,7 +1362,7 @@ def reset(self): shutil.move(scrubbed, source_path) def __str__(self): - return "[hg] %s" % self.url + return f"[hg] {self.url}" @fetcher @@ -1302,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 @@ -1349,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 @@ -1394,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): @@ -1410,21 +1433,26 @@ def expand(self): 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): @@ -1436,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): @@ -1512,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): @@ -1532,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) @@ -1628,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 { @@ -1649,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): @@ -1678,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) @@ -1706,10 +1737,10 @@ def store(self, fetcher, relative_dest): 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) @@ -1722,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 81a330b4a9392f..278541377989c2 100644 --- a/lib/spack/spack/filesystem_view.py +++ b/lib/spack/spack/filesystem_view.py @@ -10,8 +10,9 @@ 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,7 @@ from llnl.util.tty.color import colorize import spack.config +import spack.directory_layout import spack.paths import spack.projections import spack.relocate @@ -49,19 +51,20 @@ _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. @@ -98,33 +101,48 @@ def view_copy(src: str, dst: str, view, spec: Optional[spack.spec.Spec] = None): 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(f"Can't change the permissions for {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(f"invalid link type for view: '{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: @@ -140,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`. @@ -149,15 +176,17 @@ def __init__(self, root, layout, **kwargs): """ 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): """ @@ -255,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 @@ -638,9 +683,6 @@ 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) - 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 diff --git a/lib/spack/spack/graph.py b/lib/spack/spack/graph.py index 684a6061fb2038..f4ac437df92b38 100644 --- a/lib/spack/spack/graph.py +++ b/lib/spack/spack/graph.py @@ -46,6 +46,7 @@ import spack.repo import spack.spec import spack.tengine +import spack.traverse def find(seq, predicate): diff --git a/lib/spack/spack/hash_types.py b/lib/spack/spack/hash_types.py index 0684667528b5de..4b1bf627d643b9 100644 --- a/lib/spack/spack/hash_types.py +++ b/lib/spack/spack/hash_types.py @@ -37,6 +37,12 @@ def __call__(self, spec): """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 029f9ca7ba8b07..73fad62d6ad3dc 100644 --- a/lib/spack/spack/hooks/__init__.py +++ b/lib/spack/spack/hooks/__init__.py @@ -20,47 +20,41 @@ 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__"): diff --git a/lib/spack/spack/hooks/absolutify_elf_sonames.py b/lib/spack/spack/hooks/absolutify_elf_sonames.py index d203c6d1efb926..5f1c4d0eac1e21 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.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 index 1974c8d3ab4001..05fad82ef9cda8 100644 --- a/lib/spack/spack/hooks/autopush.py +++ b/lib/spack/spack/hooks/autopush.py @@ -23,9 +23,7 @@ def post_install(spec, explicit): # Push the package to all autopush mirrors for mirror in spack.mirror.MirrorCollection(binary=True, autopush=True).values(): - bindist.push_or_raise( - spec, - mirror.push_url, - bindist.PushOptions(force=True, regenerate_index=False, unsigned=not mirror.signed), - ) + 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 2577ce18f43fb4..f17355fe78f225 100644 --- a/lib/spack/spack/hooks/drop_redundant_rpaths.py +++ b/lib/spack/spack/hooks/drop_redundant_rpaths.py @@ -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/install_test.py b/lib/spack/spack/install_test.py index c27e8ea60ada33..f21f4f8cde25bb 100644 --- a/lib/spack/spack/install_test.py +++ b/lib/spack/spack/install_test.py @@ -17,14 +17,23 @@ 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.builder +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 +51,7 @@ 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 +119,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 +289,7 @@ def __init__(self, pkg: Pb): 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 +306,7 @@ def test_logger(self, verbose: bool = False, externals: bool = False): 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"}")) @@ -363,8 +372,7 @@ def phase_tests( 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) @@ -468,16 +476,9 @@ def write_tested_status(self): 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 +638,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 +741,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)] diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index 289a48568d296c..80fe9f2b038e58 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 @@ 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 @@ -37,18 +38,18 @@ import time from collections import defaultdict from gzip import GzipFile -from typing import Dict, Iterator, List, Optional, Set, Tuple +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.config import spack.database import spack.deptypes as dt @@ -58,6 +59,7 @@ 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 @@ -71,25 +73,32 @@ #: 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): @@ -102,13 +111,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: @@ -276,52 +294,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 @@ -451,7 +423,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( @@ -478,7 +450,7 @@ 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: @@ -489,11 +461,16 @@ def _process_binary_cache_tarball( 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 @@ -581,7 +558,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)}") @@ -592,16 +569,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]: @@ -726,7 +701,7 @@ def log(pkg: "spack.package_base.PackageBase") -> None: 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 @@ -760,12 +735,8 @@ def __init__(self, pkg: "spack.package_base.PackageBase", install_args: dict): 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.spec) @@ -789,14 +760,14 @@ def __init__(self, pkg: "spack.package_base.PackageBase", install_args: dict): ) 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: @@ -893,37 +864,42 @@ def traverse_dependencies(self, spec=None, visited=None) -> Iterator["spack.spec 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: @@ -934,26 +910,34 @@ def __init__( # 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,37 +957,23 @@ def __init__( 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 - strict = spack.concretize.Concretizer().check_for_compiler_existence - if ( - not spack.compilers.compilers_for_spec(compiler_spec, arch_spec=arch_spec) - and not strict - ): - # 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) - 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 @@ -1023,14 +993,14 @@ def __ne__(self, other): 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 @@ -1047,8 +1017,7 @@ def _update(self) -> None: 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 @@ -1057,6 +1026,20 @@ def add_dependent(self, pkg_id: str) -> None: 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. @@ -1073,21 +1056,52 @@ def flag_installed(self, installed: List[str]) -> None: 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) @@ -1095,7 +1109,7 @@ def use_cache(self) -> bool: @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) @@ -1105,7 +1119,7 @@ def key(self) -> Tuple[int, int]: """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() @@ -1119,32 +1133,198 @@ def priority(self): 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]] = {} @@ -1165,6 +1345,9 @@ def __init__(self, installs: List[Tuple["spack.package_base.PackageBase", dict]] # 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__}(" @@ -1180,73 +1363,22 @@ def __str__(self) -> str: 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.spec) - 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.spec)) @@ -1289,7 +1421,7 @@ def _check_deps_status(self, request: BuildRequest) -> None: 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 @@ -1297,7 +1429,7 @@ def _check_deps_status(self, request: BuildRequest) -> None: 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: @@ -1320,7 +1452,7 @@ def _check_deps_status(self, request: BuildRequest) -> None: 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. @@ -1328,7 +1460,7 @@ def _prepare_for_install(self, task: BuildTask) -> None: 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 @@ -1349,7 +1481,7 @@ def _prepare_for_install(self, task: BuildTask) -> None: 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.", @@ -1379,7 +1511,7 @@ def _prepare_for_install(self, task: BuildTask) -> None: spack.store.STORE.db.update_explicit(task.pkg.spec, 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) @@ -1411,7 +1543,7 @@ def _cleanup_failed(self, pkg_id: str) -> None: 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 @@ -1483,7 +1615,7 @@ def _ensure_locked( 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 @@ -1535,6 +1667,33 @@ def _ensure_locked( 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. @@ -1556,53 +1715,7 @@ def _add_tasks(self, request: BuildRequest, all_deps): 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(): @@ -1610,7 +1723,7 @@ def _add_tasks(self, request: BuildRequest, all_deps): 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 @@ -1628,93 +1741,29 @@ def _add_tasks(self, request: BuildRequest, all_deps): 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: - if _install_from_cache(pkg, explicit, unsigned): - self._update_installed(task) - if task.compiler: - self._add_compiler_package_to_config(pkg) - return - elif cache_only: - raise 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 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 stage object now and let it be serialized for the child process. That - # way monkeypatch in tests works correctly. - pkg.stage - - # 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, 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 - 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}") + 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) 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 @@ -1724,31 +1773,31 @@ def _next_is_pri0(self) -> bool: 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 @@ -1761,9 +1810,11 @@ def _push_task(self, task: BuildTask) -> None: 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 @@ -1794,9 +1845,9 @@ def _release_lock(self, pkg_id: str) -> None: 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 @@ -1805,71 +1856,39 @@ def _remove_task(self, pkg_id: str) -> Optional[BuildTask]: 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 @@ -1881,34 +1900,34 @@ def _update_failed( 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: @@ -1936,7 +1955,7 @@ def _flag_installed( 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.""" @@ -1955,8 +1974,9 @@ def _init_queue(self) -> None: 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). @@ -1997,8 +2017,8 @@ def install(self) -> None: 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)) @@ -2038,7 +2058,7 @@ def install(self) -> None: tty.warn(f"{pkg_id} does NOT actually have any uninstalled deps left") dep_str = "dependencies" if task.priority > 1 else "dependency" - raise InstallError( + raise spack.error.InstallError( f"Cannot proceed with {pkg_id}: {task.priority} uninstalled " f"{dep_str}: {','.join(task.uninstalled_deps)}", pkg=pkg, @@ -2047,11 +2067,10 @@ def install(self) -> None: # 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. @@ -2061,7 +2080,7 @@ def install(self) -> None: self._update_failed(task) if self.fail_fast: - raise InstallError(fail_fast_err, pkg=pkg) + raise spack.error.InstallError(fail_fast_err, pkg=pkg) continue @@ -2105,11 +2124,6 @@ def install(self) -> None: 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 @@ -2149,8 +2163,6 @@ def install(self) -> None: # 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) @@ -2194,16 +2206,15 @@ def install(self) -> None: ) # 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 @@ -2213,7 +2224,8 @@ def install(self) -> None: # 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() @@ -2226,16 +2238,16 @@ def install(self) -> None: 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)}" @@ -2249,7 +2261,7 @@ def install(self) -> None: 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, ) @@ -2266,7 +2278,7 @@ def __init__(self, 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 the installer from parent process. """ self.pkg = pkg @@ -2294,7 +2306,7 @@ def __init__(self, pkg: "spack.package_base.PackageBase", install_args: dict): 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", {}) @@ -2338,7 +2350,7 @@ def run(self) -> bool: 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 @@ -2379,9 +2391,7 @@ def _install_source(self) -> None: 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 @@ -2472,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) @@ -2482,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 @@ -2517,33 +2563,21 @@ def install(self): 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 655fae2f1728a5..fc5423b5a26a98 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -9,6 +9,8 @@ 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.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 @@ #: 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 ' ()'. - - 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 = {} @@ -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() @@ -809,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): @@ -953,7 +898,7 @@ def _main(argv=None): # version is special as it does not require a command or loading and additional infrastructure if args.version: - print(get_version()) + print(spack.get_version()) return 0 # ------------------------------------------------------------------------ @@ -1038,7 +983,7 @@ 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 main_args.spack_profile or main_args.sorted_profile: @@ -1073,19 +1018,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 index 45681be85395dd..b320671361e1b1 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -21,6 +21,7 @@ from typing import List, Optional, Union import llnl.url +import llnl.util.symlink import llnl.util.tty as tty from llnl.util.filesystem import mkdirp @@ -28,8 +29,8 @@ import spack.config import spack.error import spack.fetch_strategy -import spack.mirror import spack.oci.image +import spack.repo import spack.spec import spack.util.path import spack.util.spack_json as sjson @@ -87,9 +88,8 @@ 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) - ) + f'"{url}" is not a valid mirror URL. ' + f"Scheme must be one of {supported_url_schemes}." ) return Mirror(url) @@ -426,51 +426,74 @@ def _determine_extension(fetcher): return ext -class MirrorReference: - """A ``MirrorReference`` stores the relative paths where you can store a - package/resource in a mirror directory. +class MirrorLayout: + """A ``MirrorLayout`` object describes the relative path of a mirror entry.""" - 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. + def __init__(self, path: str) -> None: + self.path = path - 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 __iter__(self): + """Yield all paths including aliases where the resource can be found.""" + yield self.path - def __init__(self, cosmetic_path, global_path=None): - self.global_path = global_path - self.cosmetic_path = cosmetic_path + def make_alias(self, root: str) -> None: + """Make the entry ``root / self.path`` available under a human readable alias""" + pass - @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 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 -class OCIImageLayout: - """Follow the OCI Image Layout Specification to archive blobs + alias, digest = os.path.join(root, self.alias), os.path.join(root, self.digest_path) - Paths are of the form `blobs//` - """ + alias_dir = os.path.dirname(alias) + relative_dst = os.path.relpath(digest, start=alias_dir) - def __init__(self, digest: spack.oci.image.Digest) -> None: - self.storage_path = os.path.join("blobs", digest.algorithm, digest.digest) + 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): - yield self.storage_path + 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//``""" + + def __init__(self, digest: spack.oci.image.Digest) -> None: + super().__init__(os.path.join("blobs", digest.algorithm, digest.digest)) -def mirror_archive_paths(fetcher, per_package_ref, spec=None): +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 @@ -494,7 +517,7 @@ def mirror_archive_paths(fetcher, per_package_ref, spec=None): if global_ref and ext: global_ref += ".%s" % ext - return MirrorReference(per_package_ref, global_ref) + return DefaultLayout(per_package_ref, global_ref) def get_all_versions(specs): @@ -732,9 +755,9 @@ def create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats): 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) + mirror = MirrorCollection().get(mirror_name) if not mirror: - raise ValueError('no mirror named "{0}"'.format(mirror_name)) + raise ValueError(f'no mirror named "{mirror_name}"') return mirror diff --git a/lib/spack/spack/modules/__init__.py b/lib/spack/spack/modules/__init__.py index b466b2aafb428a..39d696b1369ff1 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 @@ "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 ad7195091b1c74..0caf97463dc7ae 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -46,10 +46,8 @@ 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 @@ -330,67 +328,6 @@ def upstream_module(self, spec, module_type): 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. @@ -596,7 +533,8 @@ def use_name(self): 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 diff --git a/lib/spack/spack/multimethod.py b/lib/spack/spack/multimethod.py index 4c21da3c9101f6..7f4fc0d1b05b0e 100644 --- a/lib/spack/spack/multimethod.py +++ b/lib/spack/spack/multimethod.py @@ -25,14 +25,11 @@ 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 @@ def __call__(self, package_or_builder_self, *args, **kwargs): # 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 @@ def __init__(self, condition): 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 @@ def install(self, prefix): 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 @@ def __enter__(self): 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 fefc66674ec5d3..1b84860d2682cb 100644 --- a/lib/spack/spack/oci/oci.py +++ b/lib/spack/spack/oci/oci.py @@ -6,27 +6,20 @@ 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.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 +30,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 +52,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 +123,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,7 +147,6 @@ 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. @@ -154,8 +170,6 @@ def upload_blob( 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 @@ -364,15 +378,12 @@ 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// as the cache path, which follows # the OCI Image Layout Specification. What's missing though, # is the `oci-layout` and `index.json` files, which are # required by the spec. return spack.stage.Stage( - fetch_strategy, - mirror_paths=spack.mirror.OCIImageLayout(digest), - name=digest.digest, - keep=keep, + fetch_strategy, mirror_paths=spack.mirror.OCILayout(digest), name=digest.digest, keep=keep ) diff --git a/lib/spack/spack/oci/opener.py b/lib/spack/spack/oci/opener.py index 0717101274c477..906d5d2b92c60b 100644 --- a/lib/spack/spack/oci/opener.py +++ b/lib/spack/spack/oci/opener.py @@ -22,7 +22,6 @@ import spack.config import spack.mirror import spack.parser -import spack.repo import spack.util.web from .image import ImageReference @@ -418,18 +417,27 @@ def ensure_status(request: urllib.request.Request, response: HTTPResponse, statu ) -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 22a5ea48e78a14..2b60c62525846a 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 6657020dfffbc3..00000000000000 --- 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 d6fa4fd2fae2fd..00000000000000 --- 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 799f183d11f391..7b41ee7a13ef70 100644 --- a/lib/spack/spack/operating_systems/mac_os.py +++ b/lib/spack/spack/operating_systems/mac_os.py @@ -143,6 +143,7 @@ def __init__(self): "12": "monterey", "13": "ventura", "14": "sonoma", + "15": "sequoia", } version = macos_version() diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index d0b7beda1d6d49..bf8538032ae462 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -11,6 +11,8 @@ from os import chdir, environ, getcwd, makedirs, mkdir, remove, removedirs from shutil import move, rmtree +from spack.error import InstallError + # Emulate some shell commands for convenience env = environ cd = chdir @@ -73,6 +75,7 @@ from spack.build_systems.waf import WafPackage from spack.build_systems.xorg import XorgPackage from spack.builder import run_after, run_before +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 ( @@ -84,12 +87,7 @@ 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 ( @@ -101,9 +99,10 @@ install_dependency_symlinks, on_package_attributes, ) +from spack.package_completions import * from spack.spec import InvalidSpecDetected, Spec -from spack.util.cpus import determine_number_of_jobs from spack.util.executable import * +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, diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index 46f9860932d777..ef2f27cca63ab2 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -15,11 +15,10 @@ import functools import glob import hashlib -import inspect +import importlib import io import os import re -import shutil import sys import textwrap import time @@ -33,20 +32,18 @@ from llnl.util.lang import classproperty, memoized from llnl.util.link_tree import LinkTree +import spack.builder 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.error import spack.fetch_strategy as fs import spack.hooks import spack.mirror -import spack.mixins import spack.multimethod import spack.patch -import spack.paths import spack.repo import spack.spec import spack.store @@ -54,18 +51,11 @@ import spack.util.environment import spack.util.path import spack.util.web +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.install_test import PackageTest, TestSuite +from spack.solver.version_order import concretization_version_order from spack.stage import DevelopStage, ResourceStage, Stage, StageComposite, compute_stage_name -from spack.util.executable import ProcessError, which from spack.util.package_hash import package_hash from spack.version import GitVersion, StandardVersion @@ -115,11 +105,9 @@ def preferred_version(pkg: "PackageBase"): Arguments: 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: @@ -161,7 +149,11 @@ def windows_establish_runtime_linkage(self): 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() @@ -192,13 +184,12 @@ def __init__(cls, name, bases, attr_dict): # 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): @@ -241,10 +232,7 @@ def determine_spec_details(cls, prefix, objs_in_prefix): 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(): @@ -257,27 +245,23 @@ def determine_spec_details(cls, prefix, objs_in_prefix): 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) @@ -455,10 +439,11 @@ def _by_name( 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): +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(): @@ -468,6 +453,45 @@ def _names(when_indexed_dictionary): 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 + + class RedistributionMixin: """Logic for determining whether a Package is source/binary redistributable. @@ -520,19 +544,16 @@ class PackageBase(WindowsRPath, PackageViewMixin, RedistributionMixin, metaclass 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``). @@ -554,7 +575,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, RedistributionMixin, metaclass 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 @@ -600,7 +620,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, RedistributionMixin, metaclass 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[str, Tuple["spack.variant.Variant", "spack.spec.Spec"]] + variants: Dict["spack.spec.Spec", Dict[str, "spack.variant.Variant"]] languages: Dict["spack.spec.Spec", Set[str]] #: By default, packages are not virtual @@ -617,10 +637,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, RedistributionMixin, metaclass #: 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 @@ -740,7 +756,7 @@ def __init__(self, spec): raise ValueError(msg.format(self)) # init internal variables - self._stage = None + self._stage: Optional[StageComposite] = None self._fetcher = None self._tester: Optional["PackageTest"] = None @@ -748,11 +764,6 @@ def __init__(self, spec): self._fetch_time = 0.0 self.win_rpath = fsys.WindowsSimulatedRPath(self) - - if self.is_extension: - pkg_cls = spack.repo.PATH.get_pkg_class(self.extendee_spec.name) - pkg_cls(self.extendee_spec)._check_extendable() - super().__init__() @classmethod @@ -763,6 +774,72 @@ def dependency_names(cls): 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, @@ -873,7 +950,7 @@ def module(cls): 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): @@ -889,7 +966,7 @@ def fullname(cls): 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)) @@ -926,6 +1003,32 @@ def global_license_file(self): self.global_license_dir, self.name, os.path.basename(self.license_files[0]) ) + # 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") or self.spec.satisfies("%pgi"): + # 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: @@ -988,6 +1091,15 @@ def update_external_dependencies(self, extendee_spec=None): """ pass + 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. @@ -1077,9 +1189,10 @@ def _make_resource_stage(self, root_stage, resource): root=root_stage, resource=resource, name=self._resource_stage(resource), - mirror_paths=spack.mirror.mirror_archive_paths( + mirror_paths=spack.mirror.default_mirror_layout( resource.fetcher, os.path.join(self.name, pretty_resource_name) ), + mirrors=spack.mirror.MirrorCollection(source=True).values(), path=self.path, ) @@ -1091,7 +1204,7 @@ def _make_root_stage(self, fetcher): # 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.mirror.default_mirror_layout( fetcher, os.path.join(self.name, pretty_name), self.spec ) # Construct a path where the stage should build.. @@ -1100,6 +1213,7 @@ def _make_root_stage(self, fetcher): stage = Stage( fetcher, mirror_paths=mirror_paths, + mirrors=spack.mirror.MirrorCollection(source=True).values(), name=stage_name, path=self.path, search_fn=self._download_search, @@ -1115,10 +1229,9 @@ def _make_stage(self): if not link_format: link_format = "build-{arch}-{hash:7}" stage_link = self.spec.format_path(link_format) - return DevelopStage(compute_stage_name(self.spec), dev_path, stage_link) - - # To fetch the current version - source_stage = self._make_root_stage(self.fetcher) + 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() @@ -1157,7 +1270,7 @@ def stage(self): 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 @@ -1232,18 +1345,6 @@ def install_configure_args_path(self): """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.23. 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): @@ -1447,12 +1548,11 @@ def do_fetch(self, mirror_only=False): return checksum = spack.config.get("config:checksum") - fetch = self.stage.needs_fetching 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." @@ -1557,13 +1657,11 @@ def do_patch(self): 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. @@ -1688,8 +1786,7 @@ def content_hash(self, content=None): # 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)) @@ -1731,7 +1828,7 @@ def _has_make_target(self, target): 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") @@ -1756,13 +1853,22 @@ def _has_make_target(self, target): # # 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) @@ -1781,7 +1887,7 @@ def _if_make_target_execute(self, target, *args, **kwargs): """ 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. @@ -1792,7 +1898,7 @@ def _has_ninja_target(self, target): 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"): @@ -1821,7 +1927,7 @@ def _if_ninja_target_execute(self, target, *args, **kwargs): """ 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 @@ -1840,70 +1946,6 @@ def _resource_stage(self, resource): 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.23. 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( @@ -1927,178 +1969,6 @@ def do_test(self, dirty=False, externals=False): 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. @@ -2335,39 +2205,6 @@ def do_uninstall(self, force=False): # 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 @@ -2446,9 +2283,18 @@ def rpath(self): # 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)) @@ -2565,20 +2411,6 @@ def __init__(self, spec, dependents): 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.""" diff --git a/lib/spack/spack/package_completions.py b/lib/spack/spack/package_completions.py new file mode 100644 index 00000000000000..b985d770932c46 --- /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 117308e84e2f19..0204e156f11fb1 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 @@ def preferred_variants(cls, pkg_name): # 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 29e335d65e7ad1..23739b6841ce0a 100644 --- a/lib/spack/spack/parser.py +++ b/lib/spack/spack/parser.py @@ -70,6 +70,7 @@ 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 @@ def next_spec( 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 @@ def next_spec( 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 @@ def all_specs(self) -> List["spack.spec.Spec"]: 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 @@ def parse( 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 @@ def parse( 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 @@ def parse( 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 @@ def parse( 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 @@ def parse( 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 531445b4f95701..a0f4152317c1e9 100644 --- a/lib/spack/spack/patch.py +++ b/lib/spack/spack/patch.py @@ -4,19 +4,18 @@ # 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 +from typing import Any, Dict, Optional, Tuple, Type, Union import llnl.util.filesystem from llnl.url import allowed_archive import spack import spack.error -import spack.fetch_strategy as fs +import spack.fetch_strategy import spack.mirror import spack.repo import spack.stage @@ -65,6 +64,9 @@ def apply_patch( patch(*args) +PatchPackageType = Union["spack.package_base.PackageBase", Type["spack.package_base.PackageBase"]] + + class Patch: """Base class for patches. @@ -77,7 +79,7 @@ class Patch: def __init__( self, - pkg: "spack.package_base.PackageBase", + pkg: PatchPackageType, path_or_url: str, level: int, working_dir: str, @@ -111,7 +113,7 @@ def apply(self, stage: "spack.stage.Stage") -> None: 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, self.reverse) @@ -159,7 +161,7 @@ class FilePatch(Patch): def __init__( self, - pkg: "spack.package_base.PackageBase", + pkg: PatchPackageType, relative_path: str, level: int, working_dir: str, @@ -182,8 +184,8 @@ def __init__( # search mro to look for the file 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 @@ -242,7 +244,7 @@ class UrlPatch(Patch): def __init__( self, - pkg: "spack.package_base.PackageBase", + pkg: PatchPackageType, url: str, level: int = 1, *, @@ -273,14 +275,14 @@ def __init__( self.ordering_key = ordering_key if allowed_archive(self.url) and not archive_sha256: - raise PatchDirectiveError( + 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 PatchDirectiveError("URL patches require a sha256 checksum") + raise spack.error.PatchDirectiveError("URL patches require a sha256 checksum") self.sha256 = sha256 def apply(self, stage: "spack.stage.Stage") -> None: @@ -312,22 +314,27 @@ def stage(self) -> "spack.stage.Stage": # Two checksums, one for compressed file, one for its contents if self.archive_sha256 and self.sha256: - fetcher: fs.FetchStrategy = fs.FetchAndVerifyExpandedFile( - self.url, archive_sha256=self.archive_sha256, expanded_sha256=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.mirror.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.mirror.MirrorCollection(source=True).values(), ) return self._stage @@ -361,8 +368,9 @@ def from_dict( """ 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: @@ -393,7 +401,7 @@ def from_dict( sha256 = dictionary["sha256"] checker = Checker(sha256) if patch.path and not checker.check(patch.path): - raise fs.ChecksumError( + 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.", @@ -476,7 +484,7 @@ def patch_for_package(self, sha256: str, pkg: "spack.package_base.PackageBase") """ 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}" ) @@ -486,7 +494,7 @@ def patch_for_package(self, sha256: str, pkg: "spack.package_base.PackageBase") if patch_dict: break else: - raise PatchLookupError( + raise spack.error.PatchLookupError( f"Couldn't find patch for package {pkg.fullname} with sha256: {sha256}" ) @@ -569,15 +577,3 @@ def _index_patches( 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 aa642764215117..84583cd552f531 100644 --- a/lib/spack/spack/paths.py +++ b/lib/spack/spack/paths.py @@ -136,3 +136,16 @@ def _get_system_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/platforms/__init__.py b/lib/spack/spack/platforms/__init__.py index 54d3e6eae52c63..7b7a668fb1a184 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 @@ __all__ = [ "Platform", - "Cray", "Darwin", "Linux", "FreeBSD", @@ -25,7 +23,6 @@ "host", "by_name", "reset", - "prevent_cray_detection", ] #: The "real" platform of the host running Spack. This should not be changed @@ -54,7 +51,6 @@ def __call__(self): 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 d04f2587b0cdea..80ff277d21d06f 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 .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 c165cf9f3375af..866895896610cb 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 @@ def __init__(self, name): 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 @@ def add_target(self, name, target): 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 e8cc833c518053..8fc69ac12e1d20 100644 --- a/lib/spack/spack/platforms/cray.py +++ b/lib/spack/spack/platforms/cray.py @@ -2,253 +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. - """ - if "opt/cray" not in os.environ.get("MODULEPATH", ""): - return False - - craype_type, craype_version = cls.craype_type_and_version() - if craype_type == "XC": - return True - if craype_type == "EX" and craype_version < spack.version.Version("21.10"): - return True - return False - - 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 1b7a5927f43ac2..7ea6a09c5838c4 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -7,7 +7,6 @@ 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 4485550789726e..af9b1a093464ba 100644 --- a/lib/spack/spack/platforms/freebsd.py +++ b/lib/spack/spack/platforms/freebsd.py @@ -6,7 +6,6 @@ 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 2be5b51cb295e2..aede37d8682417 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -6,7 +6,6 @@ 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 9ead66ab273191..8633efc7cb830a 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 c00382e1980d17..8cc89b4b19a7f0 100755 --- a/lib/spack/spack/platforms/windows.py +++ b/lib/spack/spack/platforms/windows.py @@ -7,7 +7,6 @@ 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/relocate.py b/lib/spack/spack/relocate.py index 0bbbba7ef0facd..627c9e2b057061 100644 --- a/lib/spack/spack/relocate.py +++ b/lib/spack/spack/relocate.py @@ -6,30 +6,26 @@ import itertools import os import re +import sys from collections import OrderedDict from typing import List, Optional import macholib.mach_o import macholib.MachO -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): @@ -52,7 +48,7 @@ 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(): @@ -209,23 +205,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 @@ -274,40 +280,14 @@ def modify_macho_object(cur_path, rpaths, deps, idpath, paths_to_paths): 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 - 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 = [] @@ -419,10 +399,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 @@ -430,10 +407,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 @@ -441,10 +415,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) @@ -453,10 +424,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): @@ -565,7 +533,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) @@ -575,7 +543,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): @@ -613,7 +581,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. @@ -663,7 +631,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": @@ -691,7 +659,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 diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index 9b6f104fe5d0df..f3872aed8d1d1f 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -25,7 +25,8 @@ import traceback import types import uuid -from typing import Any, Dict, List, Set, 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 @@ -126,11 +127,35 @@ def exec_module(self, module): 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,9 +174,14 @@ def compute_loader(self, fullname): # 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 @@ -165,7 +195,7 @@ def compute_loader(self, fullname): # 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 +216,9 @@ def compute_loader(self, fullname): 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 +271,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 +294,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 +314,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 +365,9 @@ def __init__(self, namespace): 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)) @@ -645,33 +675,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,50 +740,34 @@ def remove(self, repo): 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_set(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): + def _all_package_names(self, include_virtuals: bool) -> List[str]: """Return all unique package names in all repositories.""" 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) @@ -758,53 +783,52 @@ def packages_with_tags(self, *tags: str, full: bool = False) -> Set[str]: 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): + def providers_for(self, virtual_spec: "spack.spec.Spec") -> List["spack.spec.Spec"]: providers = [ spec - for spec in self.provider_index.providers_for(vpkg_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() @@ -815,7 +839,7 @@ def last_mtime(self): """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. @@ -840,17 +864,20 @@ def repo_for_pkg(self, spec): 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) @@ -863,26 +890,26 @@ def dump_provenance(self, spec, path): """ 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 @@ -894,7 +921,7 @@ def is_virtual(self, pkg_name): 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. @@ -908,6 +935,16 @@ def is_virtual_safe(self, pkg_name): 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. @@ -915,18 +952,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' @@ -939,20 +986,20 @@ def check(condition, msg): # 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 @@ -964,23 +1011,26 @@ def check(condition, msg): 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 @@ -999,18 +1049,21 @@ def real_name(self, import_name): 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: @@ -1021,14 +1074,14 @@ def _read_config(self): 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 @@ -1049,16 +1102,13 @@ def get(self, spec): # 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. @@ -1066,7 +1116,7 @@ def dump_provenance(self, spec, path): """ 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) @@ -1083,17 +1133,13 @@ def dump_provenance(self, spec, path): 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) @@ -1103,42 +1149,40 @@ def index(self): 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.py`` @@ -1151,23 +1195,23 @@ def filename_for_package_name(self, pkg_name): 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) @@ -1176,7 +1220,7 @@ def packages_with_tags(self, *tags: str) -> Set[str]: 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. @@ -1184,7 +1228,7 @@ def all_package_classes(self): 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 @@ -1201,28 +1245,22 @@ def last_mtime(self): """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 @@ -1234,7 +1272,8 @@ def get_pkg_class(self, pkg_name): 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: @@ -1242,29 +1281,24 @@ def get_pkg_class(self, pkg_name): 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: @@ -1291,15 +1325,29 @@ def partition_package_name(self, pkg_name: str) -> Tuple[str, str]: 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] @@ -1373,12 +1421,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): @@ -1387,7 +1440,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: @@ -1396,11 +1449,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() @@ -1413,20 +1476,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" @@ -1435,7 +1498,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 @@ -1457,8 +1521,10 @@ def add_package(self, name, dependencies=None): Both "dep_type" and "condition" can default to ``None`` in which case ``spack.dependency.default_deptype`` and ``spack.spec.Spec()`` are used. """ + import spack.tengine # avoid circular import + 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) @@ -1517,7 +1583,7 @@ def __init__(self, name, repo=None): 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] @@ -1535,10 +1601,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 9c56e7edbe0722..409810f58a900f 100644 --- a/lib/spack/spack/report.py +++ b/lib/spack/spack/report.py @@ -15,7 +15,6 @@ import llnl.util.lang import spack.build_environment -import spack.fetch_strategy import spack.install_test import spack.installer import spack.package_base diff --git a/lib/spack/spack/reporters/cdash.py b/lib/spack/spack/reporters/cdash.py index 502f89d7641b31..d2da8bbed2a403 100644 --- a/lib/spack/spack/reporters/cdash.py +++ b/lib/spack/spack/reporters/cdash.py @@ -19,10 +19,11 @@ 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 @@ -58,7 +59,8 @@ # 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"] @@ -118,7 +120,7 @@ def __init__(self, configuration: CDashConfiguration): 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): @@ -447,7 +449,7 @@ def upload(self, filename): # 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 5554d89f0a2799..b222fdbad9d287 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/rewiring.py b/lib/spack/spack/rewiring.py index 297b0bd232ca2f..ae7eb0a8d85252 100644 --- a/lib/spack/spack/rewiring.py +++ b/lib/spack/spack/rewiring.py @@ -9,14 +9,14 @@ 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 03fe4039a8b74b..8c04ebdaac490d 100644 --- a/lib/spack/spack/schema/__init__.py +++ b/lib/spack/spack/schema/__init__.py @@ -3,56 +3,68 @@ # # 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 +from spack.error import SpecSyntaxError + + +class DeprecationMessage(typing.NamedTuple): + message: str + error: bool + # jsonschema is imported lazily as it is heavy to import # and increases the start-up time 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 + if not deprecated: + return + + deprecations = { + name: DeprecationMessage(message=x["message"], error=x["error"]) + for x in deprecated + for name in x["names"] + } + # 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: + issues = [entry for entry in instance if entry in deprecations] + if not issues: 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 - - is_error = deprecated["error"] - if not is_error: - warnings.warn(msg) - else: - import jsonschema - - 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, diff --git a/lib/spack/spack/schema/ci.py b/lib/spack/spack/schema/ci.py index 3706415e303825..9f7380ab44160d 100644 --- a/lib/spack/spack/schema/ci.py +++ b/lib/spack/spack/schema/ci.py @@ -11,8 +11,6 @@ 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 @@ "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 @@ }, } -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 @@ } ) -# 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: Dict[str, Any] = { - "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 @@ "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 1df696cda987cc..81460882108c13 100644 --- a/lib/spack/spack/schema/compilers.py +++ b/lib/spack/spack/schema/compilers.py @@ -11,6 +11,26 @@ 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: Dict[str, Any] = { "compilers": { @@ -35,37 +55,20 @@ "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 e1c4d64ce1ca07..0b222d923e1b0f 100644 --- a/lib/spack/spack/schema/concretizer.py +++ b/lib/spack/spack/schema/concretizer.py @@ -55,6 +55,26 @@ "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}, + }, + }, + } + }, + }, "duplicates": { "type": "object", "properties": { diff --git a/lib/spack/spack/schema/config.py b/lib/spack/spack/schema/config.py index fdb57f5b772519..e1072a501bb91e 100644 --- a/lib/spack/spack/schema/config.py +++ b/lib/spack/spack/schema/config.py @@ -11,6 +11,7 @@ from llnl.util.lang import union_dicts +import spack.config import spack.schema.projections #: Properties for inclusion in other schemas @@ -75,7 +76,6 @@ "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"}, @@ -84,7 +84,6 @@ "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"}] @@ -97,12 +96,21 @@ "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 in " + "Spack v0.25.", + "error": False, + }, + ], } } diff --git a/lib/spack/spack/schema/develop.py b/lib/spack/spack/schema/develop.py index 13391dcdb0dc75..8db1220e636dac 100644 --- a/lib/spack/spack/schema/develop.py +++ b/lib/spack/spack/schema/develop.py @@ -13,6 +13,7 @@ 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 8b37f3e236fc68..0adeb7b475ba28 100644 --- a/lib/spack/spack/schema/env.py +++ b/lib/spack/spack/schema/env.py @@ -12,9 +12,7 @@ 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 @@ -27,8 +25,6 @@ "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 @@ -59,15 +55,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/gitlab_ci.py b/lib/spack/spack/schema/gitlab_ci.py deleted file mode 100644 index a180777acae74d..00000000000000 --- a/lib/spack/spack/schema/gitlab_ci.py +++ /dev/null @@ -1,125 +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: 15- -""" -from typing import Any, Dict - -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": True, - "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: Dict[str, Any] = {"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/packages.py b/lib/spack/spack/schema/packages.py index 847b15d91385fa..2193a6254167a0 100644 --- a/lib/spack/spack/schema/packages.py +++ b/lib/spack/spack/schema/packages.py @@ -11,6 +11,8 @@ import spack.schema.environment +from .compilers import extra_rpaths, flags, implicit_rpaths + permissions = { "type": "object", "additionalProperties": False, @@ -107,7 +109,6 @@ "require": requirements, "prefer": prefer_and_conflict, "conflict": prefer_and_conflict, - "version": {}, # Here only to warn users on ignored properties "target": { "type": "array", "default": [], @@ -138,14 +139,6 @@ }, "variants": variants, }, - "deprecatedProperties": { - "properties": ["version"], - "message": "setting version preferences in the 'all' section of packages.yaml " - "is deprecated and will be removed in v0.23\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": { @@ -163,14 +156,11 @@ # 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", @@ -184,7 +174,16 @@ "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, }, }, }, @@ -193,18 +192,6 @@ }, }, }, - "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.23.\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, - }, } }, } diff --git a/lib/spack/spack/schema/view.py b/lib/spack/spack/schema/view.py index 6c24501ba9d2ce..d3e983167f0c34 100644 --- a/lib/spack/spack/schema/view.py +++ b/lib/spack/spack/schema/view.py @@ -11,6 +11,7 @@ from typing import Any, Dict import spack.schema +import spack.schema.projections projections_scheme = spack.schema.projections.properties["projections"] diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 46e892a835cc97..940aae0a72b608 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -23,33 +23,33 @@ 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.bootstrap.core import spack.compilers +import spack.concretize import spack.config -import spack.config as sc import spack.deptypes as dt -import spack.directives import spack.environment as ev import spack.error import spack.package_base import spack.package_prefs -import spack.parser import spack.platforms import spack.repo import spack.spec import spack.store import spack.util.crypto -import spack.util.elf 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 spack.config import get_mark_from_yaml_data +from spack.error import SpecSyntaxError from .core import ( AspFunction, @@ -64,6 +64,7 @@ parse_term, ) from .counter import FullDuplicatesCounter, MinimalDuplicatesCounter, NoDuplicatesCounter +from .version_order import concretization_version_order GitOrStandardVersion = Union[spack.version.GitVersion, spack.version.StandardVersion] @@ -116,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() @@ -124,8 +127,14 @@ def __str__(self): @contextmanager -def spec_with_name(spec, name): +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 + old_name = spec.name spec.name = name try: @@ -282,16 +291,14 @@ def _create_counter(specs: List[spack.spec.Spec], tests: bool): return NoDuplicatesCounter(specs, tests=tests) -def all_compilers_in_config(configuration): - return spack.compilers.all_compilers_from(configuration) - - 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 all_compilers_in_config(spack.config.CONFIG) if c.default_libc + c.default_libc + for c in spack.compilers.all_compilers_from(spack.config.CONFIG) + if c.default_libc } if libcs: @@ -314,6 +321,10 @@ def using_libc_compatibility() -> bool: 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): """Extend a list of flags, preserving order and precedence. @@ -512,7 +523,12 @@ def _compute_specs_from_answer_set(self): node = SpecBuilder.make_node(pkg=providers[0]) candidate = answer.get(node) - if candidate and candidate.satisfies(input_spec): + if candidate and candidate.build_spec.satisfies(input_spec): + if not candidate.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: @@ -575,20 +591,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(), - not version.is_prerelease(), - 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) @@ -606,7 +608,7 @@ def _external_config_with_implicit_externals(configuration): if not using_libc_compatibility(): return packages_yaml - for compiler in all_compilers_in_config(configuration): + 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} @@ -615,8 +617,9 @@ def _external_config_with_implicit_externals(configuration): 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): @@ -703,12 +706,13 @@ def handle_error(self, msg, *args): 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") @@ -744,7 +748,7 @@ def on_model(model): 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) @@ -840,8 +844,6 @@ def solve(self, setup, specs, reuse=None, output=None, control=None, allow_depre 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, "display.lp")) if not setup.concretize_everything: self.control.load(os.path.join(parent_dir, "when_possible.lp")) @@ -890,7 +892,7 @@ def on_model(model): 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 @@ -1018,6 +1020,102 @@ def __iter__(self): 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" + + +class ConditionIdContext(SourceContext): + """Derived from a ``ConditionContext``: for clause-sets generated by + imposed/required specs, stores an associated transform. + + This is primarily used for tracking whether we are generating clauses + in the context of a required spec, or for an imposed spec. + + 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.""" @@ -1041,6 +1139,7 @@ def __init__(self, tests: bool = False): 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 = ConcreteSpecsByHash() @@ -1131,7 +1230,7 @@ def target_ranges(self, spec, single_target_fn): def conflict_rules(self, pkg): 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, name=pkg.name, msg=when_spec_msg) + when_spec_id = self.condition(when_spec, required_name=pkg.name, msg=when_spec_msg) for conflict_spec, conflict_msg in conflict_specs: conflict_spec = spack.spec.Spec(conflict_spec) @@ -1147,7 +1246,9 @@ def conflict_rules(self, pkg): 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, name=conflict_spec.name or pkg.name, msg=conflict_spec_msg + conflict_spec, + required_name=conflict_spec.name or pkg.name, + msg=conflict_spec_msg, ) self.gen.fact( fn.pkg_fact( @@ -1161,7 +1262,7 @@ def package_languages(self, pkg): 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, name=pkg.name, msg=condition_msg) + 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() @@ -1193,8 +1294,9 @@ def compiler_facts(self): 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)) + self.gen.fact(fn.compiler_flag(compiler_id, flag_type, flag, flag_group)) if compiler.available: self.gen.fact(fn.compiler_available(compiler_id)) @@ -1275,103 +1377,123 @@ def effect_rules(self): 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)) + + # when=True means unconditional, so no need for conditional values + if getattr(value, "when", True) is True: + continue + + # now we have to handle conditional values + quoted_value = spack.parser.quote_if_needed(str(value)) + vstring = f"{name}={quoted_value}" + variant_has_value = spack.spec.Spec(vstring) + + 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 '{quoted_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)) - ) + # We know the value is never allowed statically (when was false), 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, - transform: Optional[TransformFunction] = None, + context: ConditionIdContext, ) -> int: """Get the id for one half of a condition (either a trigger or an imposed constraint). @@ -1385,15 +1507,15 @@ def _get_condition_id( """ pkg_cache = cache[named_cond.name] - named_cond_key = (str(named_cond), transform) + 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) - if transform: - requirements = transform(named_cond, requirements) + 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 @@ -1402,50 +1524,61 @@ 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 """ - name = required_spec.name or name - if not name: + required_name = required_spec.name or required_name + if not required_name: raise ValueError(f"Must provide a name for anonymous condition: '{required_spec}'") - with spec_with_name(required_spec, name): + if not context: + context = ConditionContext() + context.transform_imposed = remove_node + + 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}'") + + 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. condition_id = next(self._id_counter) - self.gen.fact(fn.pkg_fact(required_spec.name, fn.condition(condition_id))) - self.gen.fact(fn.condition_reason(condition_id, msg)) - + requirement_context = context.requirement_context() trigger_id = self._get_condition_id( - required_spec, cache=self._trigger_cache, body=True, transform=transform_required + 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 + impose_context = context.impose_context() effect_id = self._get_condition_id( - imposed_spec, cache=self._effect_cache, body=False, transform=transform_imposed + 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)) @@ -1453,8 +1586,8 @@ def condition( 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"): @@ -1473,7 +1606,7 @@ def package_provider_rules(self, pkg): continue msg = f"{pkg.name} provides {vpkg} when {when}" - condition_id = self.condition(when, vpkg, pkg.name, msg) + 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, vpkg.name)) ) @@ -1481,7 +1614,7 @@ def package_provider_rules(self, pkg): 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: @@ -1526,14 +1659,14 @@ def dependency_holds(input_spec, requirements): 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() @@ -1582,7 +1715,9 @@ def emit_facts_from_requirement_rules(self, rules: List[RequirementRule]): if rule.condition != spack.spec.Spec(): msg = f"condition to activate requirement {requirement_grp_id}" try: - main_condition_id = self.condition(rule.condition, name=pkg_name, msg=msg) + main_condition_id = self.condition( + rule.condition, required_name=pkg_name, msg=msg + ) except Exception as e: if rule.kind != RequirementKind.DEFAULT: raise RuntimeError( @@ -1611,17 +1746,21 @@ def emit_facts_from_requirement_rules(self, rules: List[RequirementRule]): 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, + 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 @@ -1672,8 +1811,12 @@ def external_packages(self): 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 # Check if the external package is buildable. If it is @@ -1689,19 +1832,45 @@ def external_packages(self): spack.spec.parse_with_version_concrete(x["spec"]) for x in externals ] - external_specs = [] + selected_externals = set() if spec_filters: for current_filter in spec_filters: current_filter.factory = lambda: candidate_specs - external_specs.extend(current_filter.selected_specs()) - else: - external_specs.extend(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::externals. This means: + # + # packages::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)) @@ -1711,19 +1880,6 @@ def external_packages(self): 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, requirements): - return requirements + [ - fn.attr("external_conditions_hold", input_spec.name, local_idx) - ] - - self.condition(spec, spec, msg=msg, transform_imposed=external_imposition) - self.possible_versions[spec.name].add(spec.version) - self.gen.newline() - self.trigger_rules() self.effect_rules() @@ -1736,23 +1892,19 @@ def preferred_variants(self, pkg_name): 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) ) @@ -1780,6 +1932,7 @@ def spec_clauses( 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. @@ -1795,6 +1948,7 @@ def spec_clauses( transitive=transitive, expand_hashes=expand_hashes, concrete_build_deps=concrete_build_deps, + context=context, ) except RuntimeError as exc: msg = str(exc) @@ -1811,6 +1965,7 @@ def _spec_clauses( 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. @@ -1822,6 +1977,8 @@ def _spec_clauses( 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`` @@ -1835,6 +1992,8 @@ def _spec_clauses( 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)) @@ -1851,41 +2010,27 @@ def _spec_clauses( # variants for vname, variant in sorted(spec.variants.items()): - values = variant.value - if not isinstance(values, (list, tuple)): - values = [values] + # 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 - for value in values: - # * is meaningless for concretization -- just for matching - if value == "*": - continue + 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 + ) - # 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 = self.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) - ) + # 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)) clauses.append(f.variant_value(spec.name, vname, 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))) # compiler and compiler version if spec.compiler: @@ -1910,12 +2055,21 @@ def _spec_clauses( 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: @@ -1935,6 +2089,11 @@ def _spec_clauses( 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) @@ -1990,6 +2149,7 @@ def _spec_clauses( body=body, expand_hashes=expand_hashes, concrete_build_deps=concrete_build_deps, + context=context, ) ) @@ -2007,7 +2167,7 @@ def define_package_versions_and_validate_preferences( # 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: @@ -2041,7 +2201,7 @@ def define_package_versions_and_validate_preferences( 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)" ) @@ -2063,7 +2223,7 @@ def define_ad_hoc_versions_from_specs( # 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): @@ -2324,7 +2484,7 @@ def _all_targets_satisfiying(single_constraint): 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(","): @@ -2339,15 +2499,15 @@ def _all_targets_satisfiying(single_constraint): 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 @@ -2377,9 +2537,16 @@ def concrete_specs(self): # - 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): @@ -2431,7 +2598,7 @@ def setup( if using_libc_compatibility(): for libc in self.libcs: - self.gen.fact(fn.allowed_libc(libc.name, libc.version)) + self.gen.fact(fn.host_libc(libc.name, libc.version)) if not allow_deprecated: self.gen.fact(fn.deprecated_versions_not_allowed()) @@ -2509,6 +2676,10 @@ def setup( 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: @@ -2583,10 +2754,6 @@ def define_runtime_constraints(self): continue current_libc = compiler.compiler_obj.default_libc - # If this is a compiler yet to be built (config:install_missing_compilers:true) - # infer libc from the Python process - if not current_libc and compiler.compiler_obj.cc is None: - current_libc = spack.util.libc.libc_from_current_python_process() if using_libc_compatibility() and current_libc: recorder("*").depends_on( @@ -2618,7 +2785,9 @@ def literal_specs(self, specs): 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] @@ -2666,7 +2835,7 @@ def validate_and_define_versions_from_requirements( # 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" ) @@ -2720,6 +2889,7 @@ 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") @@ -2728,15 +2898,14 @@ class _Head: 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") + 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") @@ -2745,9 +2914,7 @@ class _Body: 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") + propagate = fn.attr("propagate") class ProblemInstanceBuilder: @@ -2786,6 +2953,9 @@ def h1(self, header: str) -> None: 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") @@ -2793,6 +2963,26 @@ def value(self) -> str: return "".join(self.asp_problem) +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 SpecSyntaxError as e: + mark = get_mark_from_yaml_data(string) + if mark: + msg = f"{mark.name}:{mark.line + 1}: {str(e)}" + raise SpecSyntaxError(msg) from e + raise e + + class RequirementParser: """Parses requirements from package.py files and configuration, and returns rules.""" @@ -2878,11 +3068,11 @@ def rules_from_conflict(self, pkg: "spack.package_base.PackageBase") -> List[Req 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 = sc.parse_spec_from_yaml_string(item) + spec = parse_spec_from_yaml_string(item) condition = spack.spec.Spec() message = None else: - spec = sc.parse_spec_from_yaml_string(item["spec"]) + spec = parse_spec_from_yaml_string(item["spec"]) condition = spack.spec.Spec(item.get("when")) message = item.get("message") return spec, condition, message @@ -2923,10 +3113,10 @@ def _rules_from_requirements( # validate specs from YAML first, and fail with line numbers if parsing fails. constraints = [ - sc.parse_spec_from_yaml_string(constraint) for constraint in constraints + parse_spec_from_yaml_string(constraint) for constraint in constraints ] when_str = requirement.get("when") - when = sc.parse_spec_from_yaml_string(when_str) if when_str else spack.spec.Spec() + when = parse_spec_from_yaml_string(when_str) if when_str else spack.spec.Spec() constraints = [ x @@ -2974,7 +3164,14 @@ class CompilerParser: def __init__(self, configuration) -> None: self.compilers: Set[KnownCompiler] = set() - for c in all_compilers_in_config(configuration): + 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 " @@ -3001,7 +3198,7 @@ def with_input_specs(self, input_specs: List["spack.spec.Spec"]) -> "CompilerPar Args: input_specs: specs to be concretized """ - strict = spack.concretize.Concretizer().check_for_compiler_existence + 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): @@ -3045,7 +3242,7 @@ def add_compiler_from_concrete_spec(self, spec: "spack.spec.Spec") -> None: candidate = KnownCompiler( spec=spec.compiler, os=str(spec.architecture.os), - target=str(spec.architecture.target.microarchitecture.family), + target=str(spec.architecture.target.family), available=False, compiler_obj=None, ) @@ -3214,6 +3411,39 @@ def requires(self, impose: str, *, when: str): 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. @@ -3275,16 +3505,19 @@ def make_node(*, pkg: str) -> NodeArgument: """ return NodeArgument(id="0", pkg=pkg) - def __init__(self, specs, hash_lookup=None): - self._specs = {} + def __init__( + self, specs: List[spack.spec.Spec], *, hash_lookup: Optional[ConcreteSpecsByHash] = None + ): + self._specs: Dict[NodeArgument, spack.spec.Spec] = {} 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: @@ -3293,6 +3526,8 @@ def hash(self, node, h): 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 @@ -3313,21 +3548,17 @@ def node_os(self, node, os): 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)]) @@ -3336,17 +3567,10 @@ def node_compiler_version(self, node, compiler, version): 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.""" @@ -3387,19 +3611,27 @@ def virtual_on_edge(self, parent_node, provider_node, virtual): 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(spack.config.CONFIG)) + (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()) @@ -3410,46 +3642,84 @@ def reorder_flags(self): 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) - msg = "%s does not equal %s" % (set(compiler_flags), set(ordered_compiler_flags)) - assert set(compiler_flags) == set(ordered_compiler_flags), msg + prioritized_groups = sorted(flag_groups, key=lambda x: _order_index(x)) - spec.compiler_flags.update({flag_type: ordered_compiler_flags}) + 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) + + # 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) + + 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') @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 @@ -3507,12 +3777,10 @@ def build_specs(self, function_tuples): continue # 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 + # do not bother calling actions on it spec = self._specs.get(args[0]) if spec and spec.concrete: - if name != "node_flag_source": - continue + continue action(*args) @@ -3551,7 +3819,45 @@ def build_specs(self, function_tuples): 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): @@ -3570,8 +3876,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: @@ -3783,12 +4090,6 @@ class Solver: def __init__(self): self.driver = PyclingoDriver() self.selector = ReusableSpecsSelector(configuration=spack.config.CONFIG) - if spack.platforms.host().name == "cray": - msg = ( - "The Cray platform, i.e. 'platform=cray', will be removed in Spack v0.23. " - "All Cray machines will be then detected as 'platform=linux'." - ) - warnings.warn(msg) @staticmethod def _check_input_and_extract_concrete_specs(specs): @@ -3937,3 +4238,7 @@ def __init__(self, provided, conflicts): # Add attribute expected of the superclass interface self.required = None self.constraint_type = None + + +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 60165338c66280..2195cd6b08b4d1 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -18,39 +18,73 @@ { 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"). + +:- 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 -attr("namespace", node(ID, Package), Namespace) :- attr("node", node(ID, Package)), pkg_fact(Package, namespace(Namespace)). +% 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). @@ -76,7 +110,8 @@ 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. @@ -113,7 +148,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"). @@ -132,7 +166,8 @@ mentioned_in_literal(Root, Mentioned) :- mentioned_in_literal(TriggerID, Root, M 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. + 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)) :- @@ -152,7 +187,8 @@ associated_with_root(RootNode, ChildNode) :- :- attr("root", RootNode), condition_set(RootNode, node(X, Package)), not virtual(Package), - not associated_with_root(RootNode, node(X, 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. @@ -256,6 +292,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"). @@ -348,7 +385,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)) @@ -385,8 +421,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)). @@ -394,13 +432,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)) @@ -416,7 +447,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) @@ -440,8 +472,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. @@ -611,25 +643,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). @@ -749,22 +774,15 @@ required_provider(Provider, Virtual) :- provider(node(Y, Package), node(X, Virtual)), required_provider(Provider, Virtual), Package != Provider. -% TODO: the following two choice rules allow the solver to add compiler +% 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 { @@ -801,89 +819,132 @@ 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. + +% B: Associating applicable package rules with nodes + +% 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)). -% 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. +% 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, _). @@ -893,17 +954,16 @@ 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)). @@ -915,24 +975,23 @@ error(100, "{0} variant '{1}' cannot have values '{2}' and '{3}' as they come fr % 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, _)), attr("node", node(ID, Package)). % The variant is set in an external spec @@ -944,25 +1003,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) @@ -971,23 +1011,121 @@ 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 +%----------------------------------------------------------------------------- + +% Propagation roots have a corresponding attr("propagate", ...) +propagate(RootNode, PropagatedAttribute) :- attr("propagate", RootNode, PropagatedAttribute). +propagate(RootNode, PropagatedAttribute, EdgeTypes) :- attr("propagate", RootNode, PropagatedAttribute, EdgeTypes). + + +% 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), + not attr("variant_set", PackageNode, Variant). + +% 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)). + +%---- +% 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 @@ -1090,10 +1228,18 @@ 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) @@ -1155,12 +1301,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), @@ -1230,7 +1376,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), _). @@ -1241,75 +1387,18 @@ 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), - 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), +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). -% 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). +attr("node_flag", PackageNode, NodeFlag) :- attr("node_flag_set", PackageNode, NodeFlag). -#defined compiler_flag/3. +#defined compiler_flag/4. %----------------------------------------------------------------------------- @@ -1345,8 +1434,10 @@ build(PackageNode) :- not attr("hash", PackageNode, _), attr("node", PackageNode % 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). @@ -1394,6 +1485,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 }. @@ -1405,18 +1506,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 }. @@ -1432,11 +1521,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) @@ -1496,7 +1585,7 @@ 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{ @@ -1506,7 +1595,7 @@ opt_criterion(40, "compiler mismatches that are not from CLI"). 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{ @@ -1526,13 +1615,14 @@ 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,node(X, Package) : version_weight(node(X, Package), Weight), build_priority(node(X, Package), Priority), + not attr("root", node(X, Package)), not runtime(Package) }. diff --git a/lib/spack/spack/solver/core.py b/lib/spack/spack/solver/core.py index 896631290c5ce2..2530981a21dda6 100644 --- a/lib/spack/spack/solver/core.py +++ b/lib/spack/spack/solver/core.py @@ -230,6 +230,13 @@ class NodeArgument(NamedTuple): 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. @@ -248,6 +255,13 @@ def intermediate_repr(sym): 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 diff --git a/lib/spack/spack/solver/display.lp b/lib/spack/spack/solver/display.lp index 358a1628aadd73..675a9d17d278ee 100644 --- a/lib/spack/spack/solver/display.lp +++ b/lib/spack/spack/solver/display.lp @@ -13,6 +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 +40,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 +50,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 79a9b4b7eb8aaa..7bc9ed2e93ce85 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 71ed64b3f88690..e5d7de4966af57 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 2b499d07984568..00000000000000 --- 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 index 28c7c57fdabef9..e9d90c52ac0fb1 100644 --- a/lib/spack/spack/solver/libc_compatibility.lp +++ b/lib/spack/spack/solver/libc_compatibility.lp @@ -10,25 +10,31 @@ %============================================================================= % A package cannot be reused if the libc is not compatible with it -:- 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). - -% Check whether the DAG has any built package -has_built_packages() :- build(X), not external(X). +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")). -% The libc must be chosen among available ones +% 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 allowed_libc(LibcPackage, LibcVersion). + not host_libc(LibcPackage, LibcVersion). % A built node must depend on libc :- build(PackageNode), diff --git a/lib/spack/spack/solver/os_compatibility.lp b/lib/spack/spack/solver/os_compatibility.lp index 651c86b7ae3512..f711860d7701c4 100644 --- a/lib/spack/spack/solver/os_compatibility.lp +++ b/lib/spack/spack/solver/os_compatibility.lp @@ -12,6 +12,7 @@ %============================================================================= % macOS +os_compatible("sequoia", "sonoma"). os_compatible("sonoma", "ventura"). os_compatible("ventura", "monterey"). os_compatible("monterey", "bigsur"). diff --git a/lib/spack/spack/solver/version_order.py b/lib/spack/spack/solver/version_order.py new file mode 100644 index 00000000000000..23d3e390ce0838 --- /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 27c762bd40f786..e5b9cad4312764 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -26,7 +26,7 @@ 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") @@ -51,6 +51,7 @@ import collections import collections.abc import enum +import io import itertools import os import pathlib @@ -60,6 +61,8 @@ import warnings from typing import Any, Callable, Dict, List, Match, Optional, Set, Tuple, Union +import archspec.cpu + import llnl.path import llnl.string import llnl.util.filesystem as fs @@ -67,24 +70,21 @@ 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 @@ -99,7 +99,7 @@ "CompilerSpec", "Spec", "SpecParseError", - "ArchitecturePropagationError", + "UnsupportedPropagationError", "DuplicateDependencyError", "DuplicateCompilerSpecError", "UnsupportedCompilerError", @@ -129,7 +129,7 @@ r"|" # or # OPTION 2: an actual format string r"{" # non-escaped open brace { - r"([%@/]|arch=)?" # optional sigil (to print sigil in color) + 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 @@ -163,14 +163,14 @@ 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 @@ -214,6 +214,12 @@ def ensure_modern_format_string(fmt: str) -> None: ) +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 class ArchSpec: """Aggregate the target platform, the operating system and the target microarchitecture.""" @@ -302,7 +308,10 @@ def _autospec(self, spec_like): 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): @@ -361,10 +370,10 @@ def target(self, value): # 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) @@ -453,10 +462,11 @@ def _target_constrain(self, other: "ArchSpec") -> bool: 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): @@ -474,7 +484,7 @@ def _target_intersection(self, other): # 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) @@ -482,21 +492,21 @@ def _target_intersection(self, other): 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: @@ -549,12 +559,18 @@ def target_concrete(self): ) 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)]) @@ -562,7 +578,10 @@ def to_dict(self): 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): @@ -781,17 +800,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",) @@ -800,23 +851,9 @@ def __init__(self, spec): 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): @@ -824,28 +861,28 @@ def constrain(self, other): 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], "") - 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 x.propagate: + y.propagate = True + + # 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 @@ -858,7 +895,7 @@ def copy(self): 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 @@ -869,7 +906,8 @@ def add_flag(self, flag_type, value, propagation): 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] @@ -925,10 +963,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. @@ -942,26 +976,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 + def __init__(self, store_by_child: bool = True) -> None: + self.edges: Dict[str, List[DependencySpec]] = {} + self.store_by_child = store_by_child - #: 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 __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] @@ -970,8 +998,8 @@ def add(self, edge: DependencySpec): 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())): @@ -988,24 +1016,32 @@ def copy(self): 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 [] @@ -1024,6 +1060,10 @@ def select(self, parent=None, child=None, depflag: dt.DepFlag = dt.ALL): # 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): @@ -1117,7 +1157,7 @@ def _libs_default_handler(spec: "Spec"): 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 @@ -1287,6 +1327,104 @@ def copy(self, *args, **kwargs): 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 @@ -1330,12 +1468,12 @@ def __init__( # 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 @@ -1454,25 +1592,34 @@ def _get_dependency(self, name): 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: @@ -1495,17 +1642,24 @@ def edge_attributes(self) -> str: return f"[{result}]" def dependencies( - self, name=None, deptype: Union[dt.DepTypes, dt.DepFlag] = dt.ALL + self, + name=None, + deptype: Union[dt.DepTypes, dt.DepFlag] = dt.ALL, + *, + virtuals: Optional[List[str]] = None, ) -> List["Spec"]: - """Return a list of direct dependencies (nodes in the DAG). + """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 @@ -1542,19 +1696,9 @@ def _add_flag(self, name, value, propagate): 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() @@ -1568,11 +1712,14 @@ def _add_flag(self, name, value, propagate): 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' @@ -1587,9 +1734,7 @@ def _set_architecture(self, **kwargs): """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) @@ -1598,10 +1743,7 @@ def _set_architecture(self, **kwargs): 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) @@ -1611,19 +1753,28 @@ def _add_dependency(self, spec: "Spec", *, depflag: dt.DepFlag, virtuals: Tuple[ self.add_dependency_edge(spec, depflag=depflag, virtuals=virtuals) return - # Keep the intersection of constraints when a dependency is added multiple times. - # The only restriction, currently, is keeping the same dependency type + # 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: - edge_attrs = f"deptypes={dt.flag_to_chars(depflag).strip()}" - required_dep_str = f"^[{edge_attrs}] {str(spec)}" + # 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}'" + ) - 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) @@ -1648,7 +1799,10 @@ def add_dependency_edge( 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( ( @@ -1657,14 +1811,13 @@ def add_dependency_edge( ) ) - 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)) @@ -1796,14 +1949,14 @@ def short_spec(self): """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 @@ -1908,6 +2061,7 @@ def process_hash_bit_prefix(self, bits): 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() @@ -1923,7 +2077,7 @@ def _lookup_hash(self): 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 ) @@ -2258,14 +2412,16 @@ def override(init_spec, change_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: @@ -2366,7 +2522,7 @@ def spec_builder(d): 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) @@ -2493,22 +2649,27 @@ def from_signed_json(stream): 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 @@ -2530,296 +2691,6 @@ def validate_detection(self): 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 - - # take the spec apart once before starting the main concretization loop and resolving - # deps, but don't break dependencies during concretization as the spec is built. - user_spec_deps = self.flat_dependencies(disconnect=True) - - changed = True - force = False - concretizer = spack.concretize.Concretizer(self.copy()) - while changed: - changes = ( - self.normalize(force, tests, user_spec_deps, disconnect=False), - 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(pkg_cls(dep).provided_virtual_names()) - - 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 when_spec, conflict_list in x.package_class.conflicts.items(): - if x.satisfies(when_spec): - for conflict_spec, msg in conflict_list: - if x.satisfies(conflict_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 @@ -2949,7 +2820,13 @@ def ensure_no_deprecated(root): msg += " For each package listed, choose another spec\n" raise SpecDeprecatedError(msg) - def _new_concretize(self, tests=False): + def concretize(self, tests: Union[bool, List[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() @@ -2983,19 +2860,6 @@ def _new_concretize(self, tests=False): 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: @@ -3099,34 +2963,6 @@ def concretized(self, tests=False): clone.concretize(tests=tests) return clone - def flat_dependencies(self, disconnect: bool = False): - """Build DependencyMap of all of this spec's dependencies with their constraints merged. - - Arguments: - disconnect: if True, disconnect all dependents and dependencies among nodes in this - spec's DAG. - """ - flat_deps = {} - deptree = self.traverse(root=False) - - for spec in deptree: - if spec.name not in flat_deps: - flat_deps[spec.name] = spec - else: - try: - flat_deps[spec.name].constrain(spec) - except spack.error.UnsatisfiableSpecError as e: - # DAG contains two instances of the same package with inconsistent constraints. - raise InconsistentSpecError("Invalid Spec DAG: %s" % e.message) from e - - if disconnect: - for spec in flat_deps.values(): - if not spec.concrete: - spec.clear_edges() - self.clear_dependencies() - - return flat_deps - def index(self, deptype="all"): """Return a dictionary that points to all the dependencies in this spec. @@ -3136,312 +2972,6 @@ def index(self, deptype="all"): 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 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)``. - """ - vt.substitute_abstract_variants(self) - # evaluate when specs to figure out constraints on the dependency. - dep = None - for when_spec, deps_by_name in self.package_class.dependencies.items(): - if not self.satisfies(when_spec): - continue - - for dep_name, dependency in deps_by_name.items(): - if dep_name != name: - continue - - if dep is None: - dep = dp.Dependency(Spec(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.dependency_names(): - # 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, disconnect=True): - """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(disconnect=disconnect) - - 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) - - # remove any leftover dependents outside the spec from, e.g., pruning externals - valid = {id(spec) for spec in all_spec_deps.values()} | {id(self)} - for spec in all_spec_deps.values(): - remove = [dep for dep in spec.dependents() if id(dep) not in valid] - for dep in remove: - del spec._dependents.edges[dep.name] - del dep._dependencies.edges[spec.name] - - # 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. @@ -3462,7 +2992,7 @@ def validate_or_raise(self): # 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): @@ -3479,50 +3009,14 @@ def ensure_valid_variants(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 - not_existing = set(spec.variants) - ( - set(pkg_variants) | set(spack.directives.reserved_names) - ) + not_existing = set(spec.variants) - (set(pkg_variants) | set(vt.reserved_names)) 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) + 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. @@ -3983,7 +3477,7 @@ def patches(self): 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 " @@ -4039,8 +3533,8 @@ def _dup(self, other, deps: Union[bool, dt.DepTypes, dt.DepFlag] = True, clearde 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() @@ -4164,29 +3658,21 @@ def __getitem__(self, name: str): 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: child: Spec = 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)), + 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: @@ -4298,14 +3784,19 @@ def deps(): yield deps + @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 particular pieces of a spec, depending on what is - in the format string. + r"""Prints out attributes of a spec according to a format string. - 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. + 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. + + 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:: @@ -4321,6 +3812,7 @@ def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = Fa architecture.os architecture.target prefix + namespace Some additional special-case properties can be added:: @@ -4329,40 +3821,51 @@ def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = Fa 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}')`` or ``spec.format('{variants..value}')``. - Spec format strings use ``\`` as the escape character. Use - ``\{`` and ``\}`` for literal braces, and ``\\`` for the - literal ``\`` character. + 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. + + 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.: + + { namespace=namespace} + + This evaluates to `` namespace=builtin`` if ``namespace`` is set to ``builtin``, + and to ``""`` if ``namespace`` is ``None``. + + Spec format strings use ``\`` as the escape character. Use ``\{`` and ``\}`` for + literal braces, and ``\\`` for the literal ``\`` character. Args: format_string: string containing the format to be expanded color: True for colorized result; False for no color; None for auto color. + """ ensure_modern_format_string(format_string) @@ -4416,63 +3919,63 @@ def format_attribute(match_object: Match) -> str: raise SpecFormatSigilError(sig, "compilers", attribute) elif sig == "/" and attribute != "abstract_hash": raise SpecFormatSigilError(sig, "DAG hashes", attribute) - elif sig == "arch=": - if attribute not in ("architecture", "arch"): - raise SpecFormatSigilError(sig, "the architecture", attribute) - sig = " arch=" # include space as separator # 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 part == "variants" and 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: - # don't print empty version lists - return "" - - if callable(current): - raise SpecFormatStringError("Attempted to format callable object") - - if current is None: - # not printing anything + 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 color = None - if "variants" in parts: - color = VARIANT_COLOR - elif "architecture" in parts: + 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: color = COMPILER_COLOR elif "version" in parts or "versions" in parts: 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) @@ -4538,8 +4041,12 @@ def format_path( 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) @@ -4562,7 +4069,7 @@ def colored_str(self): 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 @@ -4606,13 +4113,14 @@ def tree( 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 @@ -4630,60 +4138,23 @@ def tree( 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) @@ -4698,9 +4169,7 @@ def os(self): @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): @@ -4724,154 +4193,245 @@ def trim(self, dep_name): 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]] - - 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) - ) + return bool( + bool(self._virtuals_provided(self_root)) + and self._virtuals_provided(self_root) <= other._virtuals_provided(other_root) + ) - # 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)) + 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_cached_hashes(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) - # 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... + # 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 - # Keep all cached hashes because we will invalidate the ones that need - # invalidating later, and we don't want to invalidate unnecessarily + 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) - 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 + def _splice_helper(self, replacement): + """Main loop of a transitive splice. - self_nodes = dict( - (s.name, s.copy(deps=False)) - for s in self.traverse(root=True) - if from_self(s.name, transitive) - ) + 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 - 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 - ) + 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()) - nodes = other_nodes.copy() - nodes.update(self_nodes) + # 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) - 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 + changed = True + while changed: + changed = False + + # 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) - ret = nodes[self.name] + # No splice needed here, keep checking + if analog == node: + continue + + node._splice_detach_and_add_dependents(analog, context=self) + changed = True + break + + def splice(self, other: "Spec", transitive: bool = True) -> "Spec": + """Returns a new, spliced concrete Spec with the "other" dependency and, + optionally, its dependencies. + + Args: + other: alternate dependency + transitive: include other's dependencies + + Returns: a concrete, spliced version of the current Spec - # 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"]) + When transitive is "True", use the dependencies from "other" to reconcile + conflicting dependencies. When transitive is "False", use dependencies from self. - dep.dag_hash() + For example, suppose we have the following dependency graph: - return nodes[self.name] + T + | \ + Z<-H + + 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': + + T* + | \ + Z'<-H' + + 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_cached_hashes(self, ignore=()): """ @@ -4915,9 +4475,176 @@ def attach_git_version_lookup(self): 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 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: "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], "") + + 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]) @@ -4935,7 +4662,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) @@ -5101,11 +4828,15 @@ def _load(cls, data): 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 @@ -5225,7 +4956,7 @@ def extract_info_from_dep(cls, elt, hash): 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 @@ -5286,7 +5017,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 { @@ -5294,7 +5024,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(), } @@ -5338,10 +5068,17 @@ def long_message(self): ) -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): @@ -5422,7 +5159,7 @@ def __init__(self, provided, required): 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") @@ -5471,7 +5208,7 @@ def __init__(self, spec): 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 9779d40fe4b0e2..e62b2608dcbe2f 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 @@ -212,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:]: @@ -228,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 67a81a68eede5b..8b4efcf387b8f2 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,7 +12,7 @@ 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 @@ -34,16 +33,16 @@ import spack.caches import spack.config import spack.error -import spack.fetch_strategy as fs import spack.mirror -import spack.paths 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 @@ -346,15 +345,15 @@ class Stage(LockableStagingDir): similar, and are intended to persist for only one run of spack. """ - #: Most staging is managed by Spack. DIYStage is one exception. - needs_fetching = True requires_patch_success = True def __init__( self, url_or_fetch_strategy, + *, name=None, - mirror_paths=None, + mirror_paths: Optional["spack.mirror.MirrorLayout"] = None, + mirrors: Optional[Iterable["spack.mirror.Mirror"]] = None, keep=False, path=None, lock=True, @@ -363,36 +362,30 @@ def __init__( """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) @@ -408,30 +401,37 @@ def __init__( # 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 + # 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.skip_checksum_for_mirror = True self.srcdir = None - self.mirror_paths = mirror_paths + 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 @@ -464,104 +464,84 @@ def source_path(self): """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), + 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 @@ -599,56 +579,60 @@ def steal_source(self, dest): 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.mirror.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 @@ -656,9 +640,9 @@ def expand_archive(self): 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 @@ -684,7 +668,7 @@ def destroy(self): class ResourceStage(Stage): def __init__( self, - fetch_strategy: fs.FetchStrategy, + fetch_strategy: "fs.FetchStrategy", root: Stage, resource: spack.resource.Resource, **kwargs, @@ -772,8 +756,6 @@ def __init__(self): "cache_mirror", "steal_source", "disable_mirrors", - "needs_fetching", - "requires_patch_success", ] ) @@ -812,6 +794,10 @@ def path(self): def archive_file(self): 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 @@ -822,64 +808,7 @@ def keep(self, value): 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. - """ - - needs_fetching = False - requires_patch_success = 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) - - self.archive_file = None - self.path = path - self.source_path = path - self.created = True - - # DIY stages do nothing as context managers. - def __enter__(self): - pass - - def __exit__(self, exc_type, exc_val, exc_tb): - pass - - def fetch(self, *args, **kwargs): - tty.debug("No need to fetch for DIY.") - - def check(self): - tty.debug("No checksum needed for DIY.") - - def expand_archive(self): - tty.debug("Using source directory: {0}".format(self.source_path)) - - @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 - - def destroy(self): - # No need to destroy DIY stage. - pass - - def cache_local(self): - tty.debug("Sources for DIY stages are not cached") - - class DevelopStage(LockableStagingDir): - needs_fetching = False requires_patch_success = False def __init__(self, name, dev_path, reference_link): @@ -1050,8 +979,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: @@ -1203,7 +1132,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) @@ -1232,20 +1161,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})" @@ -1265,7 +1196,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 dc2d5de54b4372..abd7d9250007c0 100644 --- a/lib/spack/spack/store.py +++ b/lib/spack/spack/store.py @@ -39,9 +39,6 @@ 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 @@ def __init__( 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 @@ def __init__( 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 @@ def __reduce__(self): ) -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 c90dcf84090096..c823e657036fad 100644 --- a/lib/spack/spack/subprocess_context.py +++ b/lib/spack/spack/subprocess_context.py @@ -12,7 +12,7 @@ modifications to global state in memory that must be replicated in the child process. """ - +import importlib import io import multiprocessing import pickle @@ -22,7 +22,7 @@ import spack.config import spack.environment -import spack.main +import spack.paths import spack.platforms import spack.repo import spack.store @@ -72,16 +72,18 @@ def __init__(self, pkg): else: self.pkg = pkg self.env = spack.environment.active_environment() - self.spack_working_dir = spack.main.spack_working_dir + self.spack_working_dir = spack.paths.spack_working_dir self.test_state = TestState() def restore(self): self.test_state.restore() - spack.main.spack_working_dir = self.spack_working_dir + spack.paths.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 if env: spack.environment.activate(env) + # 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 _SERIALIZE else self.pkg return pkg @@ -116,7 +118,7 @@ def __init__(self, module_patches, class_patches): 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 559af56f0c8f21..fd2b252d8353d8 100644 --- a/lib/spack/spack/tag.py +++ b/lib/spack/spack/tag.py @@ -8,11 +8,14 @@ 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 8d0943c28aeb86..00000000000000 --- a/lib/spack/spack/target.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 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) - - # Get rid of compiler flag information before turning the uarch into a dict - uarch_dict = self.microarchitecture.to_dict() - uarch_dict.pop("compilers", None) - return syaml.syaml_dict(uarch_dict.items()) - - 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: - # 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, compiler_version.dotted_numeric_string - ) diff --git a/lib/spack/spack/test/abi.py b/lib/spack/spack/test/abi.py deleted file mode 100644 index 757b8b6861d8dc..00000000000000 --- 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/architecture.py b/lib/spack/spack/test/architecture.py index e41844efb25a43..a029aa4790f91e 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -2,21 +2,15 @@ # 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 archspec.cpu -import llnl.util.filesystem as fs - -import spack.compilers import spack.concretize import spack.operating_systems import spack.platforms -import spack.target from spack.spec import ArchSpec, Spec @@ -25,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() @@ -88,25 +81,6 @@ def test_operating_system_conversion_to_dict(): assert operating_system.to_dict() == {"name": "os", "version": "1.0"} -@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", [ @@ -123,67 +97,6 @@ def test_arch_spec_container_semantic(item, architecture_str): assert item in architecture -@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") -def test_optimization_flags(compiler_spec, target_name, expected_flags, compiler_factory): - target = spack.target.Target(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 = target.optimization_flags(compiler) - 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 = spack.target.Target(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 = target.optimization_flags(compiler) - assert opt_flags == expected_flags - - @pytest.mark.regression("15306") @pytest.mark.parametrize( "architecture_tuple,constraint_tuple", @@ -213,37 +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): - 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 98e6ad83c85555..18994fa88be6f3 100644 --- a/lib/spack/spack/test/audit.py +++ b/lib/spack/spack/test/audit.py @@ -19,14 +19,23 @@ (["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 b30955641f3f88..77b11ce98f66a4 100644 --- a/lib/spack/spack/test/bindist.py +++ b/lib/spack/spack/test/bindist.py @@ -8,7 +8,9 @@ import io import json import os +import pathlib import platform +import shutil import sys import tarfile import urllib.error @@ -16,21 +18,24 @@ import urllib.response from pathlib import Path, PurePath -import py import pytest import archspec.cpu -from llnl.util.filesystem import join_path, visit_directory_tree +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.paths +import spack.spec +import spack.stage import spack.store import spack.util.gpg import spack.util.spack_yaml as syaml @@ -64,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") @@ -222,9 +206,9 @@ def dummy_prefix(tmpdir): @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. @@ -237,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") @@ -271,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. @@ -294,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. @@ -323,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. @@ -336,7 +319,7 @@ 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") @@ -356,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 @@ -374,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 @@ -397,9 +380,7 @@ def fake_dag_hash(spec, length=None): 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""" @@ -428,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""" @@ -465,7 +446,7 @@ def test_generate_index_missing(monkeypatch, tmpdir, mutable_config): assert "libelf" not in cache_list -def test_generate_key_index_failure(monkeypatch): +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") @@ -478,13 +459,13 @@ def push_to_url(*args, **kwargs): 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") + 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") + bindist.generate_key_index("s3://non-existent/fails-uploading", str(tmp_path)) -def test_generate_package_index_failure(monkeypatch, capfd): +def test_generate_package_index_failure(monkeypatch, tmp_path, capfd): def mock_list_url(url, recursive=False): raise Exception("Some HTTP error") @@ -493,15 +474,16 @@ def mock_list_url(url, recursive=False): test_url = "file:///fake/keys/dir" with pytest.raises(GenerateIndexError, match="Unable to generate package index"): - bindist.generate_package_index(test_url) + bindist._url_generate_package_index(test_url, str(tmp_path)) assert ( - f"Warning: Encountered problem listing packages at {test_url}: Some HTTP error" + "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): raise Exception("Test Exception handling") @@ -510,16 +492,16 @@ def mock_list_url(url, recursive=False): url = "file:///fake/keys/dir" with pytest.raises(GenerateIndexError, match=f"Encountered problem listing keys at {url}"): - bindist.generate_key_index(url) + bindist.generate_key_index(url, str(tmp_path)) with pytest.raises(GenerateIndexError, match="Unable to generate package index"): - bindist.generate_package_index(url) + bindist._url_generate_package_index(url, str(tmp_path)) 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. @@ -530,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) @@ -586,9 +568,7 @@ def test_update_sbang(tmpdir, test_mirror): 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_mutable_config -): +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 @@ -679,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"] @@ -1062,10 +1044,10 @@ 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" ) diff --git a/lib/spack/spack/test/bootstrap.py b/lib/spack/spack/test/bootstrap.py index 5f11e2d381e639..603fe90fadafdf 100644 --- a/lib/spack/spack/test/bootstrap.py +++ b/lib/spack/spack/test/bootstrap.py @@ -9,6 +9,7 @@ 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 6ab68659e613b0..5edcbe5673d3a7 100644 --- a/lib/spack/spack/test/build_distribution.py +++ b/lib/spack/spack/test/build_distribution.py @@ -9,38 +9,43 @@ import pytest import spack.binary_distribution as bd -import spack.main +import spack.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.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 d06bda58fdbc48..281d79f8563e7c 100644 --- a/lib/spack/spack/test/build_environment.py +++ b/lib/spack/spack/test/build_environment.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 platform import posixpath @@ -10,18 +9,22 @@ 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.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 @@ -177,11 +180,11 @@ def _set_wrong_cc(x): 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( @@ -476,14 +479,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, context=Context.BUILD) - assert s["a"].package.module.make_jobs == 1 + assert s["pkg-a"].package.module.make_jobs == 1 - spack.build_environment.set_package_py_globals(s["b"].package, context=Context.BUILD) - 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 ) @@ -513,9 +516,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( @@ -529,7 +556,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( @@ -540,7 +567,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( @@ -554,7 +581,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( @@ -564,7 +591,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( @@ -575,24 +602,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") @@ -610,7 +619,7 @@ def test_setting_attributes(self, default_mock_concretization): # 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 @@ -736,3 +745,82 @@ def test_build_system_globals_only_set_on_root_during_build(default_mock_concret 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 97e357b8ebe1c6..8a632ea3b159b3 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 e6cc8906d75dbf..212ec412d3eec9 100644 --- a/lib/spack/spack/test/build_systems.py +++ b/lib/spack/spack/test/build_systems.py @@ -16,9 +16,12 @@ import spack.build_systems.autotools import spack.build_systems.cmake 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 @@ -94,10 +97,10 @@ def test_negative_ninja_check(self, input_dir, test_dir, concretize_and_setup): @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 @@ -129,7 +132,7 @@ def activate(value): 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 @@ -139,12 +142,10 @@ def test_none_is_allowed(self, default_mock_concretization): 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 @@ -154,26 +155,24 @@ def test_libtool_archive_files_are_deleted_by_default( 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") + s = Spec("libtool-deletion").concretized() monkeypatch.setattr(type(s.package.builder), "install_libtool_archives", True) - s.package.do_install(explicit=True) + PackageInstaller([s.package], explicit=True).install() # Assert libtool archives are installed assert os.path.exists(s.package.builder.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() @@ -187,16 +186,12 @@ def test_autotools_gnuconfig_replacement(self, default_mock_concretization, muta 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() @@ -225,7 +220,7 @@ def test_autotools_gnuconfig_replacement_no_gnuconfig(self, mutable_database, mo 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): @@ -274,7 +269,7 @@ def test_cmake_std_args(self, default_mock_concretization): 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" ) diff --git a/lib/spack/spack/test/builder.py b/lib/spack/spack/test/builder.py index 4bd128c3bfb31b..ab611dbaec68c5 100644 --- a/lib/spack/spack/test/builder.py +++ b/lib/spack/spack/test/builder.py @@ -8,7 +8,10 @@ from llnl.util.filesystem import touch +import spack.builder import spack.paths +import spack.repo +import spack.spec @pytest.fixture() diff --git a/lib/spack/spack/test/buildtask.py b/lib/spack/spack/test/buildtask.py index a571e1dccd1c6a..3e90c9ad7e3984 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 bf119d2d509add..4a394680f480b8 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -13,7 +13,6 @@ import spack.build_environment import spack.config -import spack.spec from spack.paths import build_env_path from spack.util.environment import SYSTEM_DIR_CASE_ENTRY, set_env from spack.util.executable import Executable, ProcessError @@ -837,14 +836,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 @@ -857,13 +856,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"], ), ], diff --git a/lib/spack/spack/test/ci.py b/lib/spack/spack/test/ci.py index 4eef036ddb5457..0c9a10814a20c8 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 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 @@ def __init__(self, response_code=200, content_to_read=[]): 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 __call__(self, *args, **kwargs): 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 _fail(self, args): 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_to_build_cache", 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 f9484e2dce0784..2514750b881df9 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 7797aec31c7850..03421ede7725b4 100644 --- a/lib/spack/spack/test/cmd/bootstrap.py +++ b/lib/spack/spack/test/cmd/bootstrap.py @@ -15,6 +15,7 @@ import spack.environment as ev import spack.main import spack.mirror +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 diff --git a/lib/spack/spack/test/cmd/buildcache.py b/lib/spack/spack/test/cmd/buildcache.py index b72d753fc38307..840dd61f1aba86 100644 --- a/lib/spack/spack/test/cmd/buildcache.py +++ b/lib/spack/spack/test/cmd/buildcache.py @@ -7,15 +7,19 @@ 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.mirror import spack.spec import spack.util.url +from spack.installer import PackageInstaller from spack.spec import Spec buildcache = spack.main.SpackCommand("buildcache") @@ -48,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): @@ -180,7 +179,7 @@ def test_buildcache_autopush(tmp_path, install_mockery, mock_fetch): s = Spec("libdwarf").concretized() # Install and generate build cache index - s.package.do_install() + PackageInstaller([s.package], explicit=True).install() metadata_file = spack.binary_distribution.tarball_name(s, ".spec.json") @@ -189,12 +188,7 @@ def test_buildcache_autopush(tmp_path, install_mockery, mock_fetch): 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 @@ -323,7 +317,7 @@ def manifest_insert(manifest, spec, dest_url): def test_buildcache_create_install( mutable_mock_env_path, - install_mockery_mutable_config, + install_mockery, mock_packages, mock_fetch, mock_stage, @@ -385,18 +379,24 @@ 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.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"] @@ -408,10 +408,10 @@ def fake_push(node, push_url, options): 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]) @@ -439,13 +439,13 @@ 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): @@ -453,3 +453,54 @@ def test_skip_no_redistribute(mock_packages, config): 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 308940c268f948..6c20caff887853 100644 --- a/lib/spack/spack/test/cmd/checksum.py +++ b/lib/spack/spack/test/cmd/checksum.py @@ -8,8 +8,8 @@ import pytest import spack.cmd.checksum +import spack.error import spack.package_base -import spack.parser import spack.repo import spack.spec import spack.stage @@ -83,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", [ @@ -305,7 +304,7 @@ def test_checksum_deprecated_version(mock_packages, can_fetch_versions): 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}") diff --git a/lib/spack/spack/test/cmd/ci.py b/lib/spack/spack/test/cmd/ci.py index b0b20bfa6b8caa..36aa992c639c9c 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 @@ -17,21 +18,16 @@ import spack.binary_distribution import spack.ci as ci import spack.cmd.ci -import spack.config 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") @@ -42,7 +38,11 @@ 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() @@ -89,6 +89,35 @@ def mock_git_repo(git, tmpdir): 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:: @@ -106,24 +135,24 @@ def test_specs_staging(config, tmpdir): """ 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_ci_label(spec_a) - spec_b_label = ci._spec_ci_label(spec_a["b"]) - spec_c_label = ci._spec_ci_label(spec_a["c"]) - spec_d_label = ci._spec_ci_label(spec_a["d"]) - spec_e_label = ci._spec_ci_label(spec_a["e"]) - spec_f_label = ci._spec_ci_label(spec_a["f"]) - spec_g_label = ci._spec_ci_label(spec_a["g"]) + 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]) @@ -145,21 +174,13 @@ def test_specs_staging(config, tmpdir): 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: @@ -174,7 +195,7 @@ def test_ci_generate_with_env( - matrix: - [$old-gcc-pkgs] mirrors: - some-mirror: {0} + buildcache-destination: {mirror_url} ci: pipeline-gen: - submapping: @@ -201,94 +222,55 @@ def test_ci_generate_with_env( 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: @@ -299,53 +281,34 @@ def test_ci_generate_with_cdash_token( 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: @@ -356,13 +319,13 @@ def test_ci_generate_with_custom_settings( - 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 @@ -373,78 +336,55 @@ def test_ci_generate_with_custom_settings( 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: @@ -458,60 +398,36 @@ def test_ci_generate_pkg_with_deps( 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: @@ -529,49 +445,25 @@ def test_ci_generate_for_pr_pipeline( 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: @@ -583,86 +475,82 @@ def test_ci_generate_with_external_pkg( - 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 @@ -672,37 +560,19 @@ def create_rebuild_env(tmpdir, pkg_name, broken_tests=False): 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, @@ -712,22 +582,22 @@ def create_rebuild_env(tmpdir, pkg_name, broken_tests=False): 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, @@ -738,32 +608,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) @@ -780,25 +648,24 @@ def test_ci_rebuild_mock_success( def test_ci_rebuild_mock_failure_to_push( - 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, ci_base_environment, monkeypatch, ): pkg_name = "trivial-install-test-package" - rebuild_env = create_rebuild_env(tmpdir, pkg_name) + rebuild_env = create_rebuild_env(tmp_path, pkg_name) # Mock the install script succuess def mock_success(*args, **kwargs): return 0 - monkeypatch.setattr(spack.ci, "process_command", mock_success) + monkeypatch.setattr(ci, "process_command", mock_success) # Mock failure to push to the build cache def mock_push_or_raise(*args, **kwargs): @@ -806,106 +673,32 @@ def mock_push_or_raise(*args, **kwargs): "Encountered problem pushing binary : " ) - monkeypatch.setattr(spack.binary_distribution, "push_or_raise", mock_push_or_raise) + monkeypatch.setattr(spack.binary_distribution.Uploader, "push_or_raise", mock_push_or_raise) - 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) 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) -@pytest.mark.skip(reason="fails intermittently and covered by gitlab ci") -def test_ci_rebuild( - tmpdir, +def test_ci_require_signing( + tmp_path: pathlib.Path, working_env, mutable_mock_env_path, - install_mockery_mutable_config, - mock_packages, - monkeypatch, mock_gnupghome, - mock_fetch, ci_base_environment, - mock_binary_index, -): - 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) - - 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]) - - 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 - - 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] - - 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 - - # 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 - - env_cmd("deactivate") - - -def test_ci_require_signing( - tmpdir, 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: @@ -916,50 +709,45 @@ def test_ci_require_signing( - 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: @@ -968,160 +756,55 @@ def test_ci_nothing_to_rebuild( 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, +@pytest.mark.disable_clean_stage_check +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_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_to_build_cache( - tmpdir, - mutable_mock_env_path, - install_mockery_mutable_config, - mock_packages, - mock_fetch, - mock_stage, - mock_gnupghome, + 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"""\ @@ -1131,9 +814,8 @@ def test_push_to_build_cache( specs: - $packages mirrors: - test-mirror: {mirror_url} + buildcache-destination: {mirror_url} ci: - enable-artifacts-buildcache: True pipeline-gen: - submapping: - match: @@ -1154,24 +836,23 @@ def test_push_to_build_cache( """ ) 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_to_build_cache(s, mirror_url, True) - buildcache_path = os.path.join(mirror_dir.strpath, "build_cache") - # 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: @@ -1190,7 +871,7 @@ def test_push_to_build_cache( 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 @@ -1216,88 +897,64 @@ def test_push_to_build_cache( # 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) + 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) - ci.copy_stage_logs_to_artifacts(concrete_spec, logs_dir.strpath) + 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) - logs_dir_list = os.listdir(logs_dir.strpath) - - assert "spack-build-out.txt" in logs_dir_list - - # 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 = 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 + dl_dir = scratch / "download_dir" + buildcache_cmd("download", "--spec-file", json_path, "--path", str(dl_dir)) + assert len(os.listdir(dl_dir)) == 2 def test_push_to_build_cache_exceptions(monkeypatch, tmp_path, capsys): - def _push_to_build_cache(spec, sign_binaries, mirror_url): - raise Exception("Error: Access Denied") + def push_or_raise(*args, **kwargs): + raise spack.binary_distribution.PushToBuildCacheError("Error: Access Denied") - monkeypatch.setattr(spack.ci, "_push_to_build_cache", _push_to_build_cache) + monkeypatch.setattr(spack.binary_distribution.Uploader, "push_or_raise", push_or_raise) # 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"Permission problem writing to {url}" in capsys.readouterr().err + 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 @@ -1309,12 +966,12 @@ def test_ci_generate_override_runner_attrs( - match: - dependency-install - match: - - a + - pkg-a build-job: tags: - specific-a-2 - match: - - a + - pkg-a build-job-remove: tags: - toplevel2 @@ -1347,163 +1004,94 @@ def test_ci_generate_override_runner_attrs( - 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")) - - 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 -): - """Make sure the post-processing cli workarounds do what they should""" - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ -spack: - specs: - - callpath%gcc@=9.5 - mirrors: - some-mirror: https://my.fake.mirror - ci: - pipeline-gen: - - submapping: - - match: ['%gcc@9.5'] - build-job: - tags: - - 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 + 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" -@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, + tmp_path: pathlib.Path, working_env, mutable_mock_env_path, install_mockery, mock_fetch ): - working_dir = tmpdir.join("working_dir") - - mirror_dir = working_dir.join("mirror") - mirror_url = url_util.path_to_file_url(str(mirror_dir)) + scratch = tmp_path / "working_dir" + mirror_dir = scratch / "mirror" + mirror_url = mirror_dir.as_uri() - spack_yaml_contents = f""" + with open(tmp_path / "spack.yaml", "w") as f: + f.write( + f""" spack: specs: - callpath mirrors: - test-mirror: {mirror_url} + buildcache-destination: {mirror_url} ci: pipeline-gen: - submapping: @@ -1514,29 +1102,21 @@ def test_ci_rebuild_index( - donotcare image: donotcare """ + ) - 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): @@ -1546,148 +1126,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) + yaml_contents = syaml.load(outputfile.read_text()) - active_env.concretize() + 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"]) - 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"] - - def fake_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"): - return False - - 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: @@ -1705,134 +1205,30 @@ def test_ci_subcommands_without_mirror( """ ) - 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 - - -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 = "" + assert "spack ci rebuild-index requires an env containing a mirror" in output - # 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() @@ -1840,7 +1236,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) @@ -1851,68 +1247,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: @@ -1934,48 +1323,40 @@ def test_ci_generate_external_signing_job( - 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: @@ -1984,65 +1365,49 @@ def test_ci_reproduce( 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 @@ -2050,16 +1415,16 @@ def fake_download_and_extract_artifacts(url, work_dir): 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( @@ -2122,208 +1487,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 43441c487c3af3..8b671e495ee008 100644 --- a/lib/spack/spack/test/cmd/clean.py +++ b/lib/spack/spack/test/cmd/clean.py @@ -11,8 +11,10 @@ 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 68d28f5684352d..c0c781cb899324 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 b7d018210b7226..167130816f65b8 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,44 +80,42 @@ 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 diff --git a/lib/spack/spack/test/cmd/compiler.py b/lib/spack/spack/test/cmd/compiler.py index 2fde7fbc929d81..431cdfd78786ad 100644 --- a/lib/spack/spack/test/cmd/compiler.py +++ b/lib/spack/spack/test/cmd/compiler.py @@ -10,6 +10,7 @@ import spack.cmd.compiler import spack.compilers +import spack.config import spack.main import spack.spec import spack.util.pattern @@ -81,34 +82,6 @@ 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.""" @@ -131,7 +104,7 @@ def test_removing_compilers_from_multiple_scopes(mutable_config, mock_packages): @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( @@ -149,7 +122,12 @@ def test_compiler_add(mutable_config, mock_packages, mock_executable): 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()) @@ -229,7 +207,7 @@ 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") diff --git a/lib/spack/spack/test/cmd/concretize.py b/lib/spack/spack/test/cmd/concretize.py index da3cec034d9d97..806675a07c2685 100644 --- a/lib/spack/spack/test/cmd/concretize.py +++ b/lib/spack/spack/test/cmd/concretize.py @@ -10,7 +10,7 @@ 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 6bc19831a5f2b3..93d7c70483a284 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 @@ def update_config(data): 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 9be5704b6779b5..03dc5ec0e646fa 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 @@ -154,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 @@ -207,3 +208,40 @@ def _parse_name_offset(path, v): 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 6a240a0ca7d6bc..49f739b5435dfb 100644 --- a/lib/spack/spack/test/cmd/debug.py +++ b/lib/spack/spack/test/cmd/debug.py @@ -9,15 +9,14 @@ 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 92553b7e535d57..06dbd39458b170 100644 --- a/lib/spack/spack/test/cmd/deconcretize.py +++ b/lib/spack/spack/test/cmd/deconcretize.py @@ -12,29 +12,29 @@ @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 6669be57fe05af..3bb84fce7d8ef3 100644 --- a/lib/spack/spack/test/cmd/deprecate.py +++ b/lib/spack/spack/test/cmd/deprecate.py @@ -5,6 +5,7 @@ import pytest +import spack.spec import spack.store from spack.database import InstallStatuses from spack.main import SpackCommand @@ -14,8 +15,6 @@ 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") @@ -165,3 +164,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 88b85dc1dd9abd..c335ea0ccfd098 100644 --- a/lib/spack/spack/test/cmd/dev_build.py +++ b/lib/spack/spack/test/cmd/dev_build.py @@ -9,9 +9,9 @@ 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,10 +20,7 @@ install = SpackCommand("install") env = SpackCommand("env") -pytestmark = [ - pytest.mark.not_on_windows("does not run on windows"), - pytest.mark.disable_clean_stage_check, -] +pytestmark = [pytest.mark.disable_clean_stage_check] def test_dev_build_basics(tmpdir, install_mockery): @@ -96,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(): @@ -125,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): diff --git a/lib/spack/spack/test/cmd/develop.py b/lib/spack/spack/test/cmd/develop.py index b090f0d21b5f21..c0cbb003ec1e2e 100644 --- a/lib/spack/spack/test/cmd/develop.py +++ b/lib/spack/spack/test/cmd/develop.py @@ -11,15 +11,17 @@ 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: @@ -63,6 +65,12 @@ def test_develop_no_clone(self, tmpdir): 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: diff --git a/lib/spack/spack/test/cmd/diff.py b/lib/spack/spack/test/cmd/diff.py index 179267425386fa..e352ce1352bcc1 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 @@ -181,7 +181,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 00000000000000..1735f7f4a5cc28 --- /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 e1136e3bbe12b1..d1d35e6f5e0cb4 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -15,6 +15,7 @@ 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 +24,21 @@ 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 +49,7 @@ # 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"), ] @@ -269,7 +279,7 @@ def test_env_rename_managed(capfd): assert "baz" in out -def test_env_rename_anonymous(capfd, tmpdir): +def test_env_rename_independent(capfd, tmpdir): # Need real environment with pytest.raises(spack.main.SpackCommandError): env("rename", "-d", "./non-existing", "./also-non-existing") @@ -500,7 +510,7 @@ def test_env_install_two_specs_same_dep(install_mockery, mock_fetch, tmpdir, cap """\ spack: specs: - - a + - pkg-a - depb """ ) @@ -519,8 +529,8 @@ def test_env_install_two_specs_same_dep(install_mockery, mock_fetch, tmpdir, cap 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(): @@ -565,42 +575,76 @@ 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") @@ -760,6 +804,39 @@ def test_user_removed_spec(environment_from_manifest): 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( @@ -811,7 +888,6 @@ def test_init_from_yaml(environment_from_manifest): 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" @@ -824,7 +900,7 @@ def test_env_view_external_prefix(tmp_path, mutable_database, mock_packages): """\ spack: specs: - - a + - pkg-a view: true """ ) @@ -832,9 +908,9 @@ def test_env_view_external_prefix(tmp_path, mutable_database, mock_packages): external_config = io.StringIO( """\ packages: - a: + pkg-a: externals: - - spec: a@2.0 + - spec: pkg-a@2.0 prefix: {a_prefix} buildable: false """.format( @@ -1055,7 +1131,6 @@ def test_env_with_included_config_file(mutable_mock_env_path, packages_file): assert any(x.satisfies("mpileaks@2.2") for x in e._get_environment_specs()) -@pytest.mark.only_clingo("original concretizer does not support requirements") 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. @@ -1131,7 +1206,6 @@ def test_config_change_existing(mutable_mock_env_path, tmp_path, mock_packages, spack.spec.Spec("bowtie@1.2.2").concretized() -@pytest.mark.only_clingo("original concretizer does not support requirements") 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( @@ -1160,7 +1234,7 @@ def test_config_change_new(mutable_mock_env_path, tmp_path, mock_packages, mutab ) with ev.Environment(tmp_path): assert spack.spec.Spec("mpich").concretized().satisfies("@3.0.3") - with pytest.raises(spack.config.ConfigError, match="not a list"): + with pytest.raises(spack.error.ConfigError, match="not a list"): config("change", "packages:mpich:require:~debug") @@ -1188,7 +1262,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) @@ -1558,7 +1632,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 @@ -1586,7 +1659,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:: @@ -1736,6 +1808,17 @@ def test_env_include_concrete_env_yaml(env_name): 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") @@ -2327,105 +2410,6 @@ def test_stack_yaml_force_remove_from_matrix(tmpdir): 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: @@ -3180,9 +3164,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): @@ -3208,10 +3190,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() @@ -3635,7 +3615,7 @@ def test_create_and_activate_managed(tmp_path): env("deactivate") -def test_create_and_activate_anonymous(tmp_path): +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) @@ -3749,7 +3729,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. # @@ -3815,7 +3795,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. """ @@ -3973,7 +3953,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) @@ -4011,7 +3991,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) @@ -4073,7 +4053,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) @@ -4081,7 +4066,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} @@ -4141,7 +4131,7 @@ def test_spack_package_ids_variable(tmpdir, mock_packages): 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: should've been executed with ev.read("test") as test: @@ -4198,7 +4188,7 @@ def test_env_include_packages_url( 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")) @@ -4298,9 +4288,6 @@ def test_env_include_mixed_views(tmp_path, mutable_mock_env_path, mutable_config {''.join(includes)} specs: - mpileaks - packages: - mpileaks: - compiler: [gcc] """ ) @@ -4414,8 +4401,8 @@ def test_env_view_resolves_identical_file_conflicts(tmp_path, install_mockery, m # view-file/bin/ # x # expect this x to be linked - assert os.readlink(tmp_path / "view" / "bin" / "x") == bottom.bin.x - assert os.readlink(tmp_path / "view" / "bin" / "y") == top.bin.y + 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): @@ -4426,4 +4413,4 @@ def test_env_view_ignores_different_file_conflicts(tmp_path, install_mockery, mo install() prefix_dependent = e.matching_spec("view-ignore-conflict").prefix # The dependent's file is linked into the view - assert os.readlink(tmp_path / "view" / "bin" / "x") == prefix_dependent.bin.x + 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 5869e466422a02..082628cc34cf60 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 @@ @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): diff --git a/lib/spack/spack/test/cmd/external.py b/lib/spack/spack/test/cmd/external.py index e5bb29c6ea8d73..684520bea292c5 100644 --- a/lib/spack/spack/test/cmd/external.py +++ b/lib/spack/spack/test/cmd/external.py @@ -11,8 +11,12 @@ 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): @@ -96,7 +102,7 @@ def test_get_executables(working_env, mock_executable): # TODO: this test should be made to work, but in the meantime it is # causing intermittent (spurious) CI failures on all PRs -@pytest.mark.skipif(sys.platform == "win32", reason="Test fails intermittently on Windows") +@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 @@ -113,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"], [], []), ], @@ -197,21 +223,19 @@ def fail(): 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") @@ -221,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): @@ -242,11 +266,13 @@ def _determine_variants(cls, exes, version_str): 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") @@ -311,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 cf05f4299d925e..d2ba0f82803c85 100644 --- a/lib/spack/spack/test/cmd/fetch.py +++ b/lib/spack/spack/test/cmd/fetch.py @@ -9,7 +9,9 @@ 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 37a0a7ff14463d..d947362f185ae6 100644 --- a/lib/spack/spack/test/cmd/find.py +++ b/lib/spack/spack/test/cmd/find.py @@ -14,6 +14,7 @@ import spack.cmd as cmd import spack.cmd.find import spack.environment as ev +import spack.store import spack.user_environment as uenv from spack.main import SpackCommand from spack.spec import Spec @@ -69,11 +70,11 @@ def test_query_arguments(): 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["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" @@ -334,10 +335,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") @@ -349,7 +349,7 @@ def test_find_prefix_in_env( # Would throw error on regression -def test_find_specs_include_concrete_env(mutable_mock_env_path, config, mutable_mock_repo, tmpdir): +def test_find_specs_include_concrete_env(mutable_mock_env_path, mutable_mock_repo, tmpdir): path = tmpdir.join("spack.yaml") with tmpdir.as_cwd(): @@ -393,9 +393,7 @@ def test_find_specs_include_concrete_env(mutable_mock_env_path, config, mutable_ assert "libelf" in output -def test_find_specs_nested_include_concrete_env( - mutable_mock_env_path, config, mutable_mock_repo, tmpdir -): +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(): @@ -434,7 +432,7 @@ 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") diff --git a/lib/spack/spack/test/cmd/gc.py b/lib/spack/spack/test/cmd/gc.py index 05f7a111adf0a5..d997be59b2a3f3 100644 --- a/lib/spack/spack/test/cmd/gc.py +++ b/lib/spack/spack/test/cmd/gc.py @@ -11,25 +11,24 @@ 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): +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") @@ -37,10 +36,26 @@ def test_gc_with_build_dependency(config, mutable_database): @pytest.mark.db -def test_gc_with_environment(config, mutable_database, mutable_mock_env_path): +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") + + 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") + + 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(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: @@ -53,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: @@ -78,7 +93,7 @@ def test_gc_with_build_dependency_in_environment(config, mutable_database, mutab @pytest.mark.db -def test_gc_except_any_environments(config, mutable_database, mutable_mock_env_path): +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") @@ -105,10 +120,10 @@ def test_gc_except_any_environments(config, mutable_database, mutable_mock_env_p @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") @@ -125,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 d342897db7f800..b720b7d9e62f67 100644 --- a/lib/spack/spack/test/cmd/gpg.py +++ b/lib/spack/spack/test/cmd/gpg.py @@ -9,7 +9,6 @@ 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 688675be68c0b7..91303dbb6eba94 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 e3d7b383a5e908..a0ea57b03e4cc1 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/install.py b/lib/spack/spack/test/cmd/install.py index 17a35b89735029..13721b2a0d52e6 100644 --- a/lib/spack/spack/test/cmd/install.py +++ b/lib/spack/spack/test/cmd/install.py @@ -17,19 +17,20 @@ 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") @@ -49,7 +50,7 @@ def noop(*args, **kwargs): 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(): @@ -89,11 +90,11 @@ def check(pkg): 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") @@ -136,7 +137,7 @@ 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() with gzip.open(pkg.install_log_path, "rt") as f: out = f.read() @@ -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 "" in content - assert "" 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 "" in content + assert "" 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"(.+)", 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"(.+)", 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()) + + 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 install_use_buildcache(opt): @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 087f69e0282f02..3dabc8623a2082 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 @@ 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 4a925046738995..23903107f67bf8 100644 --- a/lib/spack/spack/test/cmd/list.py +++ b/lib/spack/spack/test/cmd/list.py @@ -7,6 +7,7 @@ import sys from textwrap import dedent +import spack.paths import spack.repo from spack.main import SpackCommand diff --git a/lib/spack/spack/test/cmd/load.py b/lib/spack/spack/test/cmd/load.py index e2abe72e0e15d9..1c36bcc86aba82 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 @@ 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 25008e8e447b35..25fa02a6b084ac 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 @@ 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 index 0691549be585f1..b668cd449cbb55 100644 --- a/lib/spack/spack/test/cmd/logs.py +++ b/lib/spack/spack/test/cmd/logs.py @@ -13,6 +13,9 @@ import pytest import spack +import spack.cmd.logs +import spack.main +import spack.spec from spack.main import SpackCommand logs = SpackCommand("logs") diff --git a/lib/spack/spack/test/cmd/maintainers.py b/lib/spack/spack/test/cmd/maintainers.py index 2724d7ec834db6..3928bebff11c09 100644 --- a/lib/spack/spack/test/cmd/maintainers.py +++ b/lib/spack/spack/test/cmd/maintainers.py @@ -121,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 b5dec9c4bcd5fe..2a67bc2e1432ed 100644 --- a/lib/spack/spack/test/cmd/mirror.py +++ b/lib/spack/spack/test/cmd/mirror.py @@ -10,8 +10,11 @@ import spack.cmd.mirror import spack.config import spack.environment as ev +import spack.error +import spack.mirror import spack.spec import spack.util.url as url_util +import spack.version from spack.main import SpackCommand, SpackCommandError mirror = SpackCommand("mirror") @@ -35,7 +38,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" @@ -232,13 +235,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") diff --git a/lib/spack/spack/test/cmd/module.py b/lib/spack/spack/test/cmd/module.py index 4c1ea784320504..759d1391c97113 100644 --- a/lib/spack/spack/test/cmd/module.py +++ b/lib/spack/spack/test/cmd/module.py @@ -11,7 +11,11 @@ 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 f37d66363e5767..d1f0ed139ecac3 100644 --- a/lib/spack/spack/test/cmd/pkg.py +++ b/lib/spack/spack/test/cmd/pkg.py @@ -12,7 +12,9 @@ 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 +30,20 @@ def install(self, spec, prefix): 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 +56,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 +95,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 +121,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 +146,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 +159,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 +192,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 +204,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 +297,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 +311,7 @@ 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 ["splice-a", "splice-h", "splice-t", "splice-vh", "splice-vt", "splice-z"] ) # 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 e979f2db470f81..4ea642ef32b61b 100644 --- a/lib/spack/spack/test/cmd/providers.py +++ b/lib/spack/spack/test/cmd/providers.py @@ -10,8 +10,6 @@ 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 f8c1d8b0e9eaee..abaaf4530c0ca7 100644 --- a/lib/spack/spack/test/cmd/reindex.py +++ b/lib/spack/spack/test/cmd/reindex.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 pytest +import shutil import spack.store +from spack.database import Database 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 +24,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=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=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=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 6dfc024f47be3d..a57c40ec926823 100644 --- a/lib/spack/spack/test/cmd/spec.py +++ b/lib/spack/spack/test/cmd/spec.py @@ -9,12 +9,11 @@ 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 +29,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, do_not_check_runtimes_on_reuse): +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 +56,7 @@ def test_spec_concretizer_args(mutable_config, mutable_database, do_not_check_ru 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 +95,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 +141,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 diff --git a/lib/spack/spack/test/cmd/stage.py b/lib/spack/spack/test/cmd/stage.py index cdca18d5e7b432..ba37eff0dc9dca 100644 --- a/lib/spack/spack/test/cmd/stage.py +++ b/lib/spack/spack/test/cmd/stage.py @@ -10,8 +10,6 @@ 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 @@ 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 fake_stage(pkg, mirror_only=False): 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 fake_stage(pkg, mirror_only=False): 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 fake_stage(pkg, mirror_only=False): 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 afdb3dbb1fe2e0..208e31f8a2fa5f 100644 --- a/lib/spack/spack/test/cmd/style.py +++ b/lib/spack/spack/test/cmd/style.py @@ -11,6 +11,7 @@ from llnl.util.filesystem import FileFilter +import spack.cmd.style import spack.main import spack.paths import spack.repo @@ -24,6 +25,12 @@ 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 +45,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 +61,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 +137,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 +197,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 +216,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 +245,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 +271,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 +282,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 diff --git a/lib/spack/spack/test/cmd/tags.py b/lib/spack/spack/test/cmd/tags.py index 7de107c9234be2..0e8e7f016591f7 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 @@ class tag_path: 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 0dab4587394356..866d579aa7fafb 100644 --- a/lib/spack/spack/test/cmd/test.py +++ b/lib/spack/spack/test/cmd/test.py @@ -10,11 +10,12 @@ 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 @@ 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,6 +194,9 @@ 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", @@ -233,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") @@ -299,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() @@ -322,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 9b5a2a5692f073..684a9f50198b9e 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 @@ 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 f3eca94d6501c6..35b6a15455aa04 100644 --- a/lib/spack/spack/test/cmd/uninstall.py +++ b/lib/spack/spack/test/cmd/uninstall.py @@ -205,7 +205,6 @@ def _warn(*args, **kwargs): # 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 +221,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 cea7b34a948da5..e29253299aa336 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 @@ -117,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 0ac3c136c0b8db..53b57cd7902b31 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 8506be82216dbc..542365dacbba5e 100644 --- a/lib/spack/spack/test/cmd/versions.py +++ b/lib/spack/spack/test/cmd/versions.py @@ -11,13 +11,6 @@ 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 530b998a42e3c7..1c405728b443c7 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 @@ 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,11 +189,11 @@ 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-file") # Arbitrary package to add noise diff --git a/lib/spack/spack/test/compilers/basics.py b/lib/spack/spack/test/compilers/basics.py index 2c46d434d1ad3f..ee31e50f53893e 100644 --- a/lib/spack/spack/test/compilers/basics.py +++ b/lib/spack/spack/test/compilers/basics.py @@ -12,34 +12,13 @@ import spack.compiler 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 Executable, ProcessError -@pytest.fixture() -def make_args_for_version(monkeypatch): - def _factory(version, path="/usr/bin/gcc"): - class MockOs: - pass - - compiler_name = "gcc" - compiler_cls = spack.compilers.class_for_compiler_name(compiler_name) - monkeypatch.setattr(compiler_cls, "cc_version", lambda x: version) - - compiler_id = spack.compilers.CompilerID( - os=MockOs, compiler_name=compiler_name, version=None - ) - variation = spack.compilers.NameVariation(prefix="", suffix="") - return spack.compilers.DetectVersionArgs( - id=compiler_id, variation=variation, language="cc", path=path - ) - - return _factory - - def test_multiple_conflicting_compiler_definitions(mutable_config): compiler_def = { "compiler": { @@ -63,40 +42,6 @@ def test_multiple_conflicting_compiler_definitions(mutable_config): assert cmp.f77 == "f77" -def test_get_compiler_duplicates(mutable_config, compiler_factory): - # 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. - 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"] - mutable_config.set( - "compilers", [compiler_factory(spec="gcc@4.5.0", operating_system="SuSE11"), cnl_compiler] - ) - cfg_file_to_duplicates = spack.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 - - -@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 = spack.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", @@ -384,9 +329,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") @@ -507,9 +461,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") @@ -635,6 +593,7 @@ def test_xl_r_flags(): "compiler_spec,expected_result", [("gcc@4.7.2", False), ("clang@3.3", False), ("clang@8.0.0", True)], ) +@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 ): @@ -897,51 +856,30 @@ def prepare_executable(name): @pytest.mark.parametrize( - "detected_versions,expected_length", + "compilers_extra_attributes,expected_length", [ # If we detect a C compiler we expect the result to be valid - ( - [ - spack.compilers.DetectVersionArgs( - id=spack.compilers.CompilerID( - os="ubuntu20.04", compiler_name="clang", version="12.0.0" - ), - variation=spack.compilers.NameVariation(prefix="", suffix="-12"), - language="cc", - path="/usr/bin/clang-12", - ), - spack.compilers.DetectVersionArgs( - id=spack.compilers.CompilerID( - os="ubuntu20.04", compiler_name="clang", version="12.0.0" - ), - variation=spack.compilers.NameVariation(prefix="", suffix="-12"), - language="cxx", - path="/usr/bin/clang++-12", - ), - ], - 1, - ), + ({"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 - ( - [ - spack.compilers.DetectVersionArgs( - id=spack.compilers.CompilerID( - os="ubuntu20.04", compiler_name="clang", version="12.0.0" - ), - variation=spack.compilers.NameVariation(prefix="", suffix="-12"), - language="cxx", - path="/usr/bin/clang++-12", - ) - ], - 0, - ), + ({"cxx": "/usr/bin/clang-12"}, 0), ], ) -def test_detection_requires_c_compiler(detected_versions, expected_length): +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. """ - result = spack.compilers.make_compiler_list(detected_versions) + 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 diff --git a/lib/spack/spack/test/compilers/detection.py b/lib/spack/spack/test/compilers/detection.py deleted file mode 100644 index 07b5269fb7eb58..00000000000000 --- 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/concretize.py b/lib/spack/spack/test/concretize.py index bfa774e3f40fc9..553d8fd6426791 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -13,6 +13,7 @@ import llnl.util.lang +import spack.binary_distribution import spack.compiler import spack.compilers import spack.concretize @@ -21,14 +22,20 @@ 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.util.libc +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): @@ -47,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(): @@ -168,19 +175,18 @@ def reverser(pkg_name): @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 = """ class Root(Package): homepage = "http://www.example.com" @@ -191,7 +197,9 @@ 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 = """ class Changing(Package): @@ -225,7 +233,9 @@ class _ChangingPackage: 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 {} @@ -246,10 +256,12 @@ def change(self, changes=None): # 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) @@ -393,18 +405,10 @@ def test_spec_flags_maintain_order(self, mutable_config, gcc11_with_flags): s.compiler_flags[x] == ["-O0", "-g"] for x in ("cflags", "cxxflags", "fflags") ) - @pytest.mark.xfail(reason="Broken, needs to be fixed") - 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"] - 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) @@ -418,33 +422,45 @@ def test_compiler_flags_differ_identical_compilers(self, mutable_config, clang12 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"]) @@ -457,7 +473,6 @@ def test_compiler_inherited_upwards(self): for dep in spec.traverse(): assert "%clang" in dep - @pytest.mark.only_clingo("Fixing the parser broke this test for the original concretizer") 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 @@ -473,7 +488,7 @@ def test_architecture_deep_inheritance(self, mock_targets, compiler_factory): 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) @@ -522,9 +537,6 @@ def test_concretize_two_virtuals_with_dual_provider_and_a_conflict(self): 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", [ @@ -552,9 +564,6 @@ def test_concretize_propagate_disabled_variant(self, spec_str, expected_propagat 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") @@ -563,9 +572,6 @@ def test_concretize_propagated_variant_is_not_passed_to_dependent(self): assert spec.satisfies("^adios2+shared") assert spec.satisfies("^bzip2~shared") - @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") @@ -574,27 +580,26 @@ def test_concretize_propagate_specified_variant(self): assert spec.satisfies("~foo") and spec.satisfies("^dependency-foo-bar~foo") assert spec.satisfies("+bar") and not spec.satisfies("^dependency-foo-bar+bar") - @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_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() @@ -631,11 +636,6 @@ def test_virtual_is_fully_expanded_for_mpileaks(self): 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@:15.0.0"]) def test_compiler_inheritance(self, compiler_str): spec_str = "mpileaks %{0}".format(compiler_str) @@ -652,20 +652,6 @@ def test_external_package(self): 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. @@ -674,7 +660,8 @@ def test_nobuild_package(self): 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( @@ -730,7 +717,6 @@ def test_conflicts_in_spec(self, conflict_spec): 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: @@ -779,15 +765,15 @@ def test_regression_issue_7239(self): 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): @@ -803,7 +789,7 @@ def test_regression_issue_7941(self): # 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() @@ -904,7 +890,6 @@ def test_concretize_anonymous_dep(self, spec_str): ("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, clang12_with_flags, gcc11_with_flags ): @@ -947,7 +932,9 @@ def test_conditional_variants(self, spec_str, expected, unexpected): ], ) 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( @@ -1020,7 +1007,6 @@ def test_patching_dependencies(self, spec_str, patched_deps): ("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() @@ -1033,7 +1019,6 @@ def test_working_around_conflicting_defaults(self, spec_str, expected): "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, mutable_config): packages_yaml = { "all": {"compiler": ["clang", "gcc"]}, @@ -1050,7 +1035,6 @@ def test_external_package_and_compiler_preferences(self, spec_str, expected, mut 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 @@ -1065,7 +1049,6 @@ def test_package_with_constraint_not_met_by_external(self): 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 @@ -1093,7 +1076,6 @@ def test_dependency_conditional_on_another_dependency_state(self): @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} @@ -1138,37 +1120,25 @@ def test_compiler_in_nonbuildable_external_package( 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 @@ -1183,14 +1153,14 @@ def test_conditional_provides_or_depends_on(self): [ # 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): @@ -1207,7 +1177,6 @@ def test_activating_test_dependencies(self, spec_str, tests_arg, with_dep, witho 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, compiler_factory): # This spec depends on openblas. Openblas has a conflict # that doesn't allow newer versions with gcc@4.4.0. Check @@ -1226,7 +1195,6 @@ 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() @@ -1243,13 +1211,12 @@ def test_variant_not_default(self): 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, 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("a %gcc@10foo os=redhat6").concretized() + s = Spec("pkg-a %gcc@10foo os=redhat6").concretized() assert "%gcc@10foo" in s def test_all_patches_applied(self): @@ -1326,7 +1293,7 @@ def mock_fn(*args, **kwargs): 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) @@ -1344,7 +1311,6 @@ def mock_fn(*args, **kwargs): {"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 ): @@ -1354,7 +1320,7 @@ def test_reuse_installed_packages_when_package_def_changes( # 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) @@ -1374,14 +1340,13 @@ def test_reuse_installed_packages_when_package_def_changes( # 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() - old.package.do_install(fake=True, explicit=True) + 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() @@ -1390,13 +1355,12 @@ def test_no_reuse_when_variant_condition_does_not_hold(self, mutable_database, m new2 = Spec("conditional-variant-pkg +two_whens").concretized() assert new2.satisfies("@2 +two_whens +version_based") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") 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 @@ -1411,10 +1375,9 @@ def test_concretization_of_test_dependencies(self): @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") @@ -1516,7 +1479,6 @@ def test_multivalued_variants_from_cli(self, spec_str, expected_dict): ("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() @@ -1577,9 +1539,8 @@ def test_non_default_provider_of_multiple_virtuals(self): "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 @@ -1591,7 +1552,6 @@ def test_concrete_specs_are_not_modified_on_reuse( 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 @@ -1607,7 +1567,6 @@ def test_sticky_variant_in_package(self): assert s.satisfies("%clang") and s.satisfies("~allow-gcc") @pytest.mark.regression("42172") - @pytest.mark.only_clingo("Original concretizer cannot use sticky variants") @pytest.mark.parametrize( "spec,allow_gcc", [ @@ -1630,7 +1589,6 @@ def test_sticky_variant_in_external(self, spec, allow_gcc): assert s["sticky-variant"].satisfies("+allow-gcc") assert s["sticky-variant"].external - @pytest.mark.only_clingo("Use case not supported by the original concretizer") 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. @@ -1652,14 +1610,12 @@ def test_do_not_invent_new_concrete_versions_unless_necessary(self): ("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() @@ -1668,7 +1624,6 @@ def test_conditional_values_in_conditional_variant(self): 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 @@ -1679,7 +1634,6 @@ def test_target_granularity(self): 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 @@ -1692,7 +1646,6 @@ def test_host_compatible_concretization(self): 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 @@ -1701,13 +1654,12 @@ def test_add_microarchitectures_on_explicit_request(self): 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): @@ -1716,7 +1668,6 @@ def test_delete_version_and_reuse(self, mutable_database, repo_with_changing_rec 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 ): @@ -1726,7 +1677,7 @@ def test_installed_version_is_selected_only_for_reuse( # 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): @@ -1739,49 +1690,62 @@ def test_reuse_with_unknown_namespace_dont_raise( 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"], 3), - (["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 @@ -1790,7 +1754,9 @@ def test_best_effort_coconcretize(self, specs, expected): for s in result.specs: concrete_specs.update(s.traverse()) - libc_offset = 1 if spack.solver.asp.using_libc_compatibility() else 0 + if not spack.solver.asp.using_libc_compatibility(): + libc_offset = 0 + assert len(concrete_specs) == expected + libc_offset @pytest.mark.parametrize( @@ -1823,7 +1789,6 @@ def test_best_effort_coconcretize(self, specs, expected): (["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] @@ -1839,8 +1804,7 @@ def test_best_effort_coconcretize_preferences(self, specs, expected_spec, occura counter += 1 assert counter == occurances, concrete_specs - @pytest.mark.only_clingo("Original concretizer cannot concretize in rounds") - def test_solve_in_rounds_all_unsolved(self, monkeypatch, mock_packages, config): + 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 @@ -1855,7 +1819,6 @@ def test_solve_in_rounds_all_unsolved(self, monkeypatch, mock_packages, config): ): list(solver.solve_in_rounds(specs)) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_coconcretize_reuse_and_virtuals(self): reusable_specs = [] for s in ["mpileaks ^mpich", "zmpi"]: @@ -1872,7 +1835,6 @@ def test_coconcretize_reuse_and_virtuals(self): 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. @@ -1889,23 +1851,22 @@ def test_misleading_error_message_on_version(self, mutable_database): 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] @@ -1914,16 +1875,15 @@ def test_version_weight_and_provenance(self): libc_offset = 1 if spack.solver.asp.using_libc_compatibility() else 0 criteria = [ (num_specs - 1 - libc_offset, None, "number of packages to build (vs. reuse)"), - (2, 0, "version badness"), + (2, 0, "version badness (non roots)"), ] for criterion in criteria: - assert criterion in result.criteria, result_spec - assert result_spec.satisfies("^b@1.0") + assert criterion in result.criteria, criterion + assert result_spec.satisfies("^pkg-b@1.0") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_reuse_succeeds_with_config_compatible_os(self): - root_spec = Spec("b") + root_spec = Spec("pkg-b") s = root_spec.concretized() other_os = s.copy() mock_os = "ubuntu2204" @@ -1947,7 +1907,6 @@ def test_git_hash_assigned_version_is_preferred(self): 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() @@ -1957,7 +1916,6 @@ def test_git_ref_version_is_equivalent_to_specified_version(self, git_ref): 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) @@ -1965,7 +1923,6 @@ def test_git_ref_version_succeeds_with_unknown_version(self, git_ref): 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 ): @@ -1980,7 +1937,7 @@ def test_installed_externals_are_reused( # 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 @@ -1997,7 +1954,6 @@ def test_installed_externals_are_reused( 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 = { @@ -2026,7 +1982,6 @@ def test_user_can_select_externals_with_require(self, mutable_database, tmp_path 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. @@ -2047,7 +2002,6 @@ def test_installed_specs_disregard_conflicts(self, mutable_database, monkeypatch 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 @@ -2147,11 +2101,13 @@ def test_external_python_extension_find_dependency_from_detection(self, monkeypa """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 = { @@ -2166,7 +2122,8 @@ def find_fake_python(classes, path_hints): 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""" @@ -2187,7 +2144,7 @@ def test_external_python_extension_find_unified_python(self): "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"], ], ) @@ -2203,7 +2160,7 @@ def test_result_specs_is_not_empty(self, specs): assert result.specs @pytest.mark.regression("38664") - def test_unsolved_specs_raises_error(self, monkeypatch, mock_packages, config): + def test_unsolved_specs_raises_error(self, monkeypatch, mock_packages): """Check that the solver raises an exception when input specs are not satisfied. """ @@ -2222,13 +2179,12 @@ def test_unsolved_specs_raises_error(self, monkeypatch, mock_packages, config): solver.driver.solve(setup, specs, reuse=[]) @pytest.mark.regression("43141") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") - def test_clear_error_when_unknown_compiler_requested(self, mock_packages, config): + 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: a%foo" + spack.error.UnsatisfiableSpecError, match="Cannot set the required compiler: pkg-a%foo" ): - Spec("a %foo").concretized() + Spec("pkg-a %foo").concretized() @pytest.mark.regression("36339") def test_compiler_match_constraints_when_selected(self): @@ -2264,7 +2220,7 @@ def test_compiler_match_constraints_when_selected(self): }, ] 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") @@ -2285,7 +2241,7 @@ def test_compiler_with_custom_non_numeric_version(self, mock_executable): } ] 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") @@ -2311,13 +2267,13 @@ def test_concretization_with_compilers_supporting_target_any(self): ] 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) @@ -2325,13 +2281,61 @@ def test_virtuals_are_annotated_on_edges(self, spec_str, default_mock_concretiza 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() @@ -2340,13 +2344,12 @@ def test_virtuals_are_reconstructed_on_reuse(self, spec_str, mpi_name, database) 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 @@ -2356,7 +2359,7 @@ def test_reuse_python_from_cli_and_extension_from_db(self, mutable_database): """ 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() @@ -2377,7 +2380,6 @@ def test_reuse_python_from_cli_and_extension_from_db(self, mutable_database): ("hdf5 ^gmake", {"gmake": "duplicates.test", "hdf5": "duplicates.test"}), ], ) - @pytest.mark.only_clingo("Uses specs requiring multiple gmake specs") def test_select_lower_priority_package_from_repository_stack( self, spec_str, expected_namespaces ): @@ -2393,7 +2395,6 @@ def test_select_lower_priority_package_from_repository_stack( assert s[name].concrete assert s[name].namespace == namespace - @pytest.mark.only_clingo("Old concretizer cannot reuse") 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 @@ -2429,26 +2430,6 @@ def test_externals_with_platform_explicitly_set(self, tmp_path): s = Spec("mpich").concretized() assert s.external - @pytest.mark.regression("43875") - def test_concretize_missing_compiler(self, mutable_config, monkeypatch): - """Tests that Spack can concretize a spec with a missing compiler when the - option is active. - """ - - def _default_libc(self): - if self.cc is None: - return None - return Spec("glibc@=2.28") - - monkeypatch.setattr(spack.concretize.Concretizer, "check_for_compiler_existence", False) - monkeypatch.setattr(spack.compiler.Compiler, "default_libc", property(_default_libc)) - monkeypatch.setattr( - spack.util.libc, "libc_from_current_python_process", lambda: Spec("glibc@=2.28") - ) - mutable_config.set("config:install_missing_compilers", True) - s = Spec("a %gcc@=13.2.0").concretized() - assert s.satisfies("%gcc@13.2.0") - @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 @@ -2464,7 +2445,6 @@ def test_spec_with_build_dep_from_json(self, tmp_path): assert s["dttop"].dag_hash() == build_dep.dag_hash() @pytest.mark.regression("44040") - @pytest.mark.only_clingo("Use case not supported by the original concretizer") 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. @@ -2514,7 +2494,6 @@ def test_exclude_specs_from_reuse(self, monkeypatch): [], ], ) - @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_include_specs_from_externals_and_libcs( self, included_externals, mutable_config, tmp_path ): @@ -2546,6 +2525,100 @@ def test_include_specs_from_externals_and_libcs( 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(): @@ -2555,7 +2628,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""" @@ -2747,7 +2819,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. @@ -2772,7 +2846,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""" @@ -2910,7 +2983,7 @@ def test_concretization_version_order(): result = [ v for v, _ in sorted( - versions, key=spack.solver.asp._concretization_version_order, reverse=True + versions, key=spack.solver.version_order.concretization_version_order, reverse=True ) ] assert result == [ @@ -2923,7 +2996,6 @@ def test_concretization_version_order(): ] -@pytest.mark.only_clingo("Original concretizer cannot reuse specs") @pytest.mark.parametrize( "roots,reuse_yaml,expected,not_expected,expected_length", [ @@ -2943,7 +3015,7 @@ def test_concretization_version_order(): ), ], ) -@pytest.mark.usefixtures("database", "mock_store") +@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 @@ -2964,7 +3036,7 @@ def test_filtering_reused_specs( assert all(not x.satisfies(constraint) for x in specs) -@pytest.mark.usefixtures("database", "mock_store") +@pytest.mark.usefixtures("mutable_database", "mock_store") @pytest.mark.parametrize( "reuse_yaml,expected_length", [({"from": [{"type": "local"}]}, 17), ({"from": [{"type": "buildcache"}]}, 0)], @@ -2996,3 +3068,41 @@ def test_spec_filters(specs, include, exclude, expected): 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() diff --git a/lib/spack/spack/test/concretize_compiler_runtimes.py b/lib/spack/spack/test/concretize_compiler_runtimes.py index 3e13fd8e567c42..fefa262ca4da1b 100644 --- a/lib/spack/spack/test/concretize_compiler_runtimes.py +++ b/lib/spack/spack/test/concretize_compiler_runtimes.py @@ -9,6 +9,7 @@ import archspec.cpu +import spack.config import spack.paths import spack.repo import spack.solver.asp @@ -16,10 +17,7 @@ from spack.environment.environment import ViewDescriptor from spack.version import Version -pytestmark = [ - pytest.mark.only_clingo("Original concretizer does not support compiler runtimes"), - pytest.mark.usefixtures("enable_runtimes"), -] +pytestmark = [pytest.mark.usefixtures("enable_runtimes")] def _concretize_with_reuse(*, root_str, reused_str): @@ -32,7 +30,7 @@ def _concretize_with_reuse(*, root_str, reused_str): @pytest.fixture -def runtime_repo(config): +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 @@ -47,8 +45,8 @@ def enable_runtimes(): def test_correct_gcc_runtime_is_injected_as_dependency(runtime_repo): - s = spack.spec.Spec("a%gcc@10.2.1 ^b%gcc@9.4.0").concretized() - a, b = s["a"], s["b"] + 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") @@ -61,16 +59,16 @@ def test_correct_gcc_runtime_is_injected_as_dependency(runtime_repo): 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 = {"b": {"externals": [{"spec": "b@1.0", "prefix": f"{str(tmp_path)}"}]}} + 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("a%gcc@10.2.1").concretized() + s = spack.spec.Spec("pkg-a%gcc@10.2.1").concretized() - a, b = s["a"], s["b"] + 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("b") + assert a.dependencies("pkg-b") assert not b.dependencies("gcc-runtime") @@ -78,23 +76,36 @@ def test_external_nodes_do_not_have_runtimes(runtime_repo, mutable_config, tmp_p "root_str,reused_str,expected,nruntime", [ # The reused runtime is older than we need, thus we'll add a more recent one for a - ("a%gcc@10.2.1", "b%gcc@9.4.0", {"a": "gcc-runtime@10.2.1", "b": "gcc-runtime@9.4.0"}, 2), - # The root is compiled with an older compiler, thus we'll reuse the runtime from b - ("a%gcc@9.4.0", "b%gcc@10.2.1", {"a": "gcc-runtime@10.2.1", "b": "gcc-runtime@10.2.1"}, 1), + ( + "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( - "a%gcc@9.4.0", - "b%gcc@10.2.1 target=x86_64", - {"a": "gcc-runtime@10.2.1 target=x86_64", "b": "gcc-runtime@10.2.1 target=x86_64"}, + "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( - "a%gcc@10.2.1", - "b%gcc@9.4.0 target=x86_64", - {"a": "gcc-runtime@10.2.1 target=x86_64", "b": "gcc-runtime@9.4.0 target=x86_64"}, + "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" @@ -102,17 +113,19 @@ def test_external_nodes_do_not_have_runtimes(runtime_repo, mutable_config, tmp_p ), ], ) +@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) - assert f"{expected['b']}" in reused_spec runtime_a = root.dependencies("gcc-runtime")[0] - assert runtime_a.satisfies(expected["a"]) - runtime_b = root["b"].dependencies("gcc-runtime")[0] - assert runtime_b.satisfies(expected["b"]) + 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 @@ -123,8 +136,7 @@ def test_reusing_specs_with_gcc_runtime(root_str, reused_str, expected, nruntime [ # Ensure that, whether we have multiple runtimes in the DAG or not, # we always link only the latest version - ("a%gcc@10.2.1", "b%gcc@9.4.0", ["gcc-runtime@10.2.1"], ["gcc-runtime@9.4.0"]), - ("a%gcc@9.4.0", "b%gcc@10.2.1", ["gcc-runtime@10.2.1"], ["gcc-runtime@9.4.0"]), + ("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( diff --git a/lib/spack/spack/test/concretize_errors.py b/lib/spack/spack/test/concretize_errors.py index 09ac4e3b93f001..0cb7a533c1df24 100644 --- a/lib/spack/spack/test/concretize_errors.py +++ b/lib/spack/spack/test/concretize_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/concretize_preferences.py b/lib/spack/spack/test/concretize_preferences.py index a7683bf65fbb51..faf7b07fc097b1 100644 --- a/lib/spack/spack/test/concretize_preferences.py +++ b/lib/spack/spack/test/concretize_preferences.py @@ -11,8 +11,10 @@ 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 @@ -113,7 +115,6 @@ def test_preferred_compilers(self, compiler_str, spec_str): 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 @@ def test_preferred_versions(self): 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 @@ def test_preferred_providers(self): 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 @@ def test_config_set_pkg_property_new(self, mutable_mock_repo): """ ) 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 @@ def test_preferred(self): 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 @@ def test_sticky_variant_accounts_for_packages_yaml(self): 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/concretize_requirements.py index ea1dc526df01c6..be66b2b0a82588 100644 --- a/lib/spack/spack/test/concretize_requirements.py +++ b/lib/spack/spack/test/concretize_requirements.py @@ -7,119 +7,31 @@ import pytest -import spack.build_systems.generic import spack.config import spack.error import spack.package_base import spack.repo +import spack.solver.asp 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 +72,7 @@ def test_require_undefined_version(concretize_scope, test_repo): 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 +426,24 @@ def test_oneof_ordering(concretize_scope, test_repo): 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 +482,11 @@ def test_requirements_and_deprecated_versions( @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 +507,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 +524,11 @@ def test_default_and_package_specific_requirements( @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 +543,13 @@ def test_requirements_on_virtual(mpi_requirement, concretize_scope, mock_package 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() @@ -944,9 +849,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( @@ -1176,3 +1081,46 @@ def test_forward_multi_valued_variant_using_requires( 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/config.py b/lib/spack/spack/test/config.py index 64fe403daa5e0d..a5a4fc9787c297 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -13,21 +13,22 @@ 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.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 @@ -306,14 +307,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): @@ -406,7 +407,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")) @@ -471,6 +472,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 @@ -492,7 +500,7 @@ def test_substitute_date(mock_low_high_config): ], ) 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 @@ -575,7 +583,7 @@ def change_fn(self, section): ], ) 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 @@ -761,25 +769,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") @@ -869,26 +872,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): @@ -903,6 +898,45 @@ def test_add_command_line_scopes(tmpdir, mutable_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 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(): @@ -961,17 +995,19 @@ def test_immutable_scope(tmpdir): 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 @@ -1007,7 +1043,9 @@ def test_single_file_scope_section_override(tmpdir, config): """ ) - 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 @@ -1023,7 +1061,7 @@ def test_single_file_scope_section_override(tmpdir, config): 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 @@ -1211,18 +1249,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 diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index 29c10fb2e3436a..5f461d9d3588a4 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -12,6 +12,7 @@ import json import os import os.path +import pathlib import re import shutil import stat @@ -32,34 +33,46 @@ 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 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 @@ -559,7 +572,7 @@ 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): @@ -586,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 @@ -595,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 @@ -682,36 +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) # /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) + 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)) - compilers_yaml = test_config.join("compilers.yaml") - content = "".join(compilers_yaml.read()).format( - linux_os=linux_os, target=str(archspec.cpu.host().family) - ) - t = tmpdir.join("site", "compilers.yaml") - t.write(content) + 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 @@ -719,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"), ] @@ -755,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"] ] @@ -790,7 +800,7 @@ 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")) @@ -802,10 +812,10 @@ 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 @@ -814,7 +824,9 @@ def no_compilers_yaml(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 @@ -844,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") @@ -980,6 +992,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.""" @@ -990,24 +1034,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) ) @@ -1422,6 +1453,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 @@ -1441,6 +1490,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( @@ -1702,7 +1756,7 @@ def _factory(name, output, subdir=("bin",)): 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 @@ -1817,12 +1871,7 @@ def __call__(self, *args, **kwargs): 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") @@ -1961,26 +2010,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) -@pytest.fixture(scope="function") + +def _sequential_executor(*args, **kwargs): + return spack.util.parallel.SequentialExecutor() + + +@pytest.fixture(autouse=True) def disable_parallel_buildcache_push(monkeypatch): """Disable process pools in tests.""" - monkeypatch.setattr(spack.cmd.buildcache, "_make_pool", spack.cmd.buildcache.NoPool) + monkeypatch.setattr(spack.util.parallel, "make_concurrent_executor", _sequential_executor) def _root_path(x, y, *, path): @@ -2019,7 +2067,8 @@ def create_test_repo(tmpdir, pkg_name_content_tuples): 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() @@ -2053,3 +2102,18 @@ def _true(x): @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 3cb4ed05a8b8bc..5e1ecd58a74e33 100644 --- a/lib/spack/spack/test/container/cli.py +++ b/lib/spack/spack/test/container/cli.py @@ -8,7 +8,6 @@ import spack.container.images import spack.main -import spack.platforms containerize = spack.main.SpackCommand("containerize") @@ -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/images.py b/lib/spack/spack/test/container/images.py index faac9d0c8e8747..1e5e9e0d70b279 100644 --- a/lib/spack/spack/test/container/images.py +++ b/lib/spack/spack/test/container/images.py @@ -7,6 +7,7 @@ import pytest import spack.container +import spack.container.images @pytest.mark.parametrize( diff --git a/lib/spack/spack/test/cray_manifest.py b/lib/spack/spack/test/cray_manifest.py index 3a00180da8dd0c..2a11b79a11422f 100644 --- a/lib/spack/spack/test/cray_manifest.py +++ b/lib/spack/spack/test/cray_manifest.py @@ -16,9 +16,11 @@ 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/config/bootstrap.yaml b/lib/spack/spack/test/data/config/bootstrap.yaml index 4757b8729d23a8..43c4405350acf8 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/concretizer.yaml b/lib/spack/spack/test/data/config/concretizer.yaml index 538182c95723c2..a89a42a90660d0 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: True + 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 eb239a5b99d464..e6867adb3db9b2 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 @@ -13,5 +13,4 @@ config: 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 f217dd7eaf3379..bd19ca066aa627 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/modules/tcl/suffix-format.yaml b/lib/spack/spack/test/data/modules/tcl/suffix-format.yaml new file mode 100644 index 00000000000000..00328cb0019a7a --- /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 d6b37e2c9a5be8..788375d4973261 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 20dea060358533..bdcb2e26157090 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/web/index_with_javascript.html b/lib/spack/spack/test/data/web/index_with_javascript.html new file mode 100644 index 00000000000000..89882ba4319c92 --- /dev/null +++ b/lib/spack/spack/test/data/web/index_with_javascript.html @@ -0,0 +1,10 @@ + + + This is the root page. + + + This is a page with a Vue javascript drop down with links as used in GitLab. + +
+ + diff --git a/lib/spack/spack/test/database.py b/lib/spack/spack/test/database.py index b981191676b95c..3049e543986030 100644 --- a/lib/spack/spack/test/database.py +++ b/lib/spack/spack/test/database.py @@ -7,11 +7,14 @@ import functools import json import os +import re import shutil import sys import pytest +import spack.subprocess_context + try: import uuid @@ -31,6 +34,7 @@ import spack.spec import spack.store import spack.version as vn +from spack.installer import PackageInstaller from spack.schema.database_index import schema from spack.util.executable import Executable @@ -40,37 +44,44 @@ @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", ["b", "c"]), ("upstream", ["c"]), ("local", ["b"]), ("{u}", ["c"]), ("{d}", ["b"])], + [ + ("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, up_layout, down_db, down_layout = upstream_and_downstream_db + up_write_db, up_db, down_db = upstream_and_downstream_db - # Set the upstream DB to contain "c" and downstream to contain "b") - b = spack.spec.Spec("b").concretized() - c = spack.spec.Spec("c").concretized() - up_write_db.add(c, up_layout) + # 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, down_layout) + 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 @@ -80,17 +91,15 @@ 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) @@ -106,9 +115,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") @@ -119,7 +126,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): @@ -129,11 +136,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 @@ -142,32 +149,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") @@ -176,9 +183,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") @@ -186,8 +191,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()) @@ -201,33 +206,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) - - with spack.repo.use_repositories(builder.root): - spec = spack.spec.Spec("x") - spec.concretize() + # Create it as an upstream + db = spack.database.Database(str(tmp_path), is_upstream=True) - 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") @@ -242,17 +236,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 @@ -360,7 +354,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 @@ -380,7 +374,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 @@ -390,9 +384,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): @@ -630,7 +624,7 @@ def test_080_root_ref_counts(mutable_database): 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 @@ -720,7 +714,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 @@ -731,14 +725,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 @@ -781,7 +775,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() @@ -824,7 +818,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 @@ -848,7 +842,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) @@ -863,14 +857,14 @@ def _is(self, spec): # 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): @@ -881,7 +875,7 @@ def _is(self, spec): # 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 @@ -889,30 +883,30 @@ def _is(self, spec): @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) @@ -930,13 +924,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) @@ -992,9 +986,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) @@ -1111,9 +1108,9 @@ def test_database_construction_doesnt_use_globals(tmpdir, config, nullify_global 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) - spec = default_mock_concretization("a") - db.add(spec, directory_layout=None) + 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 @@ -1134,3 +1131,70 @@ def test_database_errors_with_just_a_version_key(tmp_path): 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 b83562e4e5d4aa..4bad37fc917c26 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 6ae60b4f3974b4..c941a60049680c 100644 --- a/lib/spack/spack/test/directives.py +++ b/lib/spack/spack/test/directives.py @@ -31,7 +31,7 @@ def test_true_directives_exist(mock_packages): assert cls.dependencies assert "extendee" in cls.dependencies[spack.spec.Spec()] - assert "b" 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 @@ -44,7 +44,7 @@ def test_constraints_from_context(mock_packages): pkg_cls = spack.repo.PATH.get_pkg_class("with-constraint-met") assert pkg_cls.dependencies - assert "b" in pkg_cls.dependencies[spack.spec.Spec("@1.0")] + assert "pkg-b" in pkg_cls.dependencies[spack.spec.Spec("@1.0")] assert pkg_cls.conflicts assert (spack.spec.Spec("%gcc"), None) in pkg_cls.conflicts[spack.spec.Spec("+foo@1.0")] @@ -55,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 "c" in pkg_cls.dependencies[spack.spec.Spec("@0.14:15 ^b@3.8:4.0")] + assert "pkg-c" in pkg_cls.dependencies[spack.spec.Spec("@0.14:15 ^pkg-b@3.8:4.0")] @pytest.mark.regression("27754") @@ -69,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") diff --git a/lib/spack/spack/test/directory_layout.py b/lib/spack/spack/test/directory_layout.py index 6f422818276239..169c6a9c5e85d9 100644 --- a/lib/spack/spack/test/directory_layout.py +++ b/lib/spack/spack/test/directory_layout.py @@ -14,8 +14,11 @@ 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/env.py b/lib/spack/spack/test/env.py index 54ac9a3732d58c..3f2183f5e2b028 100644 --- a/lib/spack/spack/test/env.py +++ b/lib/spack/spack/test/env.py @@ -11,7 +11,9 @@ 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 @@ def test_env_change_spec(tmp_path, mock_packages, config): """ -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) @@ -118,9 +120,7 @@ def test_env_change_spec_in_definition(tmp_path, mock_packages, config, mutable_ 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) @@ -255,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( @@ -383,10 +383,10 @@ def test_can_add_specs_to_environment_without_specs_attribute(tmp_path, mock_pac """ ) 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( @@ -575,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 """ @@ -599,7 +596,6 @@ def test_conflicts_with_packages_that_are_not_dependencies( @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)] ) @@ -700,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 @@ -712,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 """ @@ -797,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 """ @@ -808,8 +803,106 @@ 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] diff --git a/lib/spack/spack/test/flag_handlers.py b/lib/spack/spack/test/flag_handlers.py index d2b67d63bc3eca..fd63de4b82ffcc 100644 --- a/lib/spack/spack/test/flag_handlers.py +++ b/lib/spack/spack/test/flag_handlers.py @@ -8,7 +8,6 @@ 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/flag_mixing.py b/lib/spack/spack/test/flag_mixing.py new file mode 100644 index 00000000000000..6009ade058e5bd --- /dev/null +++ b/lib/spack/spack/test/flag_mixing.py @@ -0,0 +1,251 @@ +# Copyright 2013-2024 Lawrence Livermore 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.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/gcs_fetch.py b/lib/spack/spack/test/gcs_fetch.py index 3689e5780c17a4..8e226242220f8b 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 52b164e422e4af..54ac9d8a1be726 100644 --- a/lib/spack/spack/test/git_fetch.py +++ b/lib/spack/spack/test/git_fetch.py @@ -12,6 +12,9 @@ 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 @@ -390,3 +393,38 @@ def submodules_callback(package): 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 338690a72e4105..c26363bb46d993 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") diff --git a/lib/spack/spack/test/hg_fetch.py b/lib/spack/spack/test/hg_fetch.py index 6d63f64dc8998a..f186ea14541437 100644 --- a/lib/spack/spack/test/hg_fetch.py +++ b/lib/spack/spack/test/hg_fetch.py @@ -10,7 +10,6 @@ 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 02b0c31e0bdc53..bcbe45bf3e5e40 100644 --- a/lib/spack/spack/test/install.py +++ b/lib/spack/spack/test/install.py @@ -11,15 +11,21 @@ import llnl.util.filesystem as fs +import spack.build_environment +import spack.config +import spack.database import spack.error +import spack.installer import spack.mirror +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, @@ -37,7 +43,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() @@ -49,7 +55,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 @@ -70,7 +76,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 @@ -127,7 +133,7 @@ def test_partial_install_delete_prefix_and_stage(install_mockery, mock_fetch, wo s.package.remove_prefix = mock_remove_prefix with pytest.raises(MockInstallError): - s.package.do_install() + 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 @@ -136,7 +142,7 @@ def test_partial_install_delete_prefix_and_stage(install_mockery, mock_fetch, wo spack.store.STORE.failure_tracker.clear(s, True) s.package.set_install_succeed() - s.package.do_install(restage=True) + PackageInstaller([s.package], explicit=True, restage=True).install() assert rm_prefix_checker.removed assert s.package.spec.installed @@ -155,12 +161,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) @@ -169,7 +175,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) @@ -187,7 +193,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) @@ -200,7 +206,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") @@ -210,7 +216,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) @@ -233,7 +239,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. @@ -255,8 +261,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", @@ -266,8 +272,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 @@ -280,14 +285,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) @@ -299,14 +304,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) @@ -319,14 +324,14 @@ 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.do_install(keep_prefix=True) + PackageInstaller([s.package], explicit=True, keep_prefix=True).install() assert s.package.spec.installed @@ -335,12 +340,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): @@ -348,21 +353,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 @@ -371,7 +376,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): @@ -400,7 +405,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] @@ -417,7 +422,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] @@ -431,7 +436,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") @@ -560,7 +565,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() @@ -584,7 +589,7 @@ 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( @@ -607,15 +612,12 @@ def test_install_from_binary_with_missing_patch_succeeds( s.to_json(f) # And register it in the database - temporary_store.db.add(s, directory_layout=temporary_store.layout, explicit=True) + temporary_store.db.add(s, explicit=True) # Push it to a binary cache - build_cache = tmp_path / "my_build_cache" - binary_distribution.push_or_raise( - s, - build_cache.as_uri(), - binary_distribution.PushOptions(unsigned=True, regenerate_index=True), - ) + mirror = spack.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() @@ -623,10 +625,16 @@ def test_install_from_binary_with_missing_patch_succeeds( # Source install: fails, we don't have the patch. with pytest.raises(spack.error.SpecError, match="Couldn't find patch for package"): - s.package.do_install() + PackageInstaller([s.package], explicit=True).install() # Binary install: succeeds, we don't need the patch. - spack.mirror.add(spack.mirror.Mirror.from_local_path(str(build_cache))) - s.package.do_install(package_cache_only=True, dependencies_cache_only=True, unsigned=True) + spack.mirror.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 97b95a487f4653..8df6a1a6eaa00d 100644 --- a/lib/spack/spack/test/installer.py +++ b/lib/spack/spack/test/installer.py @@ -7,22 +7,20 @@ import os import shutil import sys +from typing import List, Optional, Union import py import pytest -import archspec.cpu - import llnl.util.filesystem as fs 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 @@ -30,7 +28,8 @@ 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): @@ -44,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} +""" ) @@ -73,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( @@ -132,7 +97,7 @@ 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 @@ -174,8 +139,12 @@ def test_install_from_cache_errors(install_mockery): assert spec.concrete # Check with cache-only - with pytest.raises(inst.InstallError, match="No binary found when cache-only was specified"): - spec.package.do_install(package_cache_only=True, dependencies_cache_only=True) + 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 @@ -223,11 +192,11 @@ def _spec(spec, unsigned=False, mirrors_for_spec=None): # 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 @@ -240,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__) @@ -250,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 @@ -278,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) @@ -286,24 +253,24 @@ def _mock_installed(self): # 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 @@ -331,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}" @@ -366,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) @@ -382,8 +347,7 @@ def _raise(lock, timeout=None): 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) @@ -418,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) @@ -438,9 +400,7 @@ def _pl(db, spec, timeout): 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) @@ -477,74 +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 - - -@pytest.mark.skipif( - str(archspec.cpu.host().family) != "x86_64", - reason="OneAPI compiler is not supported on other architectures", -) -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 @@ -728,8 +617,7 @@ def test_check_deps_status_external(install_mockery, monkeypatch): 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 @@ -740,31 +628,9 @@ def test_check_deps_status_upstream(install_mockery, monkeypatch): assert inst.package_id(dep) 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 - - 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} @@ -779,8 +645,7 @@ 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 @@ -788,9 +653,78 @@ def test_installer_init_requests(install_mockery): 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 +733,36 @@ 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. + with spack.config.override("config:install_missing_compilers", True): + 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 - installer._install_task(task, None) + 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 +779,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 +796,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 +808,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 +826,16 @@ def _mktask(pkg): 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 +855,10 @@ def _chgrp(path, group, follow_symlinks=True): 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 +868,7 @@ def _chgrp(path, group, follow_symlinks=True): 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 +883,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 +899,7 @@ def _raise_except(lock): 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 +910,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 +918,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 +927,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 +942,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) 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 +1054,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 +1064,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 +1077,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 +1085,7 @@ def _requeued(installer, task, install_status): # 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 +1096,19 @@ def _requeued(installer, task, install_status): 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 = 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.spec))) + 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 +1116,13 @@ def _requeued(installer, task, install_status): # 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 +1150,9 @@ def _requeued(installer, task, install_status): # 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 +1165,19 @@ def _requeued(installer, task, install_status): 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) 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 +1186,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 +1246,7 @@ def remove(self, spec): 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 +1274,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 +1303,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/llnl/util/filesystem.py b/lib/spack/spack/test/llnl/util/filesystem.py index f04c2455cc8304..a0c98747698b20 100644 --- a/lib/spack/spack/test/llnl/util/filesystem.py +++ b/lib/spack/spack/test/llnl/util/filesystem.py @@ -14,7 +14,7 @@ import pytest import llnl.util.filesystem as fs -from llnl.util.symlink import islink, symlink +from llnl.util.symlink import islink, readlink, symlink import spack.paths @@ -181,7 +181,7 @@ def test_symlinks_true(self, stage): 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 +274,14 @@ def test_symlinks_false(self, stage): 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.""" @@ -1000,7 +1000,7 @@ def setup_test_dirs(): shutil.rmtree(tmpdir.join("f")) -@pytest.mark.skipif(sys.platform != "win32", reason="No-op on non Windows") +@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 diff --git a/lib/spack/spack/test/llnl/util/lang.py b/lib/spack/spack/test/llnl/util/lang.py index abf2c5b1346bd3..52dcf3950a452b 100644 --- a/lib/spack/spack/test/llnl/util/lang.py +++ b/lib/spack/spack/test/llnl/util/lang.py @@ -336,3 +336,40 @@ 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 diff --git a/lib/spack/spack/test/llnl/util/symlink.py b/lib/spack/spack/test/llnl/util/symlink.py index 6e34c97fc4f142..f4c1f168165869 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 b2f8cd8a9eb0f5..61879fc4108167 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 ed66df4c88d1fe..5c64865e56d169 100644 --- a/lib/spack/spack/test/main.py +++ b/lib/spack/spack/test/main.py @@ -8,10 +8,11 @@ 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 @@ def test_version_git_nonsense_output(tmpdir, working_env, monkeypatch): 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 @@ def test_version_git_fails(tmpdir, working_env, monkeypatch): 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 @@ def test_git_sha_output(tmpdir, working_env, monkeypatch): 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 @@ def test_get_version_bad_git(tmpdir, working_env, monkeypatch): 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 0dd0109e90bff5..3090f7be5bed87 100644 --- a/lib/spack/spack/test/make_executable.py +++ b/lib/spack/spack/test/make_executable.py @@ -9,16 +9,13 @@ 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 5e855be00aee43..b62d5a3e41c787 100644 --- a/lib/spack/spack/test/mirror.py +++ b/lib/spack/spack/test/mirror.py @@ -8,22 +8,24 @@ import pytest +from llnl.util.filesystem import working_dir from llnl.util.symlink import resolve_link_target_relative_to_the_link +import spack.caches +import spack.config +import spack.fetch_strategy import spack.mirror -import spack.repo +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,7 +53,7 @@ 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)} @@ -66,8 +68,8 @@ 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.mirror.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. @@ -200,16 +202,14 @@ def test_invalid_json_mirror_collection(invalid_json, error_message): 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.mirror.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 +228,25 @@ def successful_expand(_class): 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.mirror.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 - ) + assert { + "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", + "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd.gz", + }.issubset(files_cached_in_mirror) class MockFetcher: @@ -266,31 +261,29 @@ def archive(dst): @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.mirror.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): @@ -366,3 +359,12 @@ def test_update_connection_params(direction): assert m.get_access_token(direction) == "token" assert m.get_profile(direction) == "profile" assert m.get_endpoint_url(direction) == "https://example.com" + + +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 7586728a8bc126..7190689f824dec 100644 --- a/lib/spack/spack/test/modules/common.py +++ b/lib/spack/spack/test/modules/common.py @@ -7,13 +7,18 @@ import pytest +from llnl.util.symlink import readlink + import spack.cmd.modules import spack.config import spack.error +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 +83,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 +171,7 @@ def test_get_module_upstream(): 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 +181,7 @@ def test_get_module_upstream(): 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 +193,7 @@ def find_nothing(*args): 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 +219,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 57396da426fb30..1feee7adcbaa82 100644 --- a/lib/spack/spack/test/modules/conftest.py +++ b/lib/spack/spack/test/modules/conftest.py @@ -6,11 +6,9 @@ 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 5128518caa5092..a985cb1b7e0f71 100644 --- a/lib/spack/spack/test/modules/lmod.py +++ b/lib/spack/spack/test/modules/lmod.py @@ -9,10 +9,13 @@ 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" @@ -48,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"]) @@ -355,7 +358,6 @@ def test_override_template_in_modules_yaml( 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 2714d52953fdf5..a70d910bd42a70 100644 --- a/lib/spack/spack/test/modules/tcl.py +++ b/lib/spack/spack/test/modules/tcl.py @@ -26,7 +26,7 @@ ] -@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.""" @@ -377,6 +377,14 @@ def test_suffixes(self, module_configuration, factory): 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.""" @@ -388,7 +396,7 @@ def test_setup_environment(self, modulefile_content, module_configuration): 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 @@ -439,19 +447,19 @@ def test_extend_context(self, modulefile_content, module_configuration): @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 @@ -473,8 +481,7 @@ def test_hide_implicits_with_arg(self, module_configuration): 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 0ab26060c69a41..7e5231ee936263 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"), ] diff --git a/lib/spack/spack/test/oci/integration_test.py b/lib/spack/spack/test/oci/integration_test.py index c4e2636619474b..98c1258cd2c8c1 100644 --- a/lib/spack/spack/test/oci/integration_test.py +++ b/lib/spack/spack/test/oci/integration_test.py @@ -10,12 +10,20 @@ 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 +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 @@ -34,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") @@ -57,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") @@ -77,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) @@ -94,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.""" @@ -200,7 +204,7 @@ def test_buildcache_push_with_base_image_command( def test_uploading_with_base_image_in_docker_image_manifest_v2_format( - tmp_path: pathlib.Path, mutable_database, disable_parallel_buildcache_push + 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 @@ -286,3 +290,87 @@ def test_uploading_with_base_image_in_docker_image_manifest_v2_format( 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 cc39904f3c2616..288598089d7052 100644 --- a/lib/spack/spack/test/oci/mock_registry.py +++ b/lib/spack/spack/test/oci/mock_registry.py @@ -151,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.+)/blobs/(?P.+)", self.head_blob) @@ -165,6 +167,9 @@ def __init__(self, domain: str, allow_single_post: bool = True) -> None: # 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] = {} @@ -280,10 +285,34 @@ def handle_upload(self, req: Request, name: str, digest: Digest): 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'; 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 78d713f7e84af2..efc3f3c2b06fb4 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 @@ -19,6 +20,7 @@ copy_missing_layers, get_manifest_and_config, image_from_mirror, + list_tags, upload_blob, upload_manifest, ) @@ -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 79c7e828dada2f..00000000000000 --- 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 8d1c7e37e813ca..18fab35065cefb 100644 --- a/lib/spack/spack/test/optional_deps.py +++ b/lib/spack/spack/test/optional_deps.py @@ -13,28 +13,44 @@ # 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 @@ # 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 915a53400d2da7..a8c541930bd254 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,15 @@ import llnl.util.filesystem as fs +import spack.compilers import spack.deptypes as dt +import spack.error import spack.install_test 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") @@ -142,19 +145,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"], @@ -202,7 +205,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: @@ -226,7 +229,7 @@ class URLsPackage(spack.package.Package): 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) @@ -236,7 +239,7 @@ class LicensedPackage(spack.package.Package): 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 @@ -249,21 +252,21 @@ 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 @@ -275,64 +278,10 @@ def compilers(compiler, arch_spec): 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 f2507ee57e1a17..ad4c797cf9d9c7 100644 --- a/lib/spack/spack/test/packages.py +++ b/lib/spack/spack/test/packages.py @@ -7,8 +7,11 @@ 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 @@ def test_package_name(self): 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" @@ -127,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 ] @@ -259,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") @@ -319,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 92ff4f6961d6d6..0f2d89dcce0f74 100644 --- a/lib/spack/spack/test/packaging.py +++ b/lib/spack/spack/test/packaging.py @@ -11,22 +11,26 @@ 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.mirror 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 @@ 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 @@ -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 mirror_id(self): def fetch(self): raise spack.fetch_strategy.FailedDownloadError( - "", "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 fetch(self): 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 3710c58303560a..4b5f31b904a64b 100644 --- a/lib/spack/spack/test/patch.py +++ b/lib/spack/spack/test/patch.py @@ -13,10 +13,13 @@ 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 @@ -229,7 +232,7 @@ def test_nested_directives(mock_packages): @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() @@ -268,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_stage + 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()) @@ -287,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 @@ -437,7 +437,7 @@ 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("") @@ -447,10 +447,10 @@ def test_patch_no_sha256(): 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.patch.PatchDirectiveError, match=match): + 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.patch.PatchDirectiveError, match=match): + with pytest.raises(spack.error.PatchDirectiveError, match=match): spack.patch.UrlPatch(fp, url, sha256="", archive_sha256="abc") diff --git a/lib/spack/spack/test/relocate.py b/lib/spack/spack/test/relocate.py index e02bc9ae3ac855..bceddbe7286014 100644 --- a/lib/spack/spack/test/relocate.py +++ b/lib/spack/spack/test/relocate.py @@ -9,14 +9,10 @@ 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") diff --git a/lib/spack/spack/test/repo.py b/lib/spack/spack/test/repo.py index 877b4af243ac50..a013078a82b7b0 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 d1a78f6d7e4842..55ab019a8a48f0 100644 --- a/lib/spack/spack/test/reporters.py +++ b/lib/spack/spack/test/reporters.py @@ -10,7 +10,6 @@ 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 f082b1b1539964..9cf16ce6c27c28 100644 --- a/lib/spack/spack/test/rewiring.py +++ b/lib/spack/spack/test/rewiring.py @@ -9,8 +9,10 @@ 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 @@ 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 66c4cd7bc4b15a..5177c3f90da804 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 e409f49c61bdad..d3c5ef2da46772 100644 --- a/lib/spack/spack/test/sbang.py +++ b/lib/spack/spack/test/sbang.py @@ -17,8 +17,8 @@ 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 2bf18f9195f26d..509bfd331a644a 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 index 42fdb316aa1bc9..f3d624cbd36dae 100644 --- a/lib/spack/spack/test/solver/intermediate.py +++ b/lib/spack/spack/test/solver/intermediate.py @@ -6,7 +6,6 @@ import pytest import spack.compilers -import spack.config import spack.spec from spack.concretize import UnavailableCompilerVersionError from spack.solver import asp diff --git a/lib/spack/spack/test/spack_yaml.py b/lib/spack/spack/test/spack_yaml.py index 4f3c035724ccd9..738d5f91b8ca40 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 da85be6d1c7e90..05cc15f3dabbb8 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -9,10 +9,9 @@ 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 @@ -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 @@ def test_conflicting_package_constraints(self, set_dependency): 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 @@ def test_preorder_node_traversal(self): 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 @@ def test_preorder_edge_traversal(self): 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 @@ def test_preorder_path_traversal(self): 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 @@ def test_postorder_node_traversal(self): 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 @@ def test_postorder_edge_traversal(self): 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 @@ def test_postorder_path_traversal(self): 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() - - 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 @@ def test_dependents_and_dependencies_are_correct(self): } } ) - 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 @@ def test_equal(self): 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 @@ def test_copy_simple(self): 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 @@ def test_copy_through_spec_build_interface(self): 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 @@ def check_diamond_normalized_dag(self, spec): 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 @@ def test_concretize_deptypes(self): 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 @@ def test_canonical_deptype(self): 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 @@ def test_spec_tree_respect_deptypes(self): 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 db31146df7cc9a..295665ecfbd8e6 100644 --- a/lib/spack/spack/test/spec_list.py +++ b/lib/spack/spack/test/spec_list.py @@ -6,6 +6,7 @@ import pytest +from spack.installer import PackageInstaller from spack.spec import Spec from spack.spec_list import SpecList @@ -196,21 +197,28 @@ def test_spec_list_matrix_exclude(self, mock_packages): 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 171c194dc0f5a1..a821c53f2fb934 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -7,8 +7,16 @@ 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 @@ ) +@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.""" @@ -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,65 @@ def test_abstract_specs_can_constrain_each_other(self, lhs, rhs, expected): 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"', + [("cflags", "-O3")], + [("cflags", "-O3")], + ), + ], + ) + def test_constrain_compiler_flags( + self, lhs, rhs, expected_lhs, expected_rhs, propagated_lhs, propagated_rhs + ): + """Constraining is asymmetric for compiler flags. Also note that + Spec equality does not account for flag propagation, so the checks + here are manual. + """ + 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() @@ -308,15 +477,13 @@ def test_concrete_specs_which_satisfies_abstract(self, lhs, rhs, default_mock_co ("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): @@ -343,10 +510,6 @@ def test_constraining_abstract_specs_with_empty_intersection(self, lhs, rhs): ("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"), @@ -373,7 +536,7 @@ def test_satisfies_single_valued_variant(self): 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 +553,40 @@ def test_satisfies_single_valued_variant(self): 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 +696,20 @@ def test_self_index(self): 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 +806,6 @@ def test_exceptional_paths_for_constructor(self): 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 +824,7 @@ def test_spec_formatting(self, default_mock_concretization): ("{@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 +841,13 @@ def test_spec_formatting(self, default_mock_concretization): ("{/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,6 +875,12 @@ def check_prop(check_spec, fmt_str, prop, getter): 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 @@ -706,13 +888,40 @@ def check_prop(check_spec, fmt_str, prop, getter): @pytest.mark.parametrize( "fmt_str", [ - "{@name}", - "{@version.concrete}", - "{%compiler.version}", - "{/hashd}", - "{arch=architecture.os}", + "{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") + + # 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") @@ -731,6 +940,7 @@ def test_spec_formatting_sigil_mismatches(self, default_mock_concretization, fmt r"{dag_hash}", r"{foo}", r"{+variants.debug}", + r"{variants.this_variant_does_not_exist}", ], ) def test_spec_formatting_bad_formats(self, default_mock_concretization, fmt_str): @@ -740,11 +950,11 @@ def test_spec_formatting_bad_formats(self, default_mock_concretization, 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): @@ -840,6 +1050,154 @@ def test_splice(self, transitive, default_mock_concretization): # 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") @@ -960,7 +1318,7 @@ def test_target_constraints(self, spec, constraint, expected_result): @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") @@ -972,7 +1330,7 @@ def test_satisfies_dependencies_ordered(self): @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 @@ -980,14 +1338,14 @@ def test_splice_swap_names(self, default_mock_concretization, transitive): @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 @@ -999,6 +1357,20 @@ def test_spec_override(self): 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", [ @@ -1072,9 +1444,6 @@ def test_spec_override(self): ], ) 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 @@ -1090,9 +1459,6 @@ def test_virtual_deps_bindings(self, default_mock_concretization, spec_str, spec ], ) 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() @@ -1269,15 +1635,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. @@ -1336,8 +1702,8 @@ 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() @@ -1361,8 +1727,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) @@ -1413,8 +1779,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 @@ -1488,17 +1854,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) @@ -1535,6 +1901,6 @@ def test_edge_equality_does_not_depend_on_virtual_order(): def test_old_format_strings_trigger_error(default_mock_concretization): - s = Spec("a").concretized() + s = Spec("pkg-a").concretized() with pytest.raises(SpecFormatStringError): s.format("${PACKAGE}-${VERSION}-${HASH}") diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index 2e6f4b4fba6d8f..22942862ebb997 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 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, @@ -550,6 +551,20 @@ def _specfile_for(spec_str, filename): ], "^[deptypes=build,link] zlib", ), + ( + "^[deptypes=link] zlib ^[deptypes=build] 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", [ @@ -700,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 @@ -759,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()}" @@ -851,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" @@ -865,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() @@ -874,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() @@ -952,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 5dd854628af9ad..5b64822b38268a 100644 --- a/lib/spack/spack/test/spec_yaml.py +++ b/lib/spack/spack/test/spec_yaml.py @@ -13,10 +13,12 @@ import collections.abc import gzip import inspect +import io import json import os import pytest +import ruamel.yaml import spack.hash_types as ht import spack.paths @@ -115,8 +117,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 +137,10 @@ def descend_and_check(iterable, level=0): 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 +313,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 +504,50 @@ 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 +""" + ) diff --git a/lib/spack/spack/test/stage.py b/lib/spack/spack/test/stage.py index 9648ef34e1a25a..36a9e2eef25361 100644 --- a/lib/spack/spack/test/stage.py +++ b/lib/spack/spack/test/stage.py @@ -15,14 +15,16 @@ 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 DevelopStage, 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 isinstance(stage, DIYStage): - 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 _mock(): 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( - "", "This implementation of FetchStrategy always fails" - ) - - return FailingFetchStrategy() +class FailingFetchStrategy(spack.fetch_strategy.FetchStrategy): + def fetch(self): + raise spack.fetch_strategy.FailedDownloadError( + "", "This implementation of FetchStrategy always fails" + ) @pytest.fixture @@ -511,8 +506,8 @@ def test_no_search_if_default_succeeds(self, mock_stage_archive, failing_search_ 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) @@ -527,8 +522,8 @@ def test_no_search_mirror_only(self, failing_fetch_strategy, failing_search_fn): (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): @@ -800,62 +795,6 @@ def test_stage_constructor_with_path(self, tmpdir): 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)) - - stage.create() # Only sets the flag value - - readmefn = str(fn) - assert os.path.isfile(readmefn) - with open(readmefn) as _file: - _file.read() == _readme_contents - def _create_files_from_tree(base, tree): for name, content in tree.items(): @@ -872,7 +811,7 @@ def _create_files_from_tree(base, tree): def _create_tree_from_dir_recursive(path): if os.path.islink(path): - return os.readlink(path) + return readlink(path) elif os.path.isdir(path): tree = {} for name in os.listdir(path): diff --git a/lib/spack/spack/test/svn_fetch.py b/lib/spack/spack/test/svn_fetch.py index 0b3750001431c1..de47864fc2497e 100644 --- a/lib/spack/spack/test/svn_fetch.py +++ b/lib/spack/spack/test/svn_fetch.py @@ -10,7 +10,6 @@ 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 1f5affc549cadc..e429b9f4578e2f 100644 --- a/lib/spack/spack/test/tag.py +++ b/lib/spack/spack/test/tag.py @@ -7,7 +7,7 @@ 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 6af98b6f2f1bc3..60a54e7171bba2 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 @@ -519,7 +519,7 @@ def test_find_required_file(tmpdir): 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 0876c65cc229a4..79e05c0b2c369c 100644 --- a/lib/spack/spack/test/traverse.py +++ b/lib/spack/spack/test/traverse.py @@ -272,6 +272,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"] diff --git a/lib/spack/spack/test/url_fetch.py b/lib/spack/spack/test/url_fetch.py index 6dd548d858347f..f103244a1067de 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 @@ 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 fn_urls(v): 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,7 +204,6 @@ 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", @@ -216,7 +214,6 @@ def test_from_list_url(mock_packages, config, spec, url, digest, _fetch_method): ("=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 ): @@ -265,7 +262,7 @@ def is_true(): 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() @@ -275,16 +272,15 @@ def is_true(): @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( @@ -320,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(): @@ -376,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 @@ -401,19 +363,19 @@ def getcode(self): 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 2a3e3e7e727617..00591b2f37fe1d 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/environment.py b/lib/spack/spack/test/util/environment.py index ef7c151fee1a0c..adf82aa83f4e52 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 d854ec426e2ddc..9b0536eba9510c 100644 --- a/lib/spack/spack/test/util/executable.py +++ b/lib/spack/spack/test/util/executable.py @@ -12,6 +12,7 @@ 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 cd9ce1c5b8defb..4af8a1ed0391d2 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/package_hash.py b/lib/spack/spack/test/util/package_hash.py index b613c6630d91eb..cfadae40be3eaf 100644 --- a/lib/spack/spack/test/util/package_hash.py +++ b/lib/spack/spack/test/util/package_hash.py @@ -9,6 +9,7 @@ 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 @@ def foo(): {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 9d7f66c60b323a..951502d64767de 100644 --- a/lib/spack/spack/test/util/path.py +++ b/lib/spack/spack/test/util/path.py @@ -18,6 +18,7 @@ "==> [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 @@ "==> [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 @@ def test_output_filtering(self, capfd, install_mockery, mutable_config): 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 9838324a03ef19..bf162627f5356a 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 @@ 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 e2b403f82e2f29..ed34a791528719 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.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'; rel="next"') == "/abc" + assert parse(r'; x=y; rel="next", ; x=y; rel="prev"') == "/abc" + assert parse(r'; rel="prev"; x=y, ; x=y; rel="next"') == "/def" + + # example from RFC5988 + assert ( + parse( + r"""; title*=UTF-8'de'letztes%20Kapitel; rel="previous",""" + r"""; title*=UTF-8'de'n%c3%a4chstes%20Kapitel; rel="next" """ + ) + == "/TheBook/chapter4" + ) + + assert ( + parse(r"""; key=";a=b, ; e=f"; rel="next" """) + == "https://example.com/example" + ) + + assert parse("https://example.com/example") is None + assert parse(" None: # Value with invalid type - a = VariantMap(None) + a = VariantMap(Spec()) with pytest.raises(TypeError): a["foo"] = 2 @@ -606,17 +620,17 @@ def test_invalid_values(self): 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 @@ def test_substitute(self): 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 @@ def test_satisfies_and_constrain(self): 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 @@ def test_satisfies_and_constrain(self): 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 @@ def test_copy(self): 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 @@ -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 bc97fe46677088..734ba4ca4a40f8 100644 --- a/lib/spack/spack/test/versions.py +++ b/lib/spack/spack/test/versions.py @@ -16,6 +16,7 @@ import spack.package_base import spack.spec +import spack.version from spack.version import ( EmptyRangeError, GitVersion, diff --git a/lib/spack/spack/test/views.py b/lib/spack/spack/test/views.py index 68fb286f9c24c7..2a62d04312b8cf 100644 --- a/lib/spack/spack/test/views.py +++ b/lib/spack/spack/test/views.py @@ -9,16 +9,16 @@ 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 a2b64798d0b42a..8998d89efc5fbb 100644 --- a/lib/spack/spack/test/web.py +++ b/lib/spack/spack/test/web.py @@ -17,7 +17,6 @@ import spack.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 @@ -37,6 +36,7 @@ def _create_url(relative_url): 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( @@ -148,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"} @@ -432,7 +437,7 @@ def test_ssl_curl_cert_file(cert_exists, tmpdir, ssl_scrubbed_env, mutable_confi if cert_exists: open(mock_cert, "w").close() assert os.path.isfile(mock_cert) - curl = spack.util.web._curl() + curl = spack.util.web.require_curl() # arbitrary call to query the run env dump_env = {} diff --git a/lib/spack/spack/traverse.py b/lib/spack/spack/traverse.py index 3ac2bfe24cf672..f6c5589b2aeaf7 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 NamedTuple, Union import spack.deptypes as dt import spack.spec @@ -12,11 +12,14 @@ # 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): @@ -563,10 +566,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 e9f89b02f16ba3..e81eca22f79eed 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -258,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), ] diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py index 756b7c09a2f429..b5b455fad64fa5 100644 --- a/lib/spack/spack/user_environment.py +++ b/lib/spack/spack/user_environment.py @@ -8,7 +8,6 @@ import spack.build_environment import spack.config -import spack.error import spack.spec import spack.util.environment as environment from spack import traverse diff --git a/lib/spack/spack/util/archive.py b/lib/spack/spack/util/archive.py index 8bde40017cba4d..950405887a48b8 100644 --- a/lib/spack/spack/util/archive.py +++ b/lib/spack/spack/util/archive.py @@ -12,6 +12,8 @@ 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.""" @@ -194,7 +196,7 @@ def reproducible_tarfile_from_prefix( if entry.is_symlink(): file_info.type = tarfile.SYMTYPE - file_info.linkname = os.readlink(entry.path) + 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. diff --git a/lib/spack/spack/util/classes.py b/lib/spack/spack/util/classes.py deleted file mode 100644 index 5e0b373ef8d2c3..00000000000000 --- 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/cpus.py b/lib/spack/spack/util/cpus.py index 9c98656830d338..5cf09c3e822479 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/environment.py b/lib/spack/spack/util/environment.py index 1d53d33efc2890..8db0211e4e719f 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -11,16 +11,16 @@ 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:\\", @@ -63,26 +63,6 @@ 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 @@ -110,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)] @@ -182,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 @@ -679,8 +659,8 @@ def shell_modifications( 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 = "" @@ -691,11 +671,10 @@ def shell_modifications( 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 @@ -718,9 +697,9 @@ def from_sourcing_file( (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). @@ -1054,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() @@ -1063,26 +1040,21 @@ def _source_single_file(file_and_args, environment): 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 afb8bcaa3909e5..0c1901cb1a9368 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -12,6 +12,7 @@ import llnl.util.tty as tty import spack.error +from spack.util.environment import EnvironmentModifications __all__ = ["Executable", "which", "ProcessError"] @@ -27,10 +28,10 @@ def __init__(self, name): self.exe = [file_path] self.default_env = {} - from spack.util.environment import EnvironmentModifications # no cycle self.default_envmod = EnvironmentModifications() self.returncode = None + self.ignore_quotes = False if not self.exe: raise ProcessError("Cannot construct executable for '%s'" % name) @@ -188,7 +189,7 @@ def process_cmd_output(out, err): 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. @@ -274,9 +275,9 @@ def streamify(arg, mode): 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 bc75704d757870..e72d431f978657 100644 --- a/lib/spack/spack/util/file_cache.py +++ b/lib/spack/spack/util/file_cache.py @@ -7,6 +7,7 @@ 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.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 @@ def read_transaction(self, key): 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 @@ def write_transaction(self, key): 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 00000000000000..b296438fe89e82 --- /dev/null +++ b/lib/spack/spack/util/filesystem.py @@ -0,0 +1,102 @@ +# Copyright 2013-2024 Lawrence Livermore 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 join_path +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(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 diff --git a/lib/spack/spack/util/format.py b/lib/spack/spack/util/format.py index c42597a8c3f161..acbf6f7a2437d0 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 b35876c4b297eb..99263d22d5ddb7 100644 --- a/lib/spack/spack/util/gpg.py +++ b/lib/spack/spack/util/gpg.py @@ -7,6 +7,9 @@ import functools import os import re +from typing import List + +import llnl.util.filesystem import spack.error import spack.paths @@ -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 @@ def create(**kwargs): @_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) @@ -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 index bef8859e3d5f12..55e8e3d26b6e48 100644 --- a/lib/spack/spack/util/libc.py +++ b/lib/spack/spack/util/libc.py @@ -9,7 +9,7 @@ import shlex import sys from subprocess import PIPE, run -from typing import Optional +from typing import List, Optional import spack.spec import spack.util.elf @@ -22,7 +22,7 @@ def _libc_from_ldd(ldd: str) -> Optional["spack.spec.Spec"]: except Exception: return None - if not re.search(r"\b(?:gnu|glibc|arm)\b", stdout, re.IGNORECASE): + if not re.search(r"\bFree Software Foundation\b", stdout): return None version_str = re.match(r".+\(.+\) (.+)", stdout) @@ -34,6 +34,22 @@ def _libc_from_ldd(ldd: str) -> Optional["spack.spec.Spec"]: 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) + 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"]: if not os.path.exists(dynamic_linker): return None @@ -75,7 +91,7 @@ def libc_from_dynamic_linker(dynamic_linker: str) -> Optional["spack.spec.Spec"] return spec except Exception: return None - elif re.search(r"\b(?:gnu|glibc|arm)\b", stdout, re.IGNORECASE): + elif re.search(r"\bFree Software Foundation\b", stdout): # output is like "ld.so (...) stable release version 2.33." match = re.search(r"version (\d+\.\d+(?:\.\d+)?)", stdout) if not match: @@ -128,9 +144,9 @@ def startfile_prefix(prefix: str, compatible_with: str = sys.executable) -> Opti except Exception: accept = lambda path: True - queue = [(0, prefix)] - while queue: - depth, path = queue.pop() + stack = [(0, prefix)] + while stack: + depth, path = stack.pop() try: iterator = os.scandir(path) except OSError: @@ -140,7 +156,7 @@ def startfile_prefix(prefix: str, compatible_with: str = sys.executable) -> Opti try: if entry.is_dir(follow_symlinks=True): if depth < 2: - queue.append((depth + 1, entry.path)) + stack.append((depth + 1, entry.path)) elif entry.name == "crt1.o" and accept(entry.path): return path except Exception: diff --git a/lib/spack/spack/util/lock.py b/lib/spack/spack/util/lock.py index 3f6480b26ae23c..f96145518b203e 100644 --- a/lib/spack/spack/util/lock.py +++ b/lib/spack/spack/util/lock.py @@ -19,7 +19,6 @@ 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 a0552b13ccb881..ab10d561ab6ecf 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 @@ def visit_Expr(self, node): 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 9c0ff1ab8e75ea..b16adb88582156 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 e0fa29dbccd904..5e7fa3a797b995 100644 --- a/lib/spack/spack/util/path.py +++ b/lib/spack/spack/util/path.py @@ -71,9 +71,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 +97,11 @@ def replacements(): #: 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 +155,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 +202,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 +323,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/spack_yaml.py b/lib/spack/spack/util/spack_yaml.py index f4bec63f5cc64b..d53f26350e0cd6 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 wrapper(data, stream=None, **kwargs): @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 @@ def process_scalar(self): 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 @@ def as_string(self, data) -> str: 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 8ca4cd57a3eaa8..13da43aa98f535 100644 --- a/lib/spack/spack/util/unparse/unparser.py +++ b/lib/spack/spack/util/unparse/unparser.py @@ -554,9 +554,7 @@ def visit_FormattedValue(self, node): 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 db84b03c3fcfc3..9054c7ad3fb9fe 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 ; key=value; key=value, ; 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 8c843c534617c4..892b64d333d22e 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -4,9 +4,9 @@ # 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 @@ -28,10 +28,12 @@ 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, Executable, which +from .executable import CommandNotFoundError, Executable from .gcs import GCSBlob, GCSBucket, GCSHandler from .s3 import UrllibS3Handler, get_s3_session @@ -151,7 +153,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__() @@ -159,9 +162,18 @@ def __init__(self): 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: + #
+ 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): @@ -197,8 +209,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: @@ -307,45 +319,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: @@ -379,10 +390,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)) @@ -439,9 +447,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. @@ -458,8 +464,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 @@ -635,7 +641,7 @@ def spider( 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)}]" @@ -740,10 +746,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/variant.py b/lib/spack/spack/variant.py index bb4138116fe402..0756841a638135 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 @@ def __init__( 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 @@ def isa_type(v): 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 @@ def validate_or_raise(self, vspec, pkg_cls=None): 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 @@ def make_default(self): """ 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 @@ def make_variant(self, value): 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) @@ -214,12 +259,12 @@ def convert(self, other): 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): flattened.extend(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,20 +294,20 @@ 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]]) -> "AbstractVariant": """Reconstruct a variant from a node dict.""" if isinstance(value, list): # read multi-value variants in and be faithful to the YAML @@ -269,16 +321,26 @@ def from_node_dict(name, value): return SingleValuedVariant(name, value) - 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 +350,10 @@ def value(self): 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 +361,7 @@ def _value_setter(self, value): # 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 +374,11 @@ def _value_setter(self, value): # to a set self._value = tuple(sorted(set(value))) - def _cmp_iter(self): + def _cmp_iter(self) -> Iterable: yield self.name + 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 +392,7 @@ def copy(self): 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 +406,13 @@ def satisfies(self, other): # (`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 +429,7 @@ def compatible(self, other): 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 +445,23 @@ def constrain(self, other): 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)) 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 +469,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 +489,25 @@ def satisfies(self, other): # 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 +516,33 @@ def __str__(self): 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") @@ -499,12 +557,17 @@ def constrain(self, other): raise UnsatisfiableVariantSpecError(other.value, self.value) 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 +575,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,172 +592,14 @@ def _value_setter(self, value): 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], "") - - 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): - 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): - """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 @@ -868,12 +773,15 @@ def disjoint_sets(*sets): class Value: """Conditional value that might be used in variants.""" - def __init__(self, value, when): + value: Any + when: Optional["spack.spec.Spec"] # optional b/c we need to know about disabled values + + 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"Value({self.value}, when={self.when})" def __str__(self): return str(self.value) @@ -893,15 +801,92 @@ def __lt__(self, other): return self.value < other.value +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: + 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 = [] + + 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""" -def conditional(*values, **kwargs): +def conditional(*values: List[Any], when: Optional["spack.directives.WhenType"] = None): """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"] + # _make_when_spec returns None when the condition is statically false. + when = spack.directives._make_when_spec(when) return _ConditionalVariantValues([Value(x, when=when) for x in values]) @@ -912,15 +897,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): @@ -936,11 +915,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)) @@ -949,23 +927,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 10d6f91da0f3a5..9854e8906f4015 100644 --- a/lib/spack/spack/verify.py +++ b/lib/spack/spack/verify.py @@ -9,8 +9,8 @@ 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/git_ref_lookup.py b/lib/spack/spack/version/git_ref_lookup.py index e6c47194fee33b..e7a3b02ce811cf 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.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 @@ def lookup_ref(self, ref) -> Tuple[Optional[str], int]: # 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/pyproject.toml b/pyproject.toml index 06aec6fc43a913..be97f0421ed687 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] @@ -212,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 2a3152da3d9ada..79d187fa70d48c 100644 --- a/pytest.ini +++ b/pytest.ini @@ -14,6 +14,5 @@ markers = enable_compiler_verification: enable compiler verification 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 1fa83eef1c02f4..00000000000000 --- 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 5237d8729af642..00000000000000 --- 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 cab42851089392..00000000000000 --- 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 00000000000000..6db902e1bc9783 --- /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 00000000000000..c6e5808dab13d4 --- /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 similarity index 61% rename from share/spack/bootstrap/github-actions-v0.4/metadata.yaml rename to share/spack/bootstrap/github-actions-v0.6/metadata.yaml index 0b483b547b2e86..ca2e9db88f14d8 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 00000000000000..4d61766f236739 --- /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/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index 1dc5e213b20053..f082b3b413dd02 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" @@ -64,14 +64,19 @@ 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: $SPACK_CI_DISABLE_STACKS =~ /.+/ && $SPACK_CI_STACK_NAME =~ $SPACK_CI_DISABLE_STACKS @@ -99,8 +104,6 @@ default: 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 @@ -114,16 +117,8 @@ default: .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 - - cat /proc/loadavg || true - - cat /proc/meminfo | grep 'MemTotal\|MemFree' || 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}" @@ -134,29 +129,25 @@ default: --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} audit configs - - 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" + # 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 - - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true artifacts: paths: - "${CI_PROJECT_DIR}/jobs_scratch_dir" @@ -179,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" ] @@ -196,75 +198,29 @@ default: extends: [ ".generate-base" ] tags: ["spack", "public", "medium", "neoverse_v2"] -.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 - - cat /proc/loadavg || true - - cat /proc/meminfo | grep 'MemTotal\|MemFree' || 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-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 - - cat /proc/meminfo | grep 'MemTotal\|MemFree' || 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" - 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 ######################################## @@ -313,7 +269,7 @@ protected-publish: e4s-generate: extends: [ ".e4s", ".generate-x86_64"] - image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4:2024.03.01 + image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-gcc-11.4:2024.03.01 e4s-build: extends: [ ".e4s", ".build" ] @@ -336,7 +292,7 @@ e4s-build: e4s-neoverse-v2-generate: extends: [ ".e4s-neoverse-v2", ".generate-neoverse-v2" ] - image: ecpe4s/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 + image: ghcr.io/spack/spack/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 e4s-neoverse-v2-build: extends: [ ".e4s-neoverse-v2", ".build" ] @@ -359,7 +315,7 @@ e4s-neoverse-v2-build: e4s-neoverse_v1-generate: extends: [ ".e4s-neoverse_v1", ".generate-neoverse_v1" ] - image: ecpe4s/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.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" ] @@ -382,7 +338,7 @@ e4s-neoverse_v1-build: e4s-rocm-external-generate: extends: [ ".e4s-rocm-external", ".generate-x86_64"] - image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4-rocm5.7.1:2024.03.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" ] @@ -428,7 +384,7 @@ e4s-rocm-external-build: e4s-oneapi-generate: extends: [ ".e4s-oneapi", ".generate-x86_64"] - image: ghcr.io/spack/ubuntu22.04-runner-amd64-oneapi-2024.0.0:2024.01.16b + image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-oneapi-2024.2:2024.09.06 e4s-oneapi-build: extends: [ ".e4s-oneapi", ".build" ] @@ -491,49 +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 -# manylinux2014 +# darwin ########################################### -.developer-tools-manylinux2014: - extends: [ ".linux_x86_64_v3" ] +.developer-tools-darwin: + extends: [ ".darwin_aarch64" ] variables: - SPACK_CI_STACK_NAME: developer-tools-manylinux2014 + SPACK_CI_STACK_NAME: developer-tools-darwin -developer-tools-manylinux2014-generate: - extends: [ ".developer-tools-manylinux2014", ".generate-x86_64"] - image: ecpe4s/manylinux2014:2024.03.28 +developer-tools-darwin-generate: + tags: [ "macos-ventura", "apple-clang-15", "aarch64-macos" ] + extends: [ ".developer-tools-darwin", ".generate-base"] -developer-tools-manylinux2014-build: - extends: [ ".developer-tools-manylinux2014", ".build" ] +developer-tools-darwin-build: + extends: [ ".developer-tools-darwin", ".build" ] trigger: include: - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - job: developer-tools-manylinux2014-generate + job: developer-tools-darwin-generate strategy: depend needs: - artifacts: True - job: developer-tools-manylinux2014-generate + job: developer-tools-darwin-generate ######################################### # RADIUSS @@ -718,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:v2024-01-29 + image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2 ml-linux-x86_64-cpu-build: extends: [ ".build", ".ml-linux-x86_64-cpu" ] @@ -741,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:v2024-01-29 + image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2 ml-linux-x86_64-cuda-build: extends: [ ".build", ".ml-linux-x86_64-cuda" ] @@ -754,6 +712,75 @@ ml-linux-x86_64-cuda-build: - artifacts: True job: ml-linux-x86_64-cuda-generate +######################################## +# Machine Learning - Linux x86_64 (ROCm) +######################################## +.ml-linux-x86_64-rocm: + extends: [ ".linux_x86_64_v3" ] + variables: + SPACK_CI_STACK_NAME: ml-linux-x86_64-rocm + +ml-linux-x86_64-rocm-generate: + extends: [ ".generate-x86_64", .ml-linux-x86_64-rocm, ".tags-x86_64_v4" ] + image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2 + +ml-linux-x86_64-rocm-build: + extends: [ ".build", ".ml-linux-x86_64-rocm" ] + trigger: + include: + - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml + job: ml-linux-x86_64-rocm-generate + strategy: depend + needs: + - artifacts: True + job: ml-linux-x86_64-rocm-generate + +######################################## +# 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) ######################################### @@ -777,33 +804,12 @@ ml-darwin-aarch64-mps-build: - artifacts: True job: ml-darwin-aarch64-mps-generate -######################################## -# Deprecated CI testing -######################################## -.deprecated-ci: - variables: - SPACK_CI_STACK_NAME: deprecated - -deprecated-ci-generate: - extends: [ ".generate-deprecated", ".deprecated-ci" ] - -deprecated-ci-build: - extends: [ ".build", ".deprecated-ci" ] - trigger: - include: - - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - job: deprecated-ci-generate - strategy: depend - needs: - - artifacts: True - job: deprecated-ci-generate - ######################################## # AWS ParallelCluster ######################################## .aws-pcluster-generate: - image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-01-29", "entrypoint": [""] } + 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" @@ -859,6 +865,15 @@ aws-pcluster-build-neoverse_v1: - 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" ] @@ -881,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: @@ -903,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: @@ -912,3 +929,25 @@ 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 diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml index 5f34beb2c58fee..10eb7459a71b00 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 @@ -107,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"] diff --git a/share/spack/gitlab/cloud_pipelines/configs/config.yaml b/share/spack/gitlab/cloud_pipelines/configs/config.yaml index 9ed4118e3ef0a0..fef23ade4bf903 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 6cf3846bdd5a51..893ff7e11ae690 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/linux/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml index 923e9a400da323..b6e41a9af095fb 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml @@ -258,7 +258,6 @@ ci: - py-scipy - py-statsmodels - py-warlock - - py-warpx - raja - slepc - slurm @@ -272,6 +271,7 @@ ci: - vtk - vtk-h - vtk-m + - warpx +python - zfp build-job: tags: [ "spack", "medium" ] 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 00000000000000..2d8aedf6d44455 --- /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 00000000000000..dcabcb2c8ae75e --- /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 00000000000000..b6d0089c5ac2a0 --- /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 00000000000000..8e3b45c336a2f2 --- /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 00000000000000..a08b7cdcfb7181 --- /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/expand_vars.py b/share/spack/gitlab/cloud_pipelines/scripts/common/expand_vars.py new file mode 100644 index 00000000000000..7806e10201095e --- /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 index dfd5af1b437efc..fc77f56e769459 100755 --- a/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh +++ b/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh @@ -6,29 +6,19 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) set -e -# Intel compiler needs to be installed from a specific spack git commit. -# The best solution would be to have the compilers hash (or packages contents) be part of the -# individual packages hashes. I don't see this at the moment. -# Set to the latest tag including a recent oneapi compiler. -spack_intel_compiler_commit="develop-2023-08-06" - set_pcluster_defaults() { # Set versions of pre-installed software in packages.yaml - [ -z "${SLURM_VERSION}" ] && SLURM_VERSION=$(strings /opt/slurm/lib/libslurm.so | grep -e '^VERSION' | awk '{print $2}' | sed -e 's?"??g') + [ -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_VERSION LIBFABRIC_VERSION + 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 } -setup_spack() { - spack compiler add --scope site - spack external find --scope site - # Remove all autotools/buildtools packages. These versions need to be managed by spack or it will - # eventually end up in a version mismatch (e.g. when compiling gmp). - spack tags build-tools | xargs -I {} spack config --scope site rm packages:{} -} - patch_compilers_yaml() { # Graceful exit if package not found by spack set -o pipefail @@ -76,55 +66,47 @@ EOF } install_compilers() { - # 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.3.0%gcc@7.3.1` is created as part of building the pipeline containers. - # `ghcr.io/spack/pcluster-amazonlinux-2:v2024-01-29` produced the following hashes. - if [ "x86_64" == "$(arch)" ]; then - gcc_hash="vxlibl3ubl5ptwzb3zydgksfa5osdea6" - else - gcc_hash="bikooik6f3fyrkroarulsadbii43ggz5" - fi - - spack install /${gcc_hash} - ( - spack load gcc - spack compiler add --scope site - ) - # 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 package.yaml files. - if [ "x86_64" == "$(arch)" ]; then + # 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} ( - CURRENT_SPACK_ROOT=${SPACK_ROOT} - DIR="$(mktemp -d)" - cd "${DIR}" - # This needs to include commit 361a185ddb such that `ifx` picks up the correct toolchain. Otherwise - # this leads to libstdc++.so errors during linking (e.g. slepc). - git clone --depth=1 -b ${spack_intel_compiler_commit} https://github.com/spack/spack.git \ - && cd spack \ - && curl -sL https://github.com/spack/spack/pull/40557.patch | patch -p1 \ - && curl -sL https://github.com/spack/spack/pull/40561.patch | patch -p1 \ - && cp "${CURRENT_SPACK_ROOT}/etc/spack/config.yaml" etc/spack/ \ - && cp "${CURRENT_SPACK_ROOT}/etc/spack/compilers.yaml" etc/spack/ \ - && cp "${CURRENT_SPACK_ROOT}/etc/spack/packages.yaml" etc/spack/ \ - && . share/spack/setup-env.sh \ - && spack install intel-oneapi-compilers-classic - rm -rf "${DIR}" + spack load gcc + spack compiler add --scope site ) - bash -c ". \"$(spack location -i intel-oneapi-compilers)\"/setvars.sh; spack compiler add --scope site" \ - || true - spack clean -m + + 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 -setup_spack 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 d20d054f5bfd5a..86385c90d4c1fe 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,22 +4,22 @@ 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: ~nls hdf5: @@ -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 a04f22cb6da608..2da054256c418c 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml @@ -4,22 +4,22 @@ 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: ~nls hdf5: @@ -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-neoverse_v1/packages.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/packages.yaml index dcb7eb80df55bd..c5e36807382e55 100644 --- 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 @@ -19,7 +19,10 @@ packages: llvm: variants: ~lldb mpas-model: - require: "precision=single make_target=llvm %arm ^parallelio+pnetcdf" + 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: @@ -44,7 +47,7 @@ packages: slurm: buildable: false externals: - - prefix: /opt/slurm/ + - prefix: ${SLURM_ROOT} spec: slurm@${SLURM_VERSION} +pmix wrf: require: 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 5e50716b26edec..f4080b1e6546de 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,17 +2,26 @@ spack: view: false definitions: - - optimized_configs: - - gromacs target=neoverse_v1 - - gromacs target=neoverse_n1 + - apps: + - gromacs + - mpas-model + - mpich + - openfoam + - quantum-espresso + - wrf - specs: - - $optimized_configs + - targets: + - 'target=neoverse_v1' + - 'target=neoverse_n1' + specs: + - matrix: + - [$apps] + - [$targets] ci: pipeline-gen: - build-job: - image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-01-29", "entrypoint": [""] } + image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07", "entrypoint": [""] } tags: ["aarch64"] before_script: - - . "./share/spack/setup-env.sh" 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 index 2684b27f4a7c30..eafcd37e58a186 100644 --- 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 @@ -5,15 +5,24 @@ packages: - one_of: - "cflags=-std=c18 target=x86_64_v4" - "cflags=-std=c18 target=x86_64_v3" - - "%gcc" + 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 ^intel-oneapi-mkl target=x86_64_v4" - - "+intel_provided_gcc %intel ^intel-oneapi-mkl target=x86_64_v3" - - "%gcc" - intel-mpi: - variants: +external-libfabric + - "+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: @@ -21,15 +30,19 @@ packages: lammps: require: - one_of: - - "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package +intel %intel ^intel-oneapi-mkl target=x86_64_v4" - - "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package %intel ^intel-oneapi-mkl target=x86_64_v3" - - "%gcc" + - "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" - - '%gcc' + when: "%intel" libfabric: buildable: true externals: @@ -41,13 +54,17 @@ packages: - one_of: - "cflags=-std=c18 target=x86_64_v4" - "cflags=-std=c18 target=x86_64_v3" - - "%gcc" + when: "%intel" mpas-model: require: - one_of: - - "precision=single %intel ^parallelio+pnetcdf target=x86_64_v4" - - "precision=single %intel ^parallelio+pnetcdf target=x86_64_v3" - - "%gcc" + - "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: @@ -67,9 +84,12 @@ packages: palace: require: - one_of: - - "palace %oneapi ^fmt@9.1.0 target=x86_64_v4" - - "palace %oneapi ^fmt@9.1.0 target=x86_64_v3" - - "%gcc ^fmt@9.1.0" + - "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: @@ -78,33 +98,46 @@ packages: quantum-espresso: require: - one_of: - - "quantum-espresso@6.6 %intel ^intel-oneapi-mkl+cluster target=x86_64_v4" - - "quantum-espresso@6.6 %intel ^intel-oneapi-mkl+cluster target=x86_64_v3" - - "%gcc" + - "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: /opt/slurm/ + - prefix: ${SLURM_ROOT} spec: slurm@${SLURM_VERSION} +pmix wrf: require: - one_of: - - "wrf@4 build_type=dm+sm %intel target=x86_64_v4" - - "wrf@4 build_type=dm+sm %intel 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 %intel target=x86_64_v3" - - "%gcc" + - "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: [intel, gcc] + compiler: [oneapi, gcc] permissions: read: world write: user providers: - blas: [intel-oneapi-mkl, intel-mkl] - daal: [intel-oneapi-dal, intel-daal] - fftw-api: [intel-oneapi-mkl, intel-mkl] - ipp: [intel-oneapi-ipp, intel-ipp] - lapack: [intel-oneapi-mkl, intel-mkl] - mkl: [intel-oneapi-mkl, intel-mkl] + 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, intel-mkl] + 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 index 35d099f014d688..f81bbf25376b44 100644 --- 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 @@ -2,18 +2,30 @@ 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 - - optimized_configs: - - palace target=x86_64_v4 - - palace target=x86_64_v3 + - targets: + - 'target=x86_64_v4' + - 'target=x86_64_v3' specs: - - $optimized_configs - + - matrix: + - [$apps] + - [$targets] ci: pipeline-gen: - build-job: - image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-01-29", "entrypoint": [""] } + image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07", "entrypoint": [""] } before_script: - - . "./share/spack/setup-env.sh" - . /etc/profile.d/modules.sh @@ -28,5 +40,6 @@ spack: # 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/data-vis-sdk/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml index 63feea65ffb232..17b67bb268112e 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 @@ -12,8 +12,6 @@ spack: - one_of: ['@1.14', '@1.12'] mesa: require: "+glx +osmesa +opengl ~opengles +llvm" - libosmesa: - require: "mesa +osmesa" libglx: require: "mesa +glx" ospray: @@ -26,17 +24,17 @@ spack: 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 + - - ^[virtuals=gl] glx # GLX Rendering + - ^[virtuals=gl] 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 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 017c3d9c70fdef..00000000000000 --- a/share/spack/gitlab/cloud_pipelines/stacks/deprecated/spack.yaml +++ /dev/null @@ -1,101 +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 - - cat /proc/loadavg || true - - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true - 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 - - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true - match_behavior: first - mappings: - - match: - - '@:' - runner-attributes: - id_tokens: - GITLAB_OIDC_TOKEN: - aud: "${OIDC_TOKEN_AUDIENCE}" - 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: - id_tokens: - GITLAB_OIDC_TOKEN: - aud: "${OIDC_TOKEN_AUDIENCE}" - 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: - id_tokens: - GITLAB_OIDC_TOKEN: - aud: "${OIDC_TOKEN_AUDIENCE}" - 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 00000000000000..48ab265a51211c --- /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 index 13834a8160921d..e2a3c0bf5ecf45 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-manylinux2014/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-manylinux2014/spack.yaml @@ -5,12 +5,13 @@ spack: require: target=x86_64_v3 concretizer: unify: true + reuse: false definitions: - default_specs: # editors - neovim~no_luajit - py-pynvim - - emacs@29.1+json+native+treesitter # note, pulls in gcc + - 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 @@ -56,6 +57,16 @@ spack: - 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' @@ -83,7 +94,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/manylinux2014:2024.03.28 + 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 e322387a1e638e..00000000000000 --- 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+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 - - 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 b8ef26faf5f905..1f4e526dcac8bd 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 @@ -50,7 +50,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: @@ -169,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]: *** [: 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 d4dadd8053e8ca..d7ca80212ac7f5 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 @@ -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: @@ -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 index da60cac3e46e0d..5d5ca5fbd65bed 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml @@ -34,7 +34,7 @@ spack: mpi: require: mpich mpich: - require: '~wrapperrpath ~hwloc' + require: '~wrapperrpath ~hwloc %gcc target=neoverse_v2' tbb: require: intel-tbb boost: @@ -43,45 +43,48 @@ spack: +regex +serialization +shared +signals +stacktrace +system +test +thread +timer cxxstd=17 visibility=global libffi: - require: "@3.4.4" + require: "@3.4.4 %gcc target=neoverse_v2" vtk-m: - require: "+examples" + require: "+examples %gcc target=neoverse_v2" cuda: version: [11.8.0] + paraview: + require: "+examples %gcc target=neoverse_v2" specs: # CPU - - adios - - alquimia - - aml + # - adios + # - alquimia + # - aml - amrex - arborx - - argobots + # - argobots - ascent # ecp dav - axom - - bolt - - boost + # - bolt + # - boost - butterflypack - cabana - caliper - chai - - charliecloud + # - 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 + # - flit + # - flux-core - fortrilinos - - gasnet + # - gasnet - ginkgo - - globalarrays - - gmp - - gotcha - - gptune ~mpispawn + # - globalarrays + # - gmp + # - gotcha + # - gptune ~mpispawn - gromacs +cp2k ^cp2k +mpi +dlaf build_system=cmake - h5bench - hdf5-vol-async @@ -110,10 +113,11 @@ spack: - nco - netlib-scalapack - nrm - - nvhpc + # - nvhpc + - nwchem - omega-h - openfoam - - openmpi + # - openmpi - openpmd-api - papi - papyrus @@ -131,7 +135,6 @@ spack: - py-jupyterhub - py-libensemble - py-petsc4py - - py-warpx - qthreads scheduler=distrib - quantum-espresso - raja @@ -144,35 +147,36 @@ spack: - sundials - superlu - superlu-dist - - swig@4.0.2-fortran + # - 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 + # - umap - umpire - upcxx - - veloc + # - 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 + # - adios2 + # - darshan-runtime + # - darshan-util + # - faodel + # - hdf5 + # - libcatalyst + # - parallel-netcdf # - paraview - - py-cinemasci - - sz - - unifyfs - - laghos + # - py-cinemasci + # - sz + # - unifyfs # - visit # silo: https://github.com/spack/spack/issues/39538 - - vtk-m - - zfp + # - 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 @@ -180,27 +184,6 @@ spack: # - 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 - # 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 - hpctoolkit +cuda @@ -210,107 +193,13 @@ spack: # - 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 - - cabana +cuda cuda_arch=75 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=75 - - caliper +cuda cuda_arch=75 - - chai +cuda cuda_arch=75 ^umpire ~shared - # - cp2k +mpi +cuda cuda_arch=75 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80') - - 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 - - kokkos +wrapper +cuda cuda_arch=75 - - kokkos-kernels +cuda cuda_arch=75 ^kokkos +wrapper +cuda cuda_arch=75 - - magma +cuda cuda_arch=75 - - mfem +cuda cuda_arch=75 - - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=75 - - omega-h +cuda cuda_arch=75 - - parsec +cuda cuda_arch=75 - - petsc +cuda cuda_arch=75 - - raja +cuda cuda_arch=75 - - slate +cuda cuda_arch=75 - - strumpack ~slate +cuda cuda_arch=75 - - sundials +cuda cuda_arch=75 - - superlu-dist +cuda cuda_arch=75 - - tasmanian +cuda cuda_arch=75 - - trilinos +cuda cuda_arch=75 - - umpire ~shared +cuda cuda_arch=75 - # INCLUDED IN ECP DAV CUDA - - adios2 +cuda cuda_arch=75 - # - paraview +cuda cuda_arch=75 - - 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 - # - 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 - - # CUDA 80 - - amrex +cuda cuda_arch=80 - - arborx +cuda cuda_arch=80 ^kokkos +wrapper - - cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80 - - caliper +cuda cuda_arch=80 - - chai +cuda cuda_arch=80 ^umpire ~shared - # - cp2k +mpi +cuda cuda_arch=80 # cp2k: Error: KeyError: 'Point environment variable LIBSMM_PATH to the absolute path of the libsmm.a file' - - 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 - - kokkos +wrapper +cuda cuda_arch=80 - - kokkos-kernels +cuda cuda_arch=80 ^kokkos +wrapper +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 - - raja +cuda cuda_arch=80 - - slate +cuda cuda_arch=80 - - strumpack ~slate +cuda cuda_arch=80 - - sundials +cuda cuda_arch=80 - - superlu-dist +cuda cuda_arch=80 - - tasmanian +cuda cuda_arch=80 - - trilinos +cuda cuda_arch=80 - - umpire ~shared +cuda cuda_arch=80 - # INCLUDED IN ECP DAV CUDA - - 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 - # - 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 - # 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 - # - cp2k +mpi +cuda cuda_arch=90 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80') + - fftx +cuda cuda_arch=90 - flecsi +cuda cuda_arch=90 - ginkgo +cuda cuda_arch=90 - gromacs +cuda cuda_arch=90 @@ -332,12 +221,13 @@ spack: - 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 # -- - # - 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 + # - 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 @@ -354,7 +244,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 + 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 51f2f657d79f92..948a57f8b9a007 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 @@ -34,7 +34,7 @@ spack: mpi: require: mpich mpich: - require: '~wrapperrpath ~hwloc' + require: '~wrapperrpath ~hwloc %gcc target=neoverse_v1' tbb: require: intel-tbb boost: @@ -43,9 +43,11 @@ spack: +regex +serialization +shared +signals +stacktrace +system +test +thread +timer cxxstd=17 visibility=global libffi: - require: "@3.4.4" + require: "@3.4.4 %gcc target=neoverse_v1" vtk-m: - require: "+examples" + require: "+examples %gcc target=neoverse_v1" + paraview: + require: "+examples %gcc target=neoverse_v1" cuda: version: [11.8.0] @@ -57,7 +59,6 @@ spack: - amrex - arborx - argobots - - ascent # ecp dav - axom - bolt - boost @@ -65,6 +66,7 @@ spack: - cabana - caliper - chai + - chapel ~cuda ~rocm - charliecloud - conduit - cp2k +mpi @@ -72,6 +74,7 @@ spack: - 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 @@ -112,6 +115,7 @@ spack: - netlib-scalapack - nrm - nvhpc + - nwchem - omega-h - openfoam - openmpi @@ -132,7 +136,6 @@ spack: - py-jupyterhub - py-libensemble - py-petsc4py - - py-warpx - qthreads scheduler=distrib - quantum-espresso - raja @@ -155,9 +158,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 @@ -169,16 +176,16 @@ 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 # -- - # - 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 + # - 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 @@ -207,16 +214,21 @@ 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 +cuda cuda_arch=75 ^umpire ~shared - # - cp2k +mpi +cuda cuda_arch=75 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80') + - chapel +cuda cuda_arch=75 + - cusz +cuda cuda_arch=75 + - dealii +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 @@ -231,8 +243,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 @@ -241,29 +255,29 @@ spack: - umpire ~shared +cuda cuda_arch=75 # INCLUDED IN ECP DAV CUDA - adios2 +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'. - # - paraview +cuda cuda_arch=75 # Error building some cuda componets in paraview - # - 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') + # - 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 +cuda cuda_arch=80 ^umpire ~shared - # - cp2k +mpi +cuda cuda_arch=80 # cp2k: Error: KeyError: 'Point environment variable LIBSMM_PATH to the absolute path of the libsmm.a file' + - chapel +cuda cuda_arch=80 + - cusz +cuda cuda_arch=80 + - dealii +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 @@ -278,8 +292,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 @@ -287,35 +303,34 @@ 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 - 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'. - # - paraview +cuda cuda_arch=80 # Error building some cuda componets in paraview - # - 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' + # - 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 +cuda cuda_arch=90 ^umpire ~shared - # - cp2k +mpi +cuda cuda_arch=90 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80') + - 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 @@ -323,38 +338,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: ecpe4s/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.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 1c24f0feda99a0..ea22c43fbaae0b 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -19,9 +19,8 @@ spack: elfutils: 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 @@ -39,49 +38,56 @@ spack: xz: variants: +pic mpi: - require: 'mpich@4:' + require: 'mpich@4: target=x86_64_v3' mpich: - require: '~wrapperrpath ~hwloc' + 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' + require: '%gcc target=x86_64_v3' dyninst: - require: "%gcc" + require: "%gcc target=x86_64_v3" bison: - require: '%gcc' + require: '%gcc target=x86_64_v3' + paraview: + require: "+examples %oneapi target=x86_64_v3" specs: # CPU - adios + - alquimia + - aml - amrex - arborx - argobots - axom - bolt - boost + - bricks ~cuda - butterflypack - cabana - caliper - chai - charliecloud - conduit - # - cp2k +mpi # dbcsr - datatransferkit + - dealii - 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 @@ -90,6 +96,7 @@ spack: - gasnet - ginkgo - globalarrays + - glvis ^llvm - gmp - gotcha - gptune ~mpispawn @@ -105,7 +112,6 @@ spack: - kokkos-kernels +openmp - laghos - lammps - - lbann - legion - libnrm - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp @@ -115,30 +121,33 @@ 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 + - 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 - raja - rempi @@ -150,17 +159,21 @@ spack: - 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 - 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 @@ -168,37 +181,32 @@ 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 - # - 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 - # -- - # - bricks ~cuda # bricks: /opt/intel/oneapi/compiler/2024.0/bin/sycl-post-link: error while loading shared libraries: libonnxruntime.1.12.22.721.so: cannot open shared object file: No such file or directory - # - glvis ^llvm # glvis: https://github.com/spack/spack/issues/42839 - # - pdt # pdt: pdbType.cc:193:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings] - # - quantum-espresso # quantum-espresso@7.2 /i3fqdx5: warning: :0:0: loop not unroll-and-jammed: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering - # - tau +mpi +python +syscall # pdt: pdbType.cc:193:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings] + # - 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 @@ -208,8 +216,6 @@ spack: - py-scikit-learn - py-scipy - py-seaborn - - py-mpi4py - - py-numba # - py-horovod # error # - py-jax # error # - py-matplotlib # error @@ -217,31 +223,28 @@ spack: # - py-torch # error # GPU + - aml +ze - amrex +sycl + - arborx +sycl ^kokkos +sycl +openmp cxxstd=17 +examples + - cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +examples + - ginkgo +sycl + - heffte +sycl + - kokkos +sycl +openmp cxxstd=17 +examples + - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +examples + - petsc +sycl + - sundials +sycl cxxstd=17 +examples-install - 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 - # -- - - aml # aml: /opt/intel/oneapi/compiler/2024.0/bin/sycl-post-link: error while loading shared libraries: libonnxruntime.1.12.22.721.so: cannot open shared object file: No such file or directory - - aml +ze # aml: /opt/intel/oneapi/compiler/2024.0/bin/sycl-post-link: error while loading shared libraries: libonnxruntime.1.12.22.721.so: cannot open shared object file: No such file or directory - - arborx +sycl ^kokkos +sycl +openmp cxxstd=17 +examples # kokkos@4.2.00: CMake Error at cmake/Modules/FindTPLONEDPL.cmake:31 (FIND_PACKAGE): - - cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +examples # kokkos@4.2.00: CMake Error at cmake/Modules/FindTPLONEDPL.cmake:31 (FIND_PACKAGE): - - ginkgo +sycl # ginkgo: Could NOT find PAPI (missing: PAPI_LIBRARY PAPI_INCLUDE_DIR sde) (Required is at least version "7.0.1.0") SYCL feature test compile failed! compile output is: CMake Error at /opt/intel/oneapi/compiler/2024.0/lib/cmake/IntelSYCL/IntelSYCLConfig.cmake:282 (SYCL_FEATURE_TEST_EXTRACT): SYCL_FEATURE_TEST_EXTRACT Function invoked with incorrect arguments for - - heffte +sycl # heffte: /opt/intel/oneapi/compiler/2024.0/bin/sycl-post-link: error while loading shared libraries: libonnxruntime.1.12.22.721.so: cannot open shared object file: No such file or directory - - kokkos +sycl +openmp cxxstd=17 +examples # kokkos@4.2.00: CMake Error at cmake/Modules/FindTPLONEDPL.cmake:31 (FIND_PACKAGE): - - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +examples # kokkos@4.0.00: tpls/desul/include/desul/atomics/Adapt_SYCL.hpp:83:7: error: no template named 'sycl_memory_scope' - - petsc +sycl # kokkos@4.0.00: tpls/desul/include/desul/atomics/Adapt_SYCL.hpp:83:7: error: no template named 'sycl_memory_scope' - # - slate +sycl # blaspp: CMake Error at CMakeLists.txt:313 (find_package): ... set MKL_FOUND to FALSE so package "MKL" is considered to be NOT FOUND. - - sundials +sycl cxxstd=17 +examples-install # sundials@6.6.2 /cakfnxs: CMake: could NOT find MPI_CXX (missing: MPI_CXX_WORKS) (Required is at least version "2.0.0") + # - 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/ubuntu22.04-runner-amd64-oneapi-2024.0.0:2024.01.16b + 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 597ff0a875c28d..0453392c1b04f1 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -35,19 +35,21 @@ spack: 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" + require: "@3.4.4 %gcc@9.4.0 target=ppc64le" 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: @@ -66,6 +68,7 @@ spack: - cabana - caliper - chai + - chapel ~rocm ~cuda - charliecloud - conduit - cp2k +mpi @@ -74,6 +77,7 @@ spack: - dxt-explorer - dyninst - exaworks + - fftx - flecsi - flit - flux-core @@ -114,6 +118,7 @@ spack: - netlib-scalapack - nrm - nvhpc + - nwchem - omega-h - openfoam - openmpi @@ -134,7 +139,6 @@ spack: - py-jupyterhub - py-libensemble - py-petsc4py - - py-warpx - qthreads scheduler=distrib - quantum-espresso - raja @@ -157,8 +161,10 @@ spack: - umpire - upcxx - wannier90 + - warpx +python + - wps + - wrf - xyce +mpi +shared +pymi +pymi_static_tpls - # - 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 # INCLUDED IN ECP DAV CPU - adios2 - ascent @@ -168,7 +174,6 @@ spack: - hdf5 - libcatalyst - parallel-netcdf - - paraview - py-cinemasci - sz - unifyfs @@ -176,9 +181,10 @@ 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 # -- # - 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'? @@ -211,7 +217,7 @@ spack: - 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 @@ -220,7 +226,6 @@ spack: - arborx +cuda cuda_arch=70 ^kokkos +wrapper - caliper +cuda cuda_arch=70 - chai +cuda cuda_arch=70 ^umpire ~shared - # - cp2k +mpi +cuda cuda_arch=70 # dbcsr - 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 @@ -253,6 +258,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 c234339d8dc7ce..2098645d1b1291 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 @@ -16,197 +16,202 @@ spack: mpi: require: mpich mpich: - require: '~wrapperrpath ~hwloc' + 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.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: comgr@6.2.1 + prefix: /opt/rocm-6.2.1/ hip-rocclr: buildable: false externals: - - spec: hip-rocclr@5.7.1 - prefix: /opt/rocm-5.7.1/hip + - spec: hip-rocclr@6.2.1 + prefix: /opt/rocm-6.2.1/hip hipblas: buildable: false externals: - - spec: hipblas@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: hipblas@6.2.1 + prefix: /opt/rocm-6.2.1/ hipcub: buildable: false externals: - - spec: hipcub@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: hipcub@6.2.1 + prefix: /opt/rocm-6.2.1/ hipfft: buildable: false externals: - - spec: hipfft@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: hipfft@6.2.1 + prefix: /opt/rocm-6.2.1/ hipsparse: buildable: false externals: - - spec: hipsparse@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: hipsparse@6.2.1 + prefix: /opt/rocm-6.2.1/ miopen-hip: buildable: false externals: - - spec: miopen-hip@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: miopen-hip@6.2.1 + prefix: /opt/rocm-6.2.1/ miopengemm: buildable: false externals: - - spec: miopengemm@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: miopengemm@6.2.1 + prefix: /opt/rocm-6.2.1/ rccl: buildable: false externals: - - spec: rccl@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: rccl@6.2.1 + prefix: /opt/rocm-6.2.1/ rocblas: buildable: false externals: - - spec: rocblas@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: rocblas@6.2.1 + prefix: /opt/rocm-6.2.1/ rocfft: buildable: false externals: - - spec: rocfft@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: rocfft@6.2.1 + prefix: /opt/rocm-6.2.1/ rocm-clang-ocl: buildable: false externals: - - spec: rocm-clang-ocl@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: rocm-clang-ocl@6.2.1 + prefix: /opt/rocm-6.2.1/ rocm-cmake: buildable: false externals: - - spec: rocm-cmake@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: rocm-cmake@6.2.1 + prefix: /opt/rocm-6.2.1/ rocm-dbgapi: buildable: false externals: - - spec: rocm-dbgapi@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: rocm-dbgapi@6.2.1 + prefix: /opt/rocm-6.2.1/ rocm-debug-agent: buildable: false externals: - - spec: rocm-debug-agent@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: rocm-debug-agent@6.2.1 + prefix: /opt/rocm-6.2.1/ rocm-device-libs: buildable: false externals: - - spec: rocm-device-libs@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: rocm-device-libs@6.2.1 + prefix: /opt/rocm-6.2.1/ rocm-gdb: buildable: false externals: - - spec: rocm-gdb@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: rocm-gdb@6.2.1 + prefix: /opt/rocm-6.2.1/ rocm-opencl: buildable: false externals: - - spec: rocm-opencl@5.7.1 - prefix: /opt/rocm-5.7.1/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.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: rocm-smi-lib@6.2.1 + prefix: /opt/rocm-6.2.1/ hip: buildable: false externals: - - spec: hip@5.7.1 - prefix: /opt/rocm-5.7.1 + - spec: hip@6.2.1 + prefix: /opt/rocm-6.2.1 extra_attributes: compilers: - c: /opt/rocm-5.7.1/llvm/bin/clang++ - c++: /opt/rocm-5.7.1/llvm/bin/clang++ - hip: /opt/rocm-5.7.1/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.7.1 - prefix: /opt/rocm-5.7.1 + - spec: hipify-clang@6.2.1 + prefix: /opt/rocm-6.2.1 llvm-amdgpu: buildable: false externals: - - spec: llvm-amdgpu@5.7.1 - prefix: /opt/rocm-5.7.1/llvm + - spec: llvm-amdgpu@6.2.1 + prefix: /opt/rocm-6.2.1/llvm extra_attributes: compilers: - c: /opt/rocm-5.7.1/llvm/bin/clang++ - cxx: /opt/rocm-5.7.1/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.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: hsakmt-roct@6.2.1 + prefix: /opt/rocm-6.2.1/ hsa-rocr-dev: buildable: false externals: - - spec: hsa-rocr-dev@5.7.1 - prefix: /opt/rocm-5.7.1/ + - spec: hsa-rocr-dev@6.2.1 + prefix: /opt/rocm-6.2.1/ extra_atributes: compilers: - c: /opt/rocm-5.7.1/llvm/bin/clang++ - cxx: /opt/rocm-5.7.1/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.7.1 - prefix: /opt/rocm-5.7.1 + - 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.7.1 + prefix: /opt/rocm-6.2.1 rocprim: buildable: false externals: - - spec: rocprim@5.7.1 - prefix: /opt/rocm-5.7.1 + - spec: rocprim@6.2.1 + prefix: /opt/rocm-6.2.1 rocrand: buildable: false externals: - - spec: rocrand@5.7.1 - prefix: /opt/rocm-5.7.1 + - spec: rocrand@6.2.1 + prefix: /opt/rocm-6.2.1 hipsolver: buildable: false externals: - - spec: hipsolver@5.7.1 - prefix: /opt/rocm-5.7.1 + - spec: hipsolver@6.2.1 + prefix: /opt/rocm-6.2.1 rocsolver: buildable: false externals: - - spec: rocsolver@5.7.1 - prefix: /opt/rocm-5.7.1 + - spec: rocsolver@6.2.1 + prefix: /opt/rocm-6.2.1 rocsparse: buildable: false externals: - - spec: rocsparse@5.7.1 - prefix: /opt/rocm-5.7.1 + - spec: rocsparse@6.2.1 + prefix: /opt/rocm-6.2.1 rocthrust: buildable: false externals: - - spec: rocthrust@5.7.1 - prefix: /opt/rocm-5.7.1 + - spec: rocthrust@6.2.1 + prefix: /opt/rocm-6.2.1 rocprofiler-dev: buildable: false externals: - - spec: rocprofiler-dev@5.7.1 - prefix: /opt/rocm-5.7.1 + - 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 @@ -215,9 +220,8 @@ spack: - cabana +rocm amdgpu_target=gfx908 - caliper +rocm amdgpu_target=gfx908 - chai +rocm amdgpu_target=gfx908 - # - cp2k +mpi +rocm amdgpu_target=gfx908 # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]), - 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 @@ -227,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 # slate: hip/device_gescale_row_col.hip.cc:58:49: error: use of overloaded operator '*' is ambiguous (with operand types 'HIP_vector_type' and 'const HIP_vector_type') - - 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 @@ -244,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' and 'const HIP_vector_type') + # - 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 @@ -257,9 +264,8 @@ spack: - cabana +rocm amdgpu_target=gfx90a - caliper +rocm amdgpu_target=gfx90a - chai +rocm amdgpu_target=gfx90a - # - cp2k +mpi +rocm amdgpu_target=gfx90a # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]), - 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 @@ -269,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 # slate: hip/device_gescale_row_col.hip.cc:58:49: error: use of overloaded operator '*' is ambiguous (with operand types 'HIP_vector_type' and 'const HIP_vector_type') - - 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 @@ -286,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' and 'const HIP_vector_type') + # - 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: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4-rocm5.7.1:2024.03.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 3e49aa2ce59c9f..dda9aefb9554e4 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -52,7 +52,7 @@ spack: version: [11.8.0] 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" specs: # CPU @@ -70,6 +70,7 @@ spack: - cabana - caliper - chai + - chapel ~rocm ~cuda - charliecloud - conduit - cp2k +mpi @@ -81,12 +82,14 @@ spack: - 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 @@ -126,6 +129,7 @@ spack: - netlib-scalapack - nrm - nvhpc + - nwchem - omega-h - openfoam - openmpi @@ -146,7 +150,6 @@ spack: - py-jupyterhub - py-libensemble - py-petsc4py - - py-warpx - qthreads scheduler=distrib - quantum-espresso - raja @@ -170,6 +173,8 @@ spack: - upcxx - variorum - wannier90 + - wps + - wrf - xyce +mpi +shared +pymi +pymi_static_tpls # INCLUDED IN ECP DAV CPU - adios2 @@ -185,12 +190,12 @@ 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 # -- - # - geopm # geopm: https://github.com/spack/spack/issues/38795 - # - glvis # glvis: https://github.com/spack/spack/issues/42839 + - 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 @@ -215,203 +220,168 @@ spack: - py-torch - py-deephyper - # # CUDA NOARCH - # - bricks +cuda - # - flux-core +cuda - # - hpctoolkit +cuda - # - papi +cuda - # - tau +mpi +cuda +syscall - # # -- - # # - legion +cuda # legion: needs NVIDIA driver - - # # CUDA 80 - # - amrex +cuda cuda_arch=80 - # - arborx +cuda cuda_arch=80 ^kokkos +wrapper - # - cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80 - # - caliper +cuda cuda_arch=80 - # - chai +cuda cuda_arch=80 ^umpire ~shared - # - 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 - # - 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 - # - kokkos +wrapper +cuda cuda_arch=80 - # - kokkos-kernels +cuda cuda_arch=80 ^kokkos +wrapper +cuda cuda_arch=80 - # - 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 - # - 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 - # - tasmanian +cuda cuda_arch=80 - # - 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 - # # -- - # # - 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 + # CUDA NOARCH + - bricks +cuda + - flux-core +cuda + - hpctoolkit +cuda + - papi +cuda + - tau +mpi +cuda +syscall + # -- + # - 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 - # - cusz +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 - # - 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 - # - 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 - # # - 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: - # # - lammps +cuda cuda_arch=90 # lammps: needs NVIDIA driver - # # - lbann +cuda cuda_arch=90 # concretizer: Cannot select a single "version" for package "lbann" - # # - 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 - # # - upcxx +cuda cuda_arch=90 # 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 +cuda cuda_arch=80 ^umpire ~shared + - chapel +cuda cuda_arch=80 + - cusz +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 + - kokkos +wrapper +cuda cuda_arch=80 + - kokkos-kernels +cuda cuda_arch=80 ^kokkos +wrapper +cuda cuda_arch=80 + - 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 + - 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 + - tasmanian +cuda cuda_arch=80 + - 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 + # -- + # - 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 - # # ROCM NOARCH - # - hpctoolkit +rocm - # - tau +mpi +rocm +syscall # tau: has issue with `spack env depfile` build + # 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 +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 + - 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 + - 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 + # - 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 + # -- + # - 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 # 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 + # - 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 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 +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 + # ROCM NOARCH + - hpctoolkit +rocm + - 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 +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 - # - 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 - # - umpire +rocm amdgpu_target=gfx90a - # - upcxx +rocm amdgpu_target=gfx90a - # # INCLUDED IN ECP DAV ROCM - # # - hdf5 - # # - hdf5-vol-async - # # - hdf5-vol-cache - # # - hdf5-vol-log - # # - libcatalyst - # - paraview +rocm amdgpu_target=gfx90a - # # - vtk-m ~openmp +rocm amdgpu_target=gfx90a # vtk-m: https://github.com/spack/spack/issues/40268 - # # -- - # # - 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) - # # - 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 + # ROCM 90a + - amrex +rocm amdgpu_target=gfx90a + - caliper +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 + - magma ~cuda +rocm amdgpu_target=gfx90a + - mfem +rocm amdgpu_target=gfx90a + - raja ~openmp +rocm amdgpu_target=gfx90a + - slate +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 + - umpire +rocm amdgpu_target=gfx90a + - upcxx +rocm amdgpu_target=gfx90a + # INCLUDED IN ECP DAV ROCM + # - hdf5 + # - hdf5-vol-async + # - hdf5-vol-cache + # - hdf5-vol-log + # - libcatalyst + - 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-ml4asr3rsb5biw34x6m764cbrp3zrwyk/spack-src/./src/libxsmm_gemm.c:223: undefined reference to `dgemv_' - # - cp2k +mpi +cuda cuda_arch=90 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80') - # - cp2k +mpi +rocm amdgpu_target=gfx908 # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]), - # - cp2k +mpi +rocm amdgpu_target=gfx90a # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]), + # - 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: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4:2024.03.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 263d8e29b30578..986ffa2f4648ac 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-linux-aarch64-cpu/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-aarch64-cpu/spack.yaml new file mode 100644 index 00000000000000..23ed6aa665e2fd --- /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 00000000000000..47f4eda0f12d0c --- /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 e4bd85591fc00b..31ca52dd394c67 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 @@ -67,7 +67,6 @@ spack: # TensorFlow - py-tensorflow - py-tensorflow-datasets - - py-tensorflow-estimator - py-tensorflow-hub - py-tensorflow-metadata - py-tensorflow-probability @@ -79,7 +78,7 @@ spack: pipeline-gen: - build-job: image: - name: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:v2024-01-29 + 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 68bfa16d0cb3b0..05b570f8f9a9a5 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 @@ -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,19 +72,19 @@ spack: # TensorFlow - py-tensorflow - py-tensorflow-datasets - - py-tensorflow-estimator - py-tensorflow-hub - py-tensorflow-metadata - py-tensorflow-probability # XGBoost - - py-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:v2024-01-29 + 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 new file mode 100644 index 00000000000000..4b66256255ab52 --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml @@ -0,0 +1,91 @@ +spack: + view: false + packages: + all: + require: + - target=x86_64_v3 + - ~cuda + - +rocm + - amdgpu_target=gfx90a + gl: + require: "osmesa" + mpi: + require: openmpi + + specs: + # Horovod + # - py-horovod + + # Hugging Face + - py-transformers + + # JAX + # Does not yet support Spack-installed ROCm + # - 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 + # Does not yet support Spack-installed ROCm + # - 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 + # Does not yet support Spack-installed ROCm + # - 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/radiuss/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/radiuss/spack.yaml index d40788b917d7af..3aea6fc48a435b 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 ## ~examples + - 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/windows-vis/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/windows-vis/spack.yaml new file mode 100644 index 00000000000000..1d2546b6980593 --- /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/qa/bootstrap-file.py b/share/spack/qa/bootstrap-file.py new file mode 100644 index 00000000000000..720bd99bbce5a0 --- /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/run-unit-tests b/share/spack/qa/run-unit-tests index 6808e18bdbe867..28e34a71208995 100755 --- a/share/spack/qa/run-unit-tests +++ b/share/spack/qa/run-unit-tests @@ -46,13 +46,8 @@ $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 @@ -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/validate_last_exit.ps1 b/share/spack/qa/validate_last_exit.ps1 index c8a9f7f5be7912..565968b2b1d73f 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 00000000000000..c3b91ece1fccdf --- /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 old mode 100755 new mode 100644 index 14dcee56b79fca..d091caf8dd9a54 --- a/share/spack/setup-env.csh +++ b/share/spack/setup-env.csh @@ -62,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 old mode 100755 new mode 100644 diff --git a/share/spack/setup-env.ps1 b/share/spack/setup-env.ps1 index d67e39f85bc471..88f91f261d07f4 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 old mode 100755 new mode 100644 diff --git a/share/spack/setup-tutorial-env.sh b/share/spack/setup-tutorial-env.sh old mode 100755 new mode 100644 diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash old mode 100755 new mode 100644 index 1f73849fc89337..d8c58143c97a34 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -399,7 +399,7 @@ 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 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() { @@ -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 --private -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 --private -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 @@ -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 @@ -1039,7 +1030,7 @@ _spack_env() { _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 --create --envfile --keep-relative -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 @@ -1197,14 +1188,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 -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 --deprecated --only-deprecated --install-tree --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 --deprecated --only-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() { @@ -1281,7 +1277,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 @@ -1308,7 +1304,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 @@ -1835,7 +1831,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 --fresh-roots --reuse-deps --deprecated" + 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 @@ -2031,7 +2027,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 old mode 100755 new mode 100644 index 63abb4864e8490..afea0b1a57af6c --- 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' @@ -407,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' @@ -418,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' @@ -438,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 @@ -468,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 @@ -489,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 @@ -667,7 +671,7 @@ complete -c spack -n '__fish_spack_using_command build-env' -s h -l help -d 'sho 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 @@ -688,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' @@ -700,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= private 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 @@ -720,6 +721,10 @@ 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 @@ -732,14 +737,12 @@ complete -c spack -n '__fish_spack_using_command buildcache push' -s j -l 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= private 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 @@ -752,6 +755,10 @@ 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 @@ -804,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)' @@ -895,7 +896,7 @@ 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 @@ -930,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 @@ -954,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 @@ -1040,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' @@ -1062,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' @@ -1072,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' @@ -1084,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= @@ -1136,7 +1137,7 @@ 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 @@ -1157,7 +1158,7 @@ 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 @@ -1287,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' @@ -1301,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' @@ -1372,7 +1373,7 @@ 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= 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 @@ -1404,7 +1405,7 @@ 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 @@ -1451,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 @@ -1471,22 +1472,22 @@ 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 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 managed environments' -complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a ls -d 'list managed 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 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 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' @@ -1505,20 +1506,20 @@ 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' -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 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 'either a lockfile (must end with \'.json\' or \'.lock\') or a manifest file' +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 relative develop paths verbatim into the new environment when initializing from envfile' +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' @@ -1545,13 +1546,13 @@ complete -c spack -n '__fish_spack_using_command env create' -s h -l help -d 'sh 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 'name of old environment to copy specs from' +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 f/force @@ -1561,7 +1562,7 @@ complete -c spack -n '__fish_spack_using_command env remove' -s h -l help -d 'sh 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 'remove the environment even if it is included in another environment' +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 f/force @@ -1571,7 +1572,7 @@ complete -c spack -n '__fish_spack_using_command env rm' -s h -l help -d 'show t 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 'remove the environment even if it is included in another environment' +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 @@ -1579,9 +1580,9 @@ 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 'the specified arguments correspond to directory paths' +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 'allow overwriting of an existing environment' +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 @@ -1589,9 +1590,9 @@ 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 'the specified arguments correspond to directory paths' +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 'allow overwriting of an existing environment' +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 @@ -1658,15 +1659,15 @@ 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 /' +complete -c spack -n '__fish_spack_using_command env depfile' -l make-prefix -l make-target-prefix -r -d 'prefix Makefile targets/variables with /,' 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 extensions set -g __fish_spack_optspecs_spack_extensions h/help l/long L/very-long d/deps p/paths s/show= @@ -1698,7 +1699,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 @@ -1728,7 +1729,7 @@ 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' @@ -1753,16 +1754,18 @@ complete -c spack -n '__fish_spack_using_command fetch' -l deprecated -f -a conf 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 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 deprecated only-deprecated install-tree= 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 deprecated only-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 @@ -1780,7 +1783,7 @@ complete -c spack -n '__fish_spack_using_command find' -s t -l tag -r -d 'filter 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 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 @@ -1806,7 +1809,7 @@ complete -c spack -n '__fish_spack_using_command find' -l deprecated -d 'show de 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 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 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 @@ -1814,6 +1817,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 @@ -1909,7 +1913,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' @@ -1919,8 +1923,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= @@ -1932,7 +1936,7 @@ 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 @@ -1951,7 +1955,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' @@ -1961,6 +1965,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 @@ -1976,7 +1982,7 @@ 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 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 @@ -1994,11 +2000,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 @@ -2006,7 +2012,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 @@ -2032,7 +2038,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' @@ -2134,7 +2140,7 @@ 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 @@ -2241,11 +2247,11 @@ 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 @@ -2350,7 +2356,7 @@ 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 @@ -2577,7 +2583,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 @@ -2669,9 +2675,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' @@ -2741,12 +2747,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 fresh-roots deprecated +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 @@ -2758,17 +2768,15 @@ 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 @@ -2904,7 +2912,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 @@ -2952,7 +2960,7 @@ complete -c spack -n '__fish_spack_using_command test-env' -s h -l help -d 'show 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 @@ -3104,14 +3112,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 58d11d0a73daf0..76aa9a342cc671 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 %} diff --git a/share/spack/templates/container/bootstrap-base.dockerfile b/share/spack/templates/container/bootstrap-base.dockerfile index 38de6c88494ac2..a8310a982a4f3a 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 2d99ecad91586a..00000000000000 --- 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 similarity index 83% rename from share/spack/templates/container/centos_stream.dockerfile rename to share/spack/templates/container/centos_stream9.dockerfile index c11a658fc7d960..e62c64364f79d1 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/depfile/Makefile b/share/spack/templates/depfile/Makefile index 4b764752678c0f..cd9df1491c7eb3 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/var/spack/repos/builtin.mock/packages/7zip/package.py b/var/spack/repos/builtin.mock/packages/7zip/package.py new file mode 100644 index 00000000000000..e052e02b93716b --- /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/depb/package.py b/var/spack/repos/builtin.mock/packages/depb/package.py index 7022e3472b408e..82661560b4029d 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/external-buildable-with-variant/package.py b/var/spack/repos/builtin.mock/packages/external-buildable-with-variant/package.py index 1ec1561a679c9a..28421bad1ad14b 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 00000000000000..7c4181b7b7d814 --- /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 00000000000000..3f0da784ae45f5 --- /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 00000000000000..886f4267062b2e --- /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 54b63ed79bc7cb..dd94c374270d4d 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 @@ 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 2a82fad9b552ae..b8adbac19cdc1c 100644 --- a/var/spack/repos/builtin.mock/packages/find-externals1/package.py +++ b/var/spack/repos/builtin.mock/packages/find-externals1/package.py @@ -16,6 +16,10 @@ 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) @@ -28,4 +32,4 @@ def determine_spec_details(cls, prefix, exes_in_prefix): 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/gcc/package.py b/var/spack/repos/builtin.mock/packages/gcc/package.py index 31f7c95b53684b..fa2b0309ff1ea0 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"(? "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 +26,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(BaseBuilder): + phases = ("install",) + + #: Callback names for install-time test + install_time_test_callbacks = ["test_callback"] + + def install(self, pkg, spec, prefix): + pkg.install(spec, prefix) + + spack.builder.run_after("install")(execute_install_time_tests) + + def test_callback(self): + self.pkg.test_callback() diff --git a/var/spack/repos/builtin.mock/packages/quux/package.py b/var/spack/repos/builtin.mock/packages/quux/package.py index 61ae0283c7ef85..c1575c907d57f7 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 @@ class Quux "-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/sombrero/package.py b/var/spack/repos/builtin.mock/packages/sombrero/package.py new file mode 100644 index 00000000000000..452274cb9c97d7 --- /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-vt/package.py b/var/spack/repos/builtin.mock/packages/splice-vt/package.py new file mode 100644 index 00000000000000..7e470cf2814b86 --- /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/test-dep-with-imposed-conditions/package.py b/var/spack/repos/builtin.mock/packages/test-dep-with-imposed-conditions/package.py index bcea98c52920ef..a34e504bab59ed 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 9b877c5ef4c06e..a4c3af30022023 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 @@ def install(self, spec, prefix): @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 0beae47abcb0ca..416451293fab83 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 00000000000000..253ae3829ebecf --- /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 00000000000000..533cb186f5edb0 --- /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 ebf9c92e5590eb..4ad440a10ed921 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/when-directives-false/package.py b/var/spack/repos/builtin.mock/packages/when-directives-false/package.py index d29d9d83a7b605..5f094b3da91013 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 3681b02687ef57..83119b912466a4 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 a4f6e916bb2dbd..e300a0fd366d67 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 cef5aafe472b5f..98fb4a95c087b4 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 d606757286b663..027b7e0bd2fe01 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 ed6f19609493f1..38d69f2ed5501d 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 d404510a3f9297..9ffc2a2d7d6953 100644 --- a/var/spack/repos/builtin/packages/7zip/package.py +++ b/var/spack/repos/builtin/packages/7zip/package.py @@ -15,7 +15,7 @@ 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 68cfbfea75ff49..c44cfb0676d9a7 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 21a075e0f513e8..dc4a1b9c3b1316 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 47c69fc4024217..b93ab7798f5014 100644 --- a/var/spack/repos/builtin/packages/abinit/package.py +++ b/var/spack/repos/builtin/packages/abinit/package.py @@ -24,11 +24,13 @@ 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") @@ -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 @@ def configure_args(self): 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}") @@ -169,16 +173,16 @@ def configure_args(self): ] ) 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}") @@ -187,40 +191,49 @@ def configure_args(self): # 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}") @@ -230,14 +243,14 @@ def configure_args(self): 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}") @@ -266,7 +279,7 @@ def configure_args(self): # LibXC library libxc = spec["libxc:fortran"] - if "@:8" in spec: + if spec.satisfies("@:8"): options.extend( [ f"--with-libxc-incs={libxc.headers.cpp_flags}", @@ -280,7 +293,7 @@ def configure_args(self): 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 @@ -313,10 +326,20 @@ def check(self): # 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 59c842d6517eaf..f099c8f7bbdb22 100644 --- a/var/spack/repos/builtin/packages/abseil-cpp/package.py +++ b/var/spack/repos/builtin/packages/abseil-cpp/package.py @@ -15,8 +15,11 @@ 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" ) @@ -66,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") @@ -77,13 +89,20 @@ class AbseilCpp(CMakePackage): description="C++ standard used during compilation", ) + 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 1e7f8d185e96a8..5d52353b10e7c1 100644 --- a/var/spack/repos/builtin/packages/abyss/package.py +++ b/var/spack/repos/builtin/packages/abyss/package.py @@ -36,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 d3a4b91c035239..45ffad796c7b8c 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 @@ def cmake_args(self): 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 2f0181bd085114..906f9b34f30cdf 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 dea471e673d70c..6b1a915271d95e 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 03b8d78bf1d275..89a2158420fdc9 100644 --- a/var/spack/repos/builtin/packages/ace/package.py +++ b/var/spack/repos/builtin/packages/ace/package.py @@ -26,6 +26,9 @@ class Ace(MakefilePackage): 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/package.py b/var/spack/repos/builtin/packages/acfl/package.py index 66d2ddc0b525d1..b1e30fd767906e 100644 --- a/var/spack/repos/builtin/packages/acfl/package.py +++ b/var/spack/repos/builtin/packages/acfl/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 from spack.package import * @@ -23,6 +22,7 @@ _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", @@ -36,6 +36,40 @@ } _versions = { + "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", @@ -192,39 +226,32 @@ def get_armpl_version_to_3(spec): 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_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, CompilerPackage): @@ -235,7 +262,7 @@ class Acfl(Package, CompilerPackage): 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(): @@ -310,10 +337,7 @@ def fortran(self): @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): @@ -349,7 +373,10 @@ def libs(self): 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) @@ -360,7 +387,6 @@ def headers(self): 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")) @@ -372,25 +398,12 @@ def setup_run_environment(self, env): 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", @@ -398,7 +411,7 @@ def check_install(self): "CC=" + self.cc, "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 ba30afbf22548a..c15e07a0c00e24 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 5c0dc148470de1..090ccd70e111bd 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 00af2a543ee051..3e224a39c623f6 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 caaaafa58534e8..d9954d44d2c516 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 7b1add648ad08c..0521ad4fd3f948 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 00000000000000..6de001e545bd8e --- /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 5aa29c7c20c0b1..173a9f283e7b8e 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 1d25236113c0d0..7845ada663b639 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,20 @@ class Acts(CMakePackage, CudaPackage): # Supported Acts versions version("main", branch="main") version("master", branch="main", deprecated=True) # For compatibility + 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) @@ -176,18 +189,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, @@ -198,7 +217,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") @@ -207,6 +232,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:") @@ -233,7 +267,9 @@ class Acts(CMakePackage, CudaPackage): ) variant("fatras_geant4", default=False, description="Build Geant4 Fatras package") variant("geomodel", default=False, description="Build GeoModel plugin", when="@33:") - variant("identification", default=False, description="Build the Identification plugin") + 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:31") @@ -252,8 +288,12 @@ 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( @@ -312,20 +352,30 @@ class Acts(CMakePackage, CudaPackage): 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") @@ -334,9 +384,12 @@ class Acts(CMakePackage, CudaPackage): depends_on("intel-tbb @2020.1:", when="+examples +tbb") 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") @@ -344,6 +397,7 @@ class Acts(CMakePackage, CudaPackage): depends_on("py-onnxruntime@:1.12", when="+onnx @:23.2") 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") with when("+tgeo"): @@ -355,24 +409,22 @@ class Acts(CMakePackage, CudaPackage): # 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"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} +fatras_geant4" - ) - depends_on(f"root cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} +tgeo") - else: - depends_on(f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} +geant4") - depends_on( - f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} +fatras_geant4" - ) - depends_on(f"root cxxstd={_cxxstd}", when=f"cxxstd={_cxxstd} +tgeo") + 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 @@ -438,10 +490,12 @@ def plugin_cmake_variant(plugin_name, spack_variant): 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"), ] @@ -474,10 +528,12 @@ def plugin_cmake_variant(plugin_name, spack_variant): 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]}") + 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 75e1fa85204ddc..beaf8322091c00 100644 --- a/var/spack/repos/builtin/packages/actsvg/package.py +++ b/var/spack/repos/builtin/packages/actsvg/package.py @@ -16,10 +16,18 @@ 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") @@ -33,6 +41,7 @@ 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" ) @@ -40,11 +49,13 @@ class Actsvg(CMakePackage): 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), ] diff --git a/var/spack/repos/builtin/packages/additivefoam/package.py b/var/spack/repos/builtin/packages/additivefoam/package.py index 7e7d3735ef6b43..3fed737361fb82 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 e04575b2e2a4f7..1db0d0af4aac49 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 5a542e3ab81d73..921b09076b517b 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 00000000000000..55aa3a6f44fc31 --- /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 c9640c586e6e95..e1ad9344c17153 100644 --- a/var/spack/repos/builtin/packages/adiak/package.py +++ b/var/spack/repos/builtin/packages/adiak/package.py @@ -34,6 +34,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 3b5e3bcbe19072..0b77cfd327333b 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 @@ def configure_args(self): 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 00000000000000..abd69a9d99f7e2 --- /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 +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/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 9285eaa4aa1eec..6083c1ff8aa681 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -26,10 +26,11 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage): version("master", branch="master") version( - "2.10.0", - sha256="e5984de488bda546553dd2f46f047e539333891e63b9fe73944782ba6c2d95e4", + "2.10.1", + sha256="ce776f3a451994f4979c6bd6d946917a749290a37b7433c0254759b02695ad85", preferred=True, ) + version("2.10.0", sha256="e5984de488bda546553dd2f46f047e539333891e63b9fe73944782ba6c2d95e4") version("2.9.2", sha256="78309297c82a95ee38ed3224c98b93d330128c753a43893f63bbe969320e4979") version("2.9.1", sha256="ddfa32c14494250ee8a48ef1c97a1bf6442c15484bbbd4669228a0f90242f4f9") version("2.9.0", sha256="69f98ef58c818bb5410133e1891ac192653b0ec96eb9468590140f2552b6e5d1") @@ -44,6 +45,10 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage): version("2.4.0", sha256="50ecea04b1e41c88835b4b3fd4e7bf0a0a2a3129855c9cc4ba6cf6a1575106e2") version("2.3.1", sha256="3bf81ccc20a7f2715935349336a76ba4c8402355e1dc3848fcd6f4c3c5931893") + 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 # library build types: @@ -148,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", @@ -195,6 +200,9 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage): 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") @@ -231,6 +239,10 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage): # https://github.com/ornladios/ADIOS2/pull/3893 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:") + @when("%fj") def patch(self): """add fujitsu mpi commands #16864""" @@ -283,7 +295,7 @@ def cmake_args(self): self.define("ADIOS2_USE_MGARD", False), ] - if "+sst" in spec: + if spec.satisfies("+sst"): args.extend( [ # Broken dependency package @@ -296,15 +308,15 @@ def cmake_args(self): ] ) - if "%fj" in spec: + if spec.satisfies("%fj"): args.extend(["-DCMAKE_Fortran_SUBMODULE_EXT=.smod", "-DCMAKE_Fortran_SUBMODULE_SEP=."]) # hip support - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append(self.builder.define_cuda_architectures(self)) # hip support - if "+rocm" in spec: + if spec.satisfies("+rocm"): args.append(self.builder.define_hip_architectures(self)) return args @@ -314,18 +326,18 @@ def libs(self): 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"]: @@ -333,7 +345,7 @@ def libs(self): else: libs_to_seek.add("libadios2") - if "+fortran" in spec: + if spec.satisfies("+fortran"): libs_to_seek.add("libadios2_fortran") return find_libraries( @@ -355,7 +367,7 @@ def setup_install_tests(self): 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""" @@ -382,7 +394,7 @@ def test_examples(self): 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 8e8bddbfd80793..b8d45aa5868cd1 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 434ee26ecf3f35..396c5539770b32 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 fac47fa602c0eb..e76aac4aa70e72 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 749adc5e3ed98e..a7eff71ad55282 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 @@ def configure_args(self): 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 @@ def configure_args(self): # 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 @@ def install_additional_files(self): 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,7 +148,7 @@ def install_additional_files(self): ): Executable("./checkpointing/checkpointing")() - if "+openmp" in spec: + if spec.satisfies("+openmp"): with working_dir( join_path(source_directory, "ADOL-C", "examples", "additional_examples") ): diff --git a/var/spack/repos/builtin/packages/advancecomp/package.py b/var/spack/repos/builtin/packages/advancecomp/package.py index e9d2b348d60937..7d28e0bd2cd9a0 100644 --- a/var/spack/repos/builtin/packages/advancecomp/package.py +++ b/var/spack/repos/builtin/packages/advancecomp/package.py @@ -22,6 +22,9 @@ class Advancecomp(AutotoolsPackage): 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 c466ec07cf27fe..3ba9b902331b73 100644 --- a/var/spack/repos/builtin/packages/aegean/package.py +++ b/var/spack/repos/builtin/packages/aegean/package.py @@ -20,6 +20,8 @@ class Aegean(MakefilePackage): 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 5b8912c52d7e28..a0d6373792f764 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 66580750f04d2f..3c7cfa415b5252 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 e2f31ed2a4d4ce..25fb024eca94db 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 505a248f11edce..ef8711831388c6 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 46ebb5cec19aac..51addfaa1097bb 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 db7e3dbb02a45a..dc8ea6dec0bb84 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 796a45fdf3fb24..9d27edeb6ff72a 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 b0f9ee6ac66b08..fd1ff6fe78f873 100644 --- a/var/spack/repos/builtin/packages/alembic/package.py +++ b/var/spack/repos/builtin/packages/alembic/package.py @@ -21,6 +21,8 @@ class Alembic(CMakePackage): 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 784dbfb73f1e2c..5d830bf43a0efd 100644 --- a/var/spack/repos/builtin/packages/alglib/package.py +++ b/var/spack/repos/builtin/packages/alglib/package.py @@ -21,6 +21,8 @@ class Alglib(MakefilePackage): 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/package.py b/var/spack/repos/builtin/packages/all/package.py new file mode 100644 index 00000000000000..c30254cc95c4e1 --- /dev/null +++ b/var/spack/repos/builtin/packages/all/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 All(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" + + maintainers("junghans") + + license("BSD-3-Clause", checked_by="junghans") + + 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") + + depends_on("c", type="build") + depends_on("cxx", type="build") + depends_on("fortran", type="build", when="+fortran") + depends_on("vtk", when="+vtk") + + 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"), + ] + + 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 f3be71e7a1e4b9..2a325cd3b7f5af 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") diff --git a/var/spack/repos/builtin/packages/alpaka/package.py b/var/spack/repos/builtin/packages/alpaka/package.py index 7a4b22c42065c8..85eaea4f3813e2 100644 --- a/var/spack/repos/builtin/packages/alpaka/package.py +++ b/var/spack/repos/builtin/packages/alpaka/package.py @@ -10,7 +10,7 @@ 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 5fb67270a82f61..a1a525135e4948 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 d9624e0dd46465..e13b3c30d17fbd 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 63275c66ed9c5f..b5ca6aa3f59d5d 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/ambertools/package.py b/var/spack/repos/builtin/packages/ambertools/package.py new file mode 100644 index 00000000000000..f680b43ce67b02 --- /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 9026dd74e2fad2..85f7148c818719 100644 --- a/var/spack/repos/builtin/packages/amd-aocl/package.py +++ b/var/spack/repos/builtin/packages/amd-aocl/package.py @@ -24,7 +24,8 @@ class AmdAocl(BundlePackage): maintainers("amd-toolchain-support") - version("4.2", preferred=True) + version("5.0", preferred=True) + version("4.2") version("4.1") version("4.0") version("3.2") @@ -38,21 +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", "4.2"]: + 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/package.py b/var/spack/repos/builtin/packages/amdblis/package.py index 33fd95aee4fc8d..a25f5a3c9371f6 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 @@ -39,10 +37,11 @@ class Amdblis(BlisBase): license("BSD-3-Clause") version( - "4.2", - sha256="0e1baf850ba0e6f99e79f64bbb0a59fcb838ddb5028e24527f52b407c3c62963", + "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") @@ -51,6 +50,10 @@ 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") @@ -62,18 +65,6 @@ def configure_args(self): spec = self.spec args = super().configure_args() - if not ( - spec.satisfies(r"%aocc@3.2:4.2") - or spec.satisfies(r"%gcc@12.2:13.1") - or spec.satisfies(r"%clang@15:17") - ): - tty.warn( - "AOCL has been tested to work with the following compilers " - "versions - gcc@12.2:13.1, aocc@3.2:4.2, and clang@15:17 " - "see the following aocl userguide for details: " - "https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-user-guide.pdf" - ) - if spec.satisfies("+ilp64"): args.append("--blas-int-size=64") @@ -121,3 +112,12 @@ def create_symlink(self): 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/package.py b/var/spack/repos/builtin/packages/amdfftw/package.py index 56dcd091451543..56089c214b8374 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 @@ -42,10 +41,11 @@ class Amdfftw(FftwBase): license("GPL-2.0-only") version( - "4.2", - sha256="391ef7d933e696762e3547a35b58ab18d22a6cf3e199c74889bcf25a1d1fc89b", + "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") @@ -54,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") @@ -154,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 @@ -162,31 +172,19 @@ def configure(self, spec, prefix): # 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.2") - or spec.satisfies(r"%gcc@12.2:13.1") - or spec.satisfies(r"%clang@15:17") - ): - tty.warn( - "AOCL has been tested to work with the following compilers " - "versions - gcc@12.2:13.1, aocc@3.2:4.2, and clang@15:17 " - "see the following aocl userguide for details: " - "https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-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: @@ -210,17 +208,14 @@ def configure(self, spec, prefix): # 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 00000000000000..579d2e6720093f --- /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 c8aa228f0d8f8e..d74fc4be911a12 100644 --- a/var/spack/repos/builtin/packages/amdlibflame/package.py +++ b/var/spack/repos/builtin/packages/amdlibflame/package.py @@ -4,8 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) # ----------------------------------------------------------------------------\ -from llnl.util import tty - import spack.build_systems.autotools import spack.build_systems.cmake from spack.package import * @@ -49,11 +47,13 @@ class Amdlibflame(CMakePackage, LibflameBase): maintainers("amd-toolchain-support") license("BSD-3-Clause") + version( - "4.2", - sha256="93a433c169528ffba74a99df0ba3ce3d5b1fab9bf06ce8d2fd72ee84768ed84c", + "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") @@ -62,14 +62,11 @@ class Amdlibflame(CMakePackage, LibflameBase): version("3.0", sha256="d94e08b688539748571e6d4c1ec1ce42732eac18bd75de989234983c33f01ced") version("2.2", sha256="12b9c1f92d2c2fa637305aaa15cf706652406f210eaa5cbc17aaea9fcfa576dc") + 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( - "enable-aocl-blas", - default=False, - when="@4.1.0:", - description="Enables tight coupling with AOCL-BLAS library in order to use AOCL-BLAS\ - internal routines", - ) variant( "vectorization", default="auto", @@ -90,7 +87,7 @@ class Amdlibflame(CMakePackage, LibflameBase): # Required dependencies with when("build_system=cmake"): generator("make") - depends_on("cmake@3.15.0:", type="build") + depends_on("cmake@3.22:", type="build") conflicts("threads=pthreads", msg="pthread is not supported") conflicts("threads=openmp", when="@:3", msg="openmp is not supported by amdlibflame < 4.0") @@ -99,12 +96,14 @@ class Amdlibflame(CMakePackage, 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") - for vers in ["4.1", "4.2"]: + + for vers in ["4.1", "4.2", "5.0"]: with when(f"@{vers}"): depends_on(f"aocl-utils@{vers}") @@ -124,9 +123,14 @@ def libs(self): 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"): @@ -149,10 +153,13 @@ def cmake_args(self): 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.1.0: +enable-aocl-blas"): + 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)) @@ -166,6 +173,8 @@ def cmake_args(self): else: args.append(self.define("LF_ISA_CONFIG", spec.variants["vectorization"].value)) + args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared")) + return args @@ -175,18 +184,6 @@ def configure_args(self): args = self.pkg.configure_args() spec = self.spec - if not ( - spec.satisfies(r"%aocc@3.2:4.2") - or spec.satisfies(r"%gcc@12.2:13.1") - or spec.satisfies(r"%clang@15:17") - ): - tty.warn( - "AOCL has been tested to work with the following compilers " - "versions - gcc@12.2:13.1, aocc@3.2:4.2, and clang@15:17 " - "see the following aocl userguide for details: " - "https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-user-guide.pdf" - ) - # From 3.2 version, amd optimized flags are encapsulated under: # enable-amd-aocc-flags for AOCC compiler # enable-amd-flags for all other compilers 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 00000000000000..e90653d491a94b --- /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 e0e0a36aaabb04..f1d194f535bf48 100644 --- a/var/spack/repos/builtin/packages/amdlibm/package.py +++ b/var/spack/repos/builtin/packages/amdlibm/package.py @@ -5,10 +5,7 @@ import os -from llnl.util import tty - from spack.package import * -from spack.util.cpus import determine_number_of_jobs class Amdlibm(SConsPackage): @@ -29,16 +26,17 @@ class Amdlibm(SConsPackage): _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( - "4.2", - sha256="58847b942e998b3f52eb41ae26403c7392d244fcafa707cbf23165aac24edd9e", + "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") @@ -46,24 +44,35 @@ class Amdlibm(SConsPackage): version("3.0", sha256="eb26b5e174f43ce083928d0d8748a6d6d74853333bba37d50057aac2bef7c7aa") version("2.2", commit="4033e022da428125747e118ccd6fdd9cee21c470") + 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("mpfr", type=("link")) - for vers in ["4.1", "4.2"]: + 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 = [f"-j{determine_number_of_jobs(parallel=True)}", f"--prefix={prefix}"] @@ -71,18 +80,6 @@ def build_args(self, spec, 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.2") - 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.2, and clang@15:16\ - see the following aocl userguide for details: \ - https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-user-guide.pdf" - ) - # we are circumventing the use of # Spacks compiler wrappers because # SCons wipes out all environment variables. diff --git a/var/spack/repos/builtin/packages/amdscalapack/package.py b/var/spack/repos/builtin/packages/amdscalapack/package.py index aaa489a057b523..52736eb2fabba1 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 @@ -34,10 +32,11 @@ class Amdscalapack(ScalapackBase): license("BSD-3-Clause-Open-MPI") version( - "4.2", - sha256="c6e9a846c05cdc05252b0b5f264164329812800bf13f9d97c77114dc138e6ccb", + "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") @@ -45,17 +44,29 @@ 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="%clang@16:") + 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" @@ -64,28 +75,29 @@ def url_for_version(self, version): 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.2") - or spec.satisfies(r"%gcc@12.2:13.1") - or spec.satisfies(r"%clang@15:17") - ): - tty.warn( - "AOCL has been tested to work with the following compilers " - "versions - gcc@12.2:13.1, aocc@3.2:4.2, and clang@15:17 " - "see the following aocl userguide for details: " - "https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-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( @@ -107,6 +119,8 @@ def cmake_args(self): 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)]) @@ -114,6 +128,7 @@ def cmake_args(self): args.extend( [ "-DLAPACK_FOUND=true", + "-DUSE_OPTIMIZED_LAPACK_BLAS=true", "-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc, "-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc, ] diff --git a/var/spack/repos/builtin/packages/amdsmi/package.py b/var/spack/repos/builtin/packages/amdsmi/package.py index f3388567c4144b..e51e0600328820 100644 --- a/var/spack/repos/builtin/packages/amdsmi/package.py +++ b/var/spack/repos/builtin/packages/amdsmi/package.py @@ -13,13 +13,17 @@ class Amdsmi(CMakePackage): applications to monitor and control AMD device.""" homepage = "https://github.com/ROCm/amdsmi" - url = "https://github.com/ROCm/amdsmi/archive/refs/tags/rocm-6.0.2.tar.gz" + 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.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") @@ -28,10 +32,11 @@ class Amdsmi(CMakePackage): 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 index 8bd08ffb9f4ddb..dc9f4b7e9d2b30 100644 --- a/var/spack/repos/builtin/packages/amduprof/package.py +++ b/var/spack/repos/builtin/packages/amduprof/package.py @@ -3,28 +3,44 @@ # # 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. - """ - - homepage = "https://developer.amd.com/amd-uprof/" - url = "https://download.amd.com/developer/eula/uprof/AMDuProf_Linux_x64_4.2.850.tar.bz2" - - maintainers("zzzoom") - - version("4.2.850", sha256="f2d7c4eb9ec9c32845ff8f19874c1e6bcb0fa8ab2c12e73addcbf23a6d1bd623") - - # TODO: build Power Profiling driver on Linux - # TODO: ROCm for GPU tracing and profiling - # TODO: BCC and eBPF for OS tracing + """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 dbb5ded532cbfd..b09a82400f5af4 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 @@ def build_targets(self): 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 60bf0f337d04f5..cb46c9df3f66a4 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 1e91250708515e..cf71a11353ce3e 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 @@ def cmake_args(self): 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 @@ def cmake_args(self): 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 dee1c1ca0e8dd9..cdf45388e6322a 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 @@ def configure_args(self): 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 340b473bac03c1..1ef74a1aef6363 100644 --- a/var/spack/repos/builtin/packages/amp/package.py +++ b/var/spack/repos/builtin/packages/amp/package.py @@ -70,7 +70,7 @@ def cmake_args(self): 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 @@ def cmake_args(self): ] ) - 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 @@ def cmake_args(self): 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 0bc5e2cc190c1b..5984a13b28289b 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 bbbbf33e9d7fc4..e4d083251a53ec 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 714169e1d61275..4123c2fab97d8f 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 19fbf7ffd97896..47919489006e4e 100644 --- a/var/spack/repos/builtin/packages/amr-wind/package.py +++ b/var/spack/repos/builtin/packages/amr-wind/package.py @@ -21,33 +21,41 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") version("main", branch="main", submodules=True) - version( - "1.4.0", tag="v1.4.0", commit="bdddf133e41a9b7b4c8ce28f1ea1bebec47678f5", submodules=True - ) - version( - "1.3.1", tag="v1.3.1", commit="63692889143599de57232e64a9c7e4af8f0a2e1e", submodules=True - ) - version( - "1.3.0", tag="v1.3.0", commit="f74d7b3801f0492e586d440fac729d9dec595a8b", submodules=True - ) - version( - "1.2.1", tag="v1.2.1", commit="7291737434ca339ecc765355eab88ddd529ff68f", submodules=True - ) - version( - "1.2.0", tag="v1.2.0", commit="db9add5c1c68583a9019cb7ba6776bd580b0ab3e", submodules=True - ) - version( - "1.1.0", tag="v1.1.0", commit="30396bf70f0bd5ac65dd0f7b29757b0e02b22459", submodules=True - ) - version( - "1.0.1", tag="v1.0.1", commit="aa9b7e8e63833e6ac1cc3f60fcba5140416cc139", submodules=True - ) - version( - "1.0.0", tag="v1.0.0", commit="885f4137ce7b9e6c60f48aa5e4c1a54f1418ea9e", submodules=True - ) - version( - "0.9.0", tag="v0.9.0", commit="cf66ebe31fd5f27b76a83451cd22f346e7a67160", 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") @@ -91,7 +99,7 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage): 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: +waves2amr") + 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) @@ -104,7 +112,7 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage): conflicts("+openmp", when="+cuda") conflicts("+shared", when="+cuda") - conflicts("@:1.4.0", when="+waves2amr") + conflicts("@:2.0", when="+waves2amr") def setup_build_environment(self, env): # Avoid compile errors with Intel interprocedural optimization @@ -146,11 +154,7 @@ def cmake_args(self): args.append(define("HDF5_IS_PARALLEL", spec.satisfies("+mpi"))) if spec.satisfies("+cuda"): - amrex_arch = [ - "{0:.1f}".format(float(i) / 10.0) for i in spec.variants["cuda_arch"].value - ] - if amrex_arch: - args.append(define("AMReX_CUDA_ARCH", amrex_arch)) + args.append(define("CMAKE_CUDA_ARCHITECTURES", spec.variants["cuda_arch"].value)) if spec.satisfies("+rocm"): args.append(define("CMAKE_CXX_COMPILER", spec["hip"].hipcc)) diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py index 1417a1eecc7a16..724b5130c19169 100644 --- a/var/spack/repos/builtin/packages/amrex/package.py +++ b/var/spack/repos/builtin/packages/amrex/package.py @@ -26,6 +26,11 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") version("develop", branch="development") + 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") @@ -85,6 +90,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", @@ -111,7 +120,20 @@ 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("fortran", default=False, description="Build Fortran API") variant("linear_solvers", default=True, description="Build linear solvers") variant("amrdata", default=False, description="Build data services") @@ -127,9 +149,20 @@ 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("+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, @@ -149,9 +182,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") @@ -166,9 +200,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") @@ -178,6 +213,14 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage): conflicts("%gcc@8.1.0:8.2.0", when="@21.01:21.02") # 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", @@ -265,6 +308,9 @@ def cmake_args(self): "-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(), @@ -286,20 +332,20 @@ def cmake_args(self): 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 = ["icpx"] @@ -338,7 +384,7 @@ def cmake_args(self): 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)) @@ -350,7 +396,7 @@ def setup_standalone_test(self): 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""" @@ -359,11 +405,11 @@ def test_run_install_test(self): 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 6d5f8cda84b4b1..091e57753ce99e 100644 --- a/var/spack/repos/builtin/packages/amrfinder/package.py +++ b/var/spack/repos/builtin/packages/amrfinder/package.py @@ -24,6 +24,8 @@ class Amrfinder(MakefilePackage): 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 16bfd5a732c0f2..e05668483d1844 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", @@ -146,7 +148,7 @@ def setup_build_environment(self, env): # 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 4cf123a848eed0..4f62c16454cc00 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 @@ def cmake_args(self): ) ) - 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 @@ def cmake_args(self): ) ) - 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 e7a2052c75fe5b..ce8956db292c91 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 a682aaf4dcb84e..98ce30c1bacea2 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/antimony/package.py b/var/spack/repos/builtin/packages/antimony/package.py index dfcc478f9368bf..021aea6fd158d1 100644 --- a/var/spack/repos/builtin/packages/antimony/package.py +++ b/var/spack/repos/builtin/packages/antimony/package.py @@ -9,7 +9,7 @@ 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 87cab3ca5b8e4c..baf2b4b7177cd5 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-cpp-runtime/package.py b/var/spack/repos/builtin/packages/antlr4-cpp-runtime/package.py index d8a30eaf03d9b4..e8b12cc36c779b 100644 --- a/var/spack/repos/builtin/packages/antlr4-cpp-runtime/package.py +++ b/var/spack/repos/builtin/packages/antlr4-cpp-runtime/package.py @@ -26,7 +26,7 @@ class Antlr4CppRuntime(CMakePackage): "clanglibcpp", default=False, description="Compile with clang libc++ instead of libstdc++" ) - depends_on("libuuid", type=["build", "link"], when="@:4.10.1") + depends_on("uuid", type=["build", "link"], when="@:4.10.1") depends_on("git", type=["build"]) depends_on("pkgconfig", type=["build"]) diff --git a/var/spack/repos/builtin/packages/ants/package.py b/var/spack/repos/builtin/packages/ants/package.py index b125a6e3327c34..6dcded9621c81a 100644 --- a/var/spack/repos/builtin/packages/ants/package.py +++ b/var/spack/repos/builtin/packages/ants/package.py @@ -26,6 +26,8 @@ class Ants(CMakePackage): 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 index 331ba0ba4a3315..b1949ed1558144 100644 --- a/var/spack/repos/builtin/packages/aocc/detection_test.yaml +++ b/var/spack/repos/builtin/packages/aocc/detection_test.yaml @@ -5,9 +5,9 @@ paths: - "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)\n" - echo "Target: x86_64-unknown-linux-gnu\n" - echo "Thread model: posix\n" + 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 @@ -21,9 +21,9 @@ paths: - "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)\n" - echo "Target: x86_64-unknown-linux-gnu\n" - echo "Thread model: posix\n" + 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 @@ -37,17 +37,17 @@ paths: - "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)\n" - echo "Target: x86_64-unknown-linux-gnu\n" - echo "Thread model: posix\n" + 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)\n" - echo "Target: x86_64-unknown-linux-gnu\n" - echo "Thread model: posix\n" + 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 @@ -67,7 +67,7 @@ paths: - "bin/clang" - "bin/clang++" script: | - echo "clang version 8.0.0 (tags/RELEASE_800/final" + 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" diff --git a/var/spack/repos/builtin/packages/aocc/package.py b/var/spack/repos/builtin/packages/aocc/package.py index f2451d1f63f975..0366bbe971c7e6 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, CompilerPackage): +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 @@ -32,6 +33,12 @@ class Aocc(Package, CompilerPackage): 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", @@ -53,6 +60,8 @@ class Aocc(Package, CompilerPackage): 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" @@ -78,7 +87,7 @@ class Aocc(Package, CompilerPackage): @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) @@ -105,8 +114,5 @@ def cfg_files(self): with open(join_path(self.prefix.bin, "{}.cfg".format(compiler)), "w") as f: f.write(compiler_options) - compiler_version_argument = "--version" compiler_version_regex = r"AOCC_(\d+[._]\d+[._]\d+)" - c_names = ["clang"] - cxx_names = ["clang++"] 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 index 133c92b8f4f78c..eb0d1c6c9a24c4 100644 --- a/var/spack/repos/builtin/packages/aocl-compression/package.py +++ b/var/spack/repos/builtin/packages/aocl-compression/package.py @@ -4,8 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) # ---------------------------------------------------------------------------- -from llnl.util import tty - from spack.package import * @@ -41,15 +39,19 @@ class AoclCompression(CMakePackage): _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/refs/tags/4.2.tar.gz" + url = "https://github.com/amd/aocl-compression/archive/4.2.tar.gz" maintainers("amd-toolchain-support") version( - "4.2", - sha256="a18b3e7f64a8105c1500dda7b4c343e974b5e26bfe3dd838a1c1acf82a969c6f", + "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") @@ -64,46 +66,44 @@ class AoclCompression(CMakePackage): 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.15:", type="build") + depends_on("cmake@3.22:", type="build") def cmake_args(self): """Runs ``cmake`` in the build directory""" spec = self.spec args = [] - if not ( - spec.satisfies(r"%aocc@4.1:4.2") - or spec.satisfies(r"%gcc@12.2:13.1") - or spec.satisfies(r"%clang@16:17") - ): - tty.warn( - "AOCL has been tested to work with the following compilers " - "versions - gcc@12.2:13.1, aocc@4.1:4.2, and clang@16:17 " - "see the following aocl userguide for details: " - "https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-user-guide.pdf" - ) - 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 "~shared" in spec: + if spec.satisfies("~shared"): args.append("-DBUILD_STATIC_LIBS=ON") - if "~zlib" in spec: + if spec.satisfies("~zlib"): args.append("-DAOCL_EXCLUDE_ZLIB=ON") - if "~bzip2" in spec: + if spec.satisfies("~bzip2"): args.append("-DAOCL_EXCLUDE_BZIP2=ON") - if "~snappy" in spec: + if spec.satisfies("~snappy"): args.append("-DAOCL_EXCLUDE_SNAPPY=ON") - if "~zstd" in spec: + if spec.satisfies("~zstd"): args.append("-DAOCL_EXCLUDE_ZSTD=ON") - if "~lzma" in spec: + if spec.satisfies("~lzma"): args.append("-DAOCL_EXCLUDE_LZMA=ON") - if "~lz4" in spec: + if spec.satisfies("~lz4"): args.append("-DAOCL_EXCLUDE_LZ4=ON") - if "~lz4hc" in spec: + 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 00000000000000..6043876c41db6a --- /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 index 908117655a1316..4de7a3a439b57d 100644 --- a/var/spack/repos/builtin/packages/aocl-crypto/package.py +++ b/var/spack/repos/builtin/packages/aocl-crypto/package.py @@ -2,10 +2,7 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - # ---------------------------------------------------------------------------- -from llnl.util import tty - from spack.package import * @@ -35,21 +32,35 @@ class AoclCrypto(CMakePackage): _name = "aocl-crypto" homepage = "https://www.amd.com/en/developer/aocl/cryptography.html" - git = "https://github.com/amd/aocl-crypto" - url = "https://github.com/amd/aocl-crypto/archive/refs/tags/4.2.tar.gz" + url = "https://github.com/amd/aocl-crypto/archive/4.2.tar.gz" + git = "https://github.com/amd/aocl-crypto/" maintainers("amd-toolchain-support") + version( - "4.2", - sha256="2bdbedd8ab1b28632cadff237f4abd776e809940ad3633ad90fc52ce225911fe", + "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.15:", type="build") - depends_on("openssl@3.0.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"]: + for vers in ["4.2", "5.0"]: with when(f"@={vers}"): depends_on(f"aocl-utils@={vers}") @@ -72,22 +83,22 @@ def build_directory(self): def cmake_args(self): """Runs ``cmake`` in the build directory""" spec = self.spec - if not ( - spec.satisfies(r"%aocc@4.1:4.2") - or spec.satisfies(r"%gcc@12.2:13.1") - or spec.satisfies(r"%clang@16:17") - ): - tty.warn( - "AOCL has been tested to work with the following compilers " - "versions - gcc@12.2:13.1, aocc@4.1:4.2, and clang@16:17 " - "see the following aocl userguide for details: " - "https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-user-guide.pdf" - ) - - args = ["-DCMAKE_C_COMPILER=%s" % spack_cc, "-DCMAKE_CXX_COMPILER=%s" % spack_cxx] - args.append(self.define_from_variant("ALCP_ENABLE_EXAMPLES", "examples")) - args.append("-DOPENSSL_INSTALL_DIR=" + spec["openssl"].prefix) - args.append("-DENABLE_AOCL_UTILS=ON") - args.append("-DAOCL_UTILS_INSTALL_DIR=" + spec["aocl-utils"].prefix) + + 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 00000000000000..95fbe82b44d044 --- /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 +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 00000000000000..067cb8d03d89cb --- /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 00000000000000..733ef7c048c5a6 --- /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 ++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 index 323a04c0cf97c1..d01693622556fb 100644 --- a/var/spack/repos/builtin/packages/aocl-libmem/package.py +++ b/var/spack/repos/builtin/packages/aocl-libmem/package.py @@ -4,8 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) # ---------------------------------------------------------------------------- -from llnl.util import tty - from spack.package import * @@ -31,15 +29,19 @@ class AoclLibmem(CMakePackage): _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/refs/tags/4.2.tar.gz" + url = "https://github.com/amd/aocl-libmem/archive/4.2.tar.gz" maintainers("amd-toolchain-support") version( - "4.2", - sha256="4ff5bd8002e94cc2029ef1aeda72e7cf944b797c7f07383656caa93bcb447569", + "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") @@ -52,7 +54,14 @@ class AoclLibmem(CMakePackage): multi=False, ) - depends_on("cmake@3.15:", type="build") + # 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): @@ -64,18 +73,6 @@ def cmake_args(self): """Runs ``cmake`` in the build directory""" spec = self.spec - if not ( - spec.satisfies(r"%aocc@4.1:4.2") - or spec.satisfies(r"%gcc@12.2:13.1") - or spec.satisfies(r"%clang@16:17") - ): - tty.warn( - "AOCL has been tested to work with the following compilers " - "versions - gcc@12.2:13.1, aocc@4.1:4.2, and clang@16:17 " - "see the following aocl userguide for details: " - "https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-user-guide.pdf" - ) - args = [] args.append(self.define_from_variant("ENABLE_LOGGING", "logging")) args.append(self.define_from_variant("ENABLE_TUNABLES", "tunables")) diff --git a/var/spack/repos/builtin/packages/aocl-sparse/package.py b/var/spack/repos/builtin/packages/aocl-sparse/package.py index 765bc0e3215d2c..eb438a130c5bf3 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 * @@ -33,10 +31,11 @@ class AoclSparse(CMakePackage): license("MIT") version( - "4.2", - sha256="03cd67adcfea4a574fece98b60b4aba0a6e5a9c8f608ff1ccc1fb324a7185538", + "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") @@ -44,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") @@ -55,16 +57,29 @@ class AoclSparse(CMakePackage): when="@4.0: target=zen4:", description="Enable experimental AVX512 support", ) + variant("openmp", default=True, when="@4.2:", description="Enable OpenMP support") - for vers in ["4.1", "4.2"]: + 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.15:", 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): @@ -86,18 +101,6 @@ def cmake_args(self): """Runs ``cmake`` in the build directory""" spec = self.spec - if not ( - spec.satisfies(r"%aocc@3.2:4.2") - or spec.satisfies(r"%gcc@12.2:13.1") - or spec.satisfies(r"%clang@15:17") - ): - tty.warn( - "AOCL has been tested to work with the following compilers " - "versions - gcc@12.2:13.1, aocc@3.2:4.2, and clang@15:17 " - "see the following aocl userguide for details: " - "https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-user-guide.pdf" - ) - args = [] args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared")) args.append(self.define_from_variant("BUILD_CLIENTS_SAMPLES", "examples")) @@ -108,21 +111,19 @@ def cmake_args(self): if spec.satisfies("@3.0:"): args.append(self.define_from_variant("BUILD_ILP64", "ilp64")) - if self.spec.satisfies("@4.1:"): + 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(f"-DAOCL_LIBFLAME={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 "@4.2:" in self.spec: - args.append(f"-DAOCL_UTILS_LIB={self.spec['aocl-utils'].libs}") - args.append( - "-DAOCL_UTILS_INCLUDE_DIR={0}".format(self.spec["aocl-utils"].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 diff --git a/var/spack/repos/builtin/packages/aocl-utils/package.py b/var/spack/repos/builtin/packages/aocl-utils/package.py index d32477c7814e77..343b4eb11ebf4c 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 * @@ -38,17 +36,21 @@ class AoclUtils(CMakePackage): license("BSD-3-Clause") version( - "4.2", - sha256="1294cdf275de44d3a22fea6fc4cd5bf66260d0a19abb2e488b898aaf632486bd", + "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 @@ -58,23 +60,26 @@ def libs(self): return find_libraries("libaoclutils", root=self.prefix, recursive=True, shared=shared) def cmake_args(self): - spec = self.spec - if not ( - spec.satisfies(r"%aocc@3.2:4.2") - or spec.satisfies(r"%gcc@12.2:13.1") - or spec.satisfies(r"%clang@15:17") - ): - tty.warn( - "AOCL has been tested to work with the following compilers " - "versions - gcc@12.2:13.1, aocc@3.2:4.2, and clang@15:17 " - "see the following aocl userguide for details: " - "https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-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("BUILD_SHARED_LIBS", "shared")) - 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 66309bf9fd9589..5dfc09e72203c2 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 2862b40edca617..55c78e9f35f5c1 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/apache-tvm/package.py b/var/spack/repos/builtin/packages/apache-tvm/package.py new file mode 100644 index 00000000000000..2d3301f63a89db --- /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 060c5e1f878c1c..b1e72cee7a8de2 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 b98f324b77e692..87e1a8c16f2bcb 100644 --- a/var/spack/repos/builtin/packages/apcomp/package.py +++ b/var/spack/repos/builtin/packages/apcomp/package.py @@ -9,6 +9,7 @@ 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 @@ def install(self, spec, prefix): """ 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 @@ def create_host_config(self, spec, prefix): # 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 @@ def create_host_config(self, spec, prefix): 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 @@ def create_host_config(self, spec, prefix): 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 0164ef29f1ecd6..44f98545aa8f4e 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 cb32ba52a75025..0a53de64372520 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 @@ 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 e6bb94ef3d40f0..24aa59a10f3ace 100644 --- a/var/spack/repos/builtin/packages/apex/package.py +++ b/var/spack/repos/builtin/packages/apex/package.py @@ -65,6 +65,10 @@ 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": @@ -142,7 +146,7 @@ def cmake_args(self): # 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 = "" @@ -163,29 +167,29 @@ def cmake_args(self): 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 "+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 e5a797024e3451..790f0c97b87a78 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/package.py b/var/spack/repos/builtin/packages/apple-clang/package.py index 95c3eb54c01a37..ba87604cd2e3bf 100644 --- a/var/spack/repos/builtin/packages/apple-clang/package.py +++ b/var/spack/repos/builtin/packages/apple-clang/package.py @@ -3,9 +3,10 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * +from spack.pkg.builtin.llvm import LlvmDetection -class AppleClang(BundlePackage, CompilerPackage): +class AppleClang(BundlePackage, LlvmDetection, CompilerPackage): """Apple's Clang compiler""" homepage = "https://developer.apple.com/videos/developer-tools/compiler-and-llvm" @@ -14,11 +15,7 @@ class AppleClang(BundlePackage, CompilerPackage): maintainers("alalazo") compiler_languages = ["c", "cxx"] - c_names = ["clang"] - cxx_names = ["clang++"] - compiler_version_regex = r"^Apple (?:LLVM|clang) version ([^ )]+)" - compiler_version_argument = "--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 f0140bc2d74c30..61e7076f5d5364 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 @@ def headers(self): @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 2ccf686cf9ef80..f94fba66646ba4 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 d549ddab36232e..1c989ad9846cd4 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 612f1c6f42bf27..94e42bc0ee5b9e 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 588af73fbb15c6..45719d7662708a 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 2fbe795b7702ea..6502849d719cb4 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 @@ def flag_handler(self, name, flags): # 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 8638f880c0085e..4fba7209e46650 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 @@ def configure_args(self): "--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 @@ def configure_args(self): 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 c56f4eb7a143a0..6b1eac1282bb0d 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 index 9b98edfb626714..199ed72d0f2352 100644 --- a/var/spack/repos/builtin/packages/aqlprofile/package.py +++ b/var/spack/repos/builtin/packages/aqlprofile/package.py @@ -8,6 +8,62 @@ from spack.package import * _versions = { + "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", diff --git a/var/spack/repos/builtin/packages/arbor/package.py b/var/spack/repos/builtin/packages/arbor/package.py index ac189d56aa2856..415914b7baf5ef 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 * @@ -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,21 +110,23 @@ def build_targets(self): 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.architecture.target.optimization_flags(self.spec.compiler) - 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/package.py b/var/spack/repos/builtin/packages/arborx/package.py index c193523c3904d6..b5fc91a175d542 100644 --- a/var/spack/repos/builtin/packages/arborx/package.py +++ b/var/spack/repos/builtin/packages/arborx/package.py @@ -23,6 +23,7 @@ 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") @@ -37,6 +38,8 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage): deprecated=True, ) + depends_on("cxx", type="build") # generated + # Allowed C++ standard variant( "cxxstd", @@ -72,21 +75,25 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage): 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@4.1.00:", when="@1.6:~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~trilinos") + depends_on("kokkos@4.2.00:", when="@1.7:~trilinos") 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 @@ -97,26 +104,29 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage): 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.2.0:", when="@1.5:+trilinos") - depends_on("trilinos@14.4.0:", when="@1.6:+trilinos") + depends_on("trilinos@14.0.0:", when="@1.4:1.4.1+trilinos") + depends_on("trilinos@14.2.0:", when="@1.5+trilinos") + depends_on("trilinos@14.4.0:", when="@1.6+trilinos") + depends_on("trilinos@15.1.0:", when="@1.7:+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["kokkos"] + else: + kokkos_spec = spec["trilinos"] + 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 @@ -127,7 +137,7 @@ def cmake_args(self): 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): @@ -150,7 +160,7 @@ def test_run_ctest(self): ), self.define("ArborX_ROOT", self.spec["arborx".prefix]), ] - if "+mpi" in self.spec: + 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") diff --git a/var/spack/repos/builtin/packages/arc/package.py b/var/spack/repos/builtin/packages/arc/package.py index afcad0a0beedd3..b14e81ca13ecdf 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 731d318365d310..87bd4ea79d8ad9 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 @@ def cmake_args(self): 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 e0c919b7579572..b91ab5d565d491 100644 --- a/var/spack/repos/builtin/packages/argobots/package.py +++ b/var/spack/repos/builtin/packages/argobots/package.py @@ -28,6 +28,8 @@ class Argobots(AutotoolsPackage): 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") @@ -51,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)) @@ -72,10 +74,10 @@ def configure_args(self): 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 4484e1eb52a4c9..f9227c9957e4d3 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 9cdfdc81384458..3b5fe1efdcd077 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 27c739b1684536..907cdb9370ea23 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 88604bbe50af3e..2e93563505b69b 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 cdc82973200164..83bc44605a0d1e 100644 --- a/var/spack/repos/builtin/packages/aria2/package.py +++ b/var/spack/repos/builtin/packages/aria2/package.py @@ -20,6 +20,9 @@ class Aria2(AutotoolsPackage): 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/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py index 8d5e99bd106b15..0f723296caf920 100644 --- a/var/spack/repos/builtin/packages/armadillo/package.py +++ b/var/spack/repos/builtin/packages/armadillo/package.py @@ -11,11 +11,15 @@ 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.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") @@ -26,9 +30,12 @@ class Armadillo(CMakePackage): version("8.100.1", sha256="54773f7d828bd3885c598f90122b530ded65d9b195c9034e082baea737cd138d") version("7.950.1", sha256="a32da32a0ea420b8397a53e4b40ed279c1a5fc791dd492a2ced81ffb14ad0d1b") + depends_on("cxx", type="build") # generated + 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") diff --git a/var/spack/repos/builtin/packages/armcimpi/package.py b/var/spack/repos/builtin/packages/armcimpi/package.py index e2126f5de2aefe..eed186a5ceb5b8 100644 --- a/var/spack/repos/builtin/packages/armcimpi/package.py +++ b/var/spack/repos/builtin/packages/armcimpi/package.py @@ -23,6 +23,9 @@ class Armcimpi(AutotoolsPackage): "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") diff --git a/var/spack/repos/builtin/packages/armpl-gcc/package.py b/var/spack/repos/builtin/packages/armpl-gcc/package.py index 5dbd631ccb8caa..b6dffafb85a671 100644 --- a/var/spack/repos/builtin/packages/armpl-gcc/package.py +++ b/var/spack/repos/builtin/packages/armpl-gcc/package.py @@ -21,9 +21,10 @@ "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 +37,28 @@ "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.04": { + "deb": ("a323074cd08af82f4d79988cc66088b18e47dea4b93323b1b8a0f994f769f2f0"), + "macOS": ("228bf3a2c25dbd45c2f89c78f455ee3c7dfb25e121c20d2765138b5174e688dc"), + "rpm": ("d3917523034cf5a35e4f31f9a8bf4e53e7cc97892e89739d5757cb65ce40dc2e"), + }, "23.10_gcc-12.2": { "RHEL-7": ("e5e2c69ad281a676f2a06c835fbf31d4f9fdf46aa3f3f7c8aafff46985f64902"), "RHEL-8": ("cc0f3572ead93d1e31797b7a39a40cff3414878df9bd24a452bf4877dc35ca4c"), @@ -227,28 +249,32 @@ } -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(base_url, version): 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 +283,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(base, version): + pkg_system = get_os_or_pkg_manager(version) + os = "macOS" if pkg_system == "macOS" else "linux" + + 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}" + + vn = version.replace(".", "-") + url_parts = f"{base}/{vn}/{os}/{file_name}" + return url_parts + + +def get_package_url(version): + base_url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries" + if version[:2] >= "24": + return get_package_url_from_24(base_url, version) + else: + return get_package_url_before_24(base_url, 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 +335,12 @@ 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" + url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/24-04/linux/arm-performance-libraries_24.04_deb_gcc.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: @@ -341,10 +407,17 @@ def install(self, spec, prefix): 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: @@ -359,15 +432,15 @@ def install(self, spec, prefix): 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): @@ -403,7 +476,10 @@ def libs(self): 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) @@ -421,7 +497,9 @@ def setup_run_environment(self, env): @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 df345e65a75d1d..564c684e38af76 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 @@ def libs(self): # 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 @@ def configure_args(self): + 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 23f7ad63e8e2e3..2e67af18d1060d 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 @@ def cmake_args(self): ] ) - 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 19e4cf1baaf6f7..994579cdb9d297 100644 --- a/var/spack/repos/builtin/packages/arrow/package.py +++ b/var/spack/repos/builtin/packages/arrow/package.py @@ -17,6 +17,8 @@ class Arrow(CMakePackage, CudaPackage): license("Apache-2.0") + 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") @@ -39,9 +41,15 @@ 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") @@ -72,6 +80,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", @@ -152,6 +161,7 @@ def cmake_args(self): 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 603cd0ad198a59..17080d61031c35 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 17c56040338daf..247705a956b7a7 100644 --- a/var/spack/repos/builtin/packages/ascent/package.py +++ b/var/spack/repos/builtin/packages/ascent/package.py @@ -55,13 +55,17 @@ 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,12 +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("raja+openmp", when="+raja +openmp") - depends_on("raja~openmp", when="+raja ~openmp") - depends_on("umpire", when="+umpire") - depends_on("umpire@:2023.06.0", when="@:0.9.2 +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 @@ -201,6 +216,7 @@ class Ascent(CMakePackage, CudaPackage): ####################### 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") @@ -215,6 +231,7 @@ class Ascent(CMakePackage, CudaPackage): 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 @@ -380,7 +397,7 @@ def hostconfig(self): ####################### 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 @@ -398,7 +415,7 @@ def hostconfig(self): # 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") @@ -433,14 +450,14 @@ def hostconfig(self): 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")) @@ -465,7 +482,7 @@ def hostconfig(self): ####################### # 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")) @@ -518,7 +535,7 @@ def hostconfig(self): # 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")) @@ -529,7 +546,7 @@ def hostconfig(self): 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 @@ -544,7 +561,7 @@ def hostconfig(self): 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): @@ -555,14 +572,14 @@ def hostconfig(self): 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)) @@ -575,12 +592,12 @@ def hostconfig(self): 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")) @@ -590,7 +607,7 @@ def hostconfig(self): ####################### 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")) @@ -600,7 +617,7 @@ def hostconfig(self): 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: @@ -616,7 +633,7 @@ def hostconfig(self): ####################### # 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: @@ -625,7 +642,7 @@ def hostconfig(self): ####################### # 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: @@ -643,7 +660,7 @@ def hostconfig(self): ####################### # 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: @@ -652,7 +669,7 @@ def hostconfig(self): ####################### # 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: @@ -661,7 +678,7 @@ def hostconfig(self): ####################### # 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")) @@ -682,7 +699,7 @@ def hostconfig(self): ####################### 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") @@ -692,7 +709,7 @@ def hostconfig(self): ####################### 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") @@ -701,7 +718,7 @@ def hostconfig(self): # 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 5e31e98cd9ca06..80f8e6bd97cb4b 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,6 +17,12 @@ 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") @@ -31,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 d0c37005d13e35..1379229232d3a6 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 b2d15a98142c78..069d3c7635c8e7 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 8a7a1c65209645..27d1acb3e79a4c 100644 --- a/var/spack/repos/builtin/packages/asio/package.py +++ b/var/spack/repos/builtin/packages/asio/package.py @@ -19,6 +19,9 @@ 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") @@ -59,6 +62,8 @@ class Asio(AutotoolsPackage): version("1.16.1", sha256="e40bbd531530f08318b7c7d7e84e457176d8eae6f5ad2e3714dc27b9131ecd35") version("1.16.0", sha256="c87410ea62de6245aa239b9ed2057edf01d7f66acc3f5e50add9a29343c87512") + depends_on("cxx", type="build") + depends_on("autoconf", type="build") depends_on("automake", type="build") depends_on("m4", type="build") diff --git a/var/spack/repos/builtin/packages/aspa/package.py b/var/spack/repos/builtin/packages/aspa/package.py index 2356a09bd6b538..0e56447380c481 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 fcd2675ac3bf36..6d6d50546a38c6 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 914869a2e5e2ed..1f627498732042 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 2cda1b9ac045de..75f1b2aef5597b 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 4bb759b5199f66..3714c696531aad 100644 --- a/var/spack/repos/builtin/packages/aspell6-de/package.py +++ b/var/spack/repos/builtin/packages/aspell6-de/package.py @@ -14,6 +14,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 afd3bdbfb6ef1f..34b018b776f460 100644 --- a/var/spack/repos/builtin/packages/aspell6-en/package.py +++ b/var/spack/repos/builtin/packages/aspell6-en/package.py @@ -12,6 +12,9 @@ class Aspell6En(AspellDictPackage, GNUMirrorPackage): homepage = "http://aspell.net/" 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 8b015b59d65d32..2e51f75e53e11e 100644 --- a/var/spack/repos/builtin/packages/assimp/package.py +++ b/var/spack/repos/builtin/packages/assimp/package.py @@ -16,9 +16,11 @@ 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") @@ -39,6 +41,9 @@ 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:") @@ -50,10 +55,10 @@ def patch(self): 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 @@ -63,3 +68,12 @@ def flag_handler(self, name, flags): if name == "cxxflags": flags.append(self.compiler.cxx11_flag) return (None, None, flags) + + def check(self): + unit = Executable(join_path(self.builder.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 4a06d3658a0eca..a430bda03cf82b 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 716a5f7c1e6529..ca55f48483d020 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -12,7 +12,7 @@ class Astyle(CMakePackage, MakefilePackage): Objective-C, C#, and Java Source Code. """ - homepage = "http://astyle.sourceforge.net/" + 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 @@ -30,6 +30,8 @@ class Astyle(CMakePackage, MakefilePackage): 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") 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 5d421477584255..584d008a5d4a6d 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 cc8911a29c36a1..e779c0003f8025 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,8 @@ 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") @@ -27,6 +29,8 @@ 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:") diff --git a/var/spack/repos/builtin/packages/atf/package.py b/var/spack/repos/builtin/packages/atf/package.py index a0916aec82a495..979211cab3b864 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 cf4da42d09283a..dad789c8da8427 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 @@ def setup_build_environment(self, env): 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 @@ def setup_build_environment(self, env): 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 @@ def configure_args(self): 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 bcb6425b081521..50fb042771c07a 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 3788044cd2785d..207f67c250f6f3 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( @@ -97,7 +100,7 @@ def install(self, spec, prefix): # 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' ? @@ -126,7 +129,7 @@ def install(self, spec, prefix): make("check") make("ptcheck") make("time") - if "+shared" in spec: + if spec.satisfies("+shared"): with working_dir("lib"): make("shared_all") @@ -140,7 +143,7 @@ def libs(self): # 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/package.py b/var/spack/repos/builtin/packages/atmi/package.py index 07c9e9fe4397b0..439f2c27796e4e 100644 --- a/var/spack/repos/builtin/packages/atmi/package.py +++ b/var/spack/repos/builtin/packages/atmi/package.py @@ -23,33 +23,18 @@ 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") with default_args(deprecated=True): - 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.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 [ - "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", - ]: + 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}") @@ -59,8 +44,6 @@ class Atmi(CMakePackage): root_cmakelists_dir = "src" - # 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 c056dedccba596..cf062ef3aeebfc 100644 --- a/var/spack/repos/builtin/packages/atompaw/package.py +++ b/var/spack/repos/builtin/packages/atompaw/package.py @@ -29,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 f87d6c0c6ada94..1136b5741bdb01 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 3ab1244986fcc2..d8659708493611 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 d6737186f5ee1c..2ee953de775767 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 9e3332032ceaf9..aae305611de3e9 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 aa9877a2933c9e..105c692ecad1b0 100644 --- a/var/spack/repos/builtin/packages/audit-userspace/package.py +++ b/var/spack/repos/builtin/packages/audit-userspace/package.py @@ -15,15 +15,24 @@ 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 a80de62d02f479..fe979ec5b91bf4 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 @@ def edit(self, spec, prefix): 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 @@ def edit(self, spec, prefix): 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 @@ def filter_sbang(self): 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 230d32196ef88e..fa02a85c18c533 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 fb61a06610ece3..9bdd979206af47 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 94489a1194b159..939f394b9e6903 100644 --- a/var/spack/repos/builtin/packages/autoconf/package.py +++ b/var/spack/repos/builtin/packages/autoconf/package.py @@ -84,7 +84,7 @@ def patch(self): # 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 @@ def filter_sbang(self): # 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 ac7b50477e43be..42d4b5b1f95b56 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 e687cfd4ce73b3..f37859b13f581c 100644 --- a/var/spack/repos/builtin/packages/autodock-gpu/package.py +++ b/var/spack/repos/builtin/packages/autodock-gpu/package.py @@ -22,6 +22,8 @@ class AutodockGpu(MakefilePackage, CudaPackage): version("develop", branch="develop") + depends_on("cxx", type="build") # generated + variant( "device", default="cuda", diff --git a/var/spack/repos/builtin/packages/autodock-vina/package.py b/var/spack/repos/builtin/packages/autodock-vina/package.py index f1cfa5694c303e..b4104e99377712 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 895970b374eb66..2266205e226d51 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 @@ def configure_args(self): "--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 bd488830d08934..4006fbaf888b70 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 d0ae1456edcacf..4d5943de06bf55 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 @@ def determine_version(cls, exe): 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 c128a1033f545b..adb7474869c4f3 100644 --- a/var/spack/repos/builtin/packages/aws-ofi-nccl/package.py +++ b/var/spack/repos/builtin/packages/aws-ofi-nccl/package.py @@ -26,6 +26,8 @@ class AwsOfiNccl(AutotoolsPackage): 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") 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 f831c885375434..abb83477a423c5 100644 --- a/var/spack/repos/builtin/packages/aws-ofi-rccl/package.py +++ b/var/spack/repos/builtin/packages/aws-ofi-rccl/package.py @@ -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 cdea77da7e8ef4..82227f0a6f7788 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 c26d4c2ac11a4d..ea9973c1257db5 100644 --- a/var/spack/repos/builtin/packages/awscli-v2/package.py +++ b/var/spack/repos/builtin/packages/awscli-v2/package.py @@ -11,29 +11,34 @@ 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.15.53", sha256="a4f5fd4e09b8f2fb3d2049d0610c7b0993f9aafaf427f299439f05643b25eb4b") version("2.13.22", sha256="dd731a2ba5973f3219f24c8b332a223a29d959493c8a8e93746d65877d02afc1") - depends_on("python@3.8:3.11", 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", "run")): + depends_on("python@3.8:") + depends_on("py-flit-core@3.7.1:3.8.0") + depends_on("py-colorama@0.2.5:0.4.6") + depends_on("py-docutils@0.10:0.19") + # Remove upper bound to enable Python 3.12 support + # depends_on("py-cryptography@3.3.2:40.0.1") + depends_on("py-cryptography@3.3.2:") + depends_on("py-ruamel-yaml@0.15:0.17.21") + depends_on("py-ruamel-yaml-clib@0.2:0.2.7", when="^python@:3.9") + depends_on("py-prompt-toolkit@3.0.24:3.0.38") + depends_on("py-distro@1.5:1.8") + depends_on("py-awscrt@0.16.4:0.16.16", when="@2.13") + depends_on("py-awscrt@0.19.18:0.19.19", when="@2.15") + depends_on("py-python-dateutil@2.1:2.8.2") + 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") + @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 75990f4f940ca4..93cf39625345ec 100644 --- a/var/spack/repos/builtin/packages/axel/package.py +++ b/var/spack/repos/builtin/packages/axel/package.py @@ -14,14 +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 381d47578b06a6..119cf81da28336 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,8 @@ class Axl(CMakePackage): deprecated=True, ) + depends_on("c", type="build") # generated + depends_on("kvtree") depends_on("zlib-api", type="link") @@ -62,6 +65,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 +90,10 @@ def cmake_args(self): 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 +110,6 @@ def cmake_args(self): 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 8cba91e7a8ddd8..5791fa3df97ebe 100644 --- a/var/spack/repos/builtin/packages/axom/package.py +++ b/var/spack/repos/builtin/packages/axom/package.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import glob import os import shutil import socket @@ -41,6 +40,8 @@ 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") @@ -59,6 +60,10 @@ 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") @@ -239,11 +244,11 @@ def cache_name(self): # 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, @@ -257,7 +262,7 @@ def initconfig_compiler_entries(self): 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") @@ -278,7 +283,7 @@ def initconfig_compiler_entries(self): entries.append(cmake_cache_string("BLT_CXX_STD", "c++14", "")) # Add optimization flag workaround for Debug builds with cray compiler or newer HIP - if "+rocm" in spec: + if spec.satisfies("+rocm"): entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-O1 -g -DNDEBUG")) return entries @@ -287,7 +292,7 @@ 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("CMAKE_CUDA_SEPARABLE_COMPILATION", True)) @@ -300,7 +305,7 @@ def initconfig_hardware_entries(self): 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" @@ -309,7 +314,7 @@ def initconfig_hardware_entries(self): 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("# Axom ROCm specifics\n") entries.append("#------------------{0}\n\n".format("-" * 60)) @@ -381,7 +386,7 @@ def initconfig_hardware_entries(self): 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) @@ -436,7 +441,7 @@ def initconfig_mpi_entries(self): 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")) @@ -492,7 +497,7 @@ def initconfig_package_entries(self): else: entries.append("# %s not built\n" % dep.upper()) - if "+profiling" in spec: + if spec.satisfies("+profiling"): dep_dir = get_spec_path(spec, "adiak", path_replacements) entries.append(cmake_cache_path("ADIAK_DIR", dep_dir)) @@ -504,7 +509,7 @@ def initconfig_package_entries(self): 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)) @@ -537,7 +542,7 @@ def initconfig_package_entries(self): 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) @@ -616,34 +621,29 @@ def build_test(self): @run_after("install") @on_package_attributes(run_tests=True) - def check_install(self): - """ - Checks the spack install of axom using axom's - using-with-cmake example - """ - - print("Checking Axom installation...") - spec = self.spec - install_prefix = spec.prefix - example_src_dir = join_path(install_prefix, "examples", "axom", "using-with-cmake") - example_build_dir = join_path(example_src_dir, "build") - print("Checking using-with-cmake example...") - with working_dir(example_build_dir, create=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() - print("Checking using-with-make example...") - example_src_dir = join_path(install_prefix, "examples", "axom", "using-with-make") - example_build_dir = join_path(example_src_dir, "build") - example_files = glob.glob(join_path(example_src_dir, "*")) - with working_dir(example_build_dir, create=True): - for example_file in example_files: - shutil.copy(example_file, ".") - make("AXOM_DIR={0}".format(install_prefix)) + 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() - - def test_install(self): - self.check_install() + make("clean") diff --git a/var/spack/repos/builtin/packages/babelflow/package.py b/var/spack/repos/builtin/packages/babelflow/package.py index 7be4ce4d726c22..ccaacb0421024e 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 4b2a1c58571eb0..ec85b2d3569bc4 100644 --- a/var/spack/repos/builtin/packages/babelstream/package.py +++ b/var/spack/repos/builtin/packages/babelstream/package.py @@ -26,6 +26,8 @@ class Babelstream(CMakePackage, CudaPackage, ROCmPackage): version("main", branch="main") version("develop", branch="develop") + depends_on("cxx", type="build") # generated + maintainers("tomdeakin", "kaanolgu", "tom91136", "robj0nes") # Languages @@ -54,7 +56,7 @@ class Babelstream(CMakePackage, CudaPackage, ROCmPackage): # 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") + variant("acc_target", values=str, default="none", description="Enable CPU Target for ACC") # STD conflicts conflicts("+stddata", when="%gcc@:10.1.0", msg="STD-data requires newer version of GCC") @@ -75,7 +77,7 @@ class Babelstream(CMakePackage, CudaPackage, ROCmPackage): conflicts( "offload=none", when="+raja", - msg="RAJA requires architecture to be specfied by target=[CPU,NVIDIA]", + msg="RAJA requires architecture to be specfied by acc_target=[CPU,NVIDIA]", ) # download raja from https://github.com/LLNL/RAJA @@ -251,7 +253,7 @@ def cmake_args(self): # SYCL # =================================== - if "+sycl" in self.spec: + if self.spec.satisfies("+sycl"): args.append("-DSYCL_COMPILER=" + self.spec.variants["implementation"].value.upper()) if self.spec.variants["implementation"].value.upper() != "ONEAPI-DPCPP": args.append( @@ -264,7 +266,7 @@ def cmake_args(self): # SYCL 2020 # =================================== - if "+sycl2020" in self.spec: + if self.spec.satisfies("+sycl2020"): 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 @@ -286,7 +288,7 @@ def cmake_args(self): # HIP(ROCM) # =================================== - if "+rocm" in self.spec: + if self.spec.satisfies("+rocm"): hip_comp = self.spec["rocm"].prefix + "/bin/hipcc" args.append("-DCMAKE_CXX_COMPILER=" + hip_comp) args.append( @@ -301,14 +303,14 @@ def cmake_args(self): # TBB # =================================== - if "+tbb" in self.spec: + if self.spec.satisfies("+tbb"): args.append("-DONE_TBB_DIR=" + self.spec["tbb"].prefix + "/tbb/latest/") args.append("-DPARTITIONER=" + self.spec.variants["partitioner"].value.upper()) # =================================== # OpenCL (ocl) # =================================== - if "+ocl" in self.spec: + if self.spec.satisfies("+ocl"): if "backend" in self.spec.variants: if "cuda" in self.spec.variants["backend"].value: cuda_dir = self.spec["cuda"].prefix @@ -331,7 +333,7 @@ def cmake_args(self): # =================================== # RAJA # =================================== - if "+raja" in self.spec: + if self.spec.satisfies("+raja"): args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx) args.append("-DRAJA_IN_TREE=" + self.spec.variants["dir"].value) if "offload" in self.spec.variants: @@ -341,7 +343,6 @@ def cmake_args(self): 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) @@ -358,7 +359,7 @@ def cmake_args(self): # =================================== # THRUST # =================================== - if "+thrust" in self.spec: + if self.spec.satisfies("+thrust"): if "cuda" in self.spec.variants["implementation"].value: args.append("-DTHRUST_IMPL=" + self.spec.variants["implementation"].value.upper()) args.append("-SDK_DIR=" + self.spec["thrust"].prefix + "/include") @@ -383,7 +384,7 @@ def cmake_args(self): # =================================== # 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] - if "+kokkos" in self.spec: + if self.spec.satisfies("+kokkos"): 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) @@ -391,20 +392,20 @@ def cmake_args(self): 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]) + cuda_arch = 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") + if cuda_arch in ("30", "32", "35", "37"): + args.append("-D" + "Kokkos_ARCH_KEPLER" + 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") + if cuda_arch in ("50", "52", "53"): + args.append("-D" + "Kokkos_ARCH_MAXWELL" + cuda_arch + "=ON") # arhitecture pascal optimisations - if int_cuda_arch in (60, 61): - args.append("-D" + "Kokkos_ARCH_PASCAL" + str(int_cuda_arch) + "=ON") + if cuda_arch in ("60", "61"): + args.append("-D" + "Kokkos_ARCH_PASCAL" + 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: + if cuda_arch in ("70", "72"): + args.append("-D" + "Kokkos_ARCH_VOLTA" + cuda_arch + "=ON") + if cuda_arch == "75": args.append("-DKokkos_ARCH_TURING75=ON") if "omp" in self.spec.variants["backend"].value: args.append("-DKokkos_ENABLE_OPENMP=ON") diff --git a/var/spack/repos/builtin/packages/babeltrace/package.py b/var/spack/repos/builtin/packages/babeltrace/package.py index af0552d6a01f90..59e565b5451990 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 dc9b480eaed07a..f4ce9d3be4105e 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 2cb6528c4f6a5e..676dab9849498d 100644 --- a/var/spack/repos/builtin/packages/bacio/package.py +++ b/var/spack/repos/builtin/packages/bacio/package.py @@ -20,16 +20,10 @@ class Bacio(CMakePackage): 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:") diff --git a/var/spack/repos/builtin/packages/backward-cpp/package.py b/var/spack/repos/builtin/packages/backward-cpp/package.py index 05e7a5ae32324c..7905f6682a618d 100644 --- a/var/spack/repos/builtin/packages/backward-cpp/package.py +++ b/var/spack/repos/builtin/packages/backward-cpp/package.py @@ -24,6 +24,8 @@ class BackwardCpp(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/bam-readcount/package.py b/var/spack/repos/builtin/packages/bam-readcount/package.py index 3a5bb85905da8d..e7373d4cdcd2bb 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 ae30012e3ab737..fe0f4c518491c7 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 9080d471e20c98..e89438222ac32a 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 f6007ae761f816..cb26f3b6867c69 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 b568cb8385d554..975bf3252911a8 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 c997b5a18c7ff6..fa230b1e355fe4 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 7bd7abbb4d12b3..7a60ff04e6ec48 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 d3920734349605..03895d2444263b 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 @@ def edit(self, spec, prefix): 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 @@ def install(self, spec, prefix): 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 867025f02cdf02..3be94ae1445b9e 100644 --- a/var/spack/repos/builtin/packages/barvinok/package.py +++ b/var/spack/repos/builtin/packages/barvinok/package.py @@ -33,6 +33,6 @@ def configure_args(self): 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 245be3d518be33..5d835d2aa44bf0 100644 --- a/var/spack/repos/builtin/packages/bash-completion/package.py +++ b/var/spack/repos/builtin/packages/bash-completion/package.py @@ -20,6 +20,8 @@ class BashCompletion(AutotoolsPackage): 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") diff --git a/var/spack/repos/builtin/packages/bash/package.py b/var/spack/repos/builtin/packages/bash/package.py index e7b4c1c3b1b386..4af7b56e98c2e9 100644 --- a/var/spack/repos/builtin/packages/bash/package.py +++ b/var/spack/repos/builtin/packages/bash/package.py @@ -22,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:") @@ -44,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"), @@ -190,6 +203,9 @@ def configure_args(self): args.append(f"--with-libiconv-prefix={spec['iconv'].prefix}") else: args.append("--without-libiconv-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 1718b778c6d2a2..2af4dd2eee8a96 100644 --- a/var/spack/repos/builtin/packages/bat/package.py +++ b/var/spack/repos/builtin/packages/bat/package.py @@ -19,3 +19,7 @@ class Bat(CargoPackage): version("0.21.0", sha256="3dff1e52d577d0a105f4afe3fe7722a4a2b8bb2eb3e7a6a5284ac7add586a3ee") version("0.13.0", sha256="f4aee370013e2a3bc84c405738ed0ab6e334d3a9f22c18031a7ea008cd5abd2a") version("0.12.1", sha256="1dd184ddc9e5228ba94d19afc0b8b440bfc1819fef8133fe331e2c0ec9e3f8e2") + + 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 283e7e23a37857..fa3e79a2a98c6b 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 84a5cb3aa310e0..5c69f5263b6dd8 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 3fff20bcb00d11..a3a711ac0e412a 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/package.py b/var/spack/repos/builtin/packages/bazel/package.py index 52ba8f74bf1ca6..32bcd23f9e5c97 100644 --- a/var/spack/repos/builtin/packages/bazel/package.py +++ b/var/spack/repos/builtin/packages/bazel/package.py @@ -120,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/ @@ -131,8 +139,9 @@ class Bazel(Package): # Bazel-4.0.0 does not compile with gcc-11 # 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/issues/18642 - conflicts("@:6", when="%gcc@13:") + + # https://github.com/bazelbuild/bazel/pull/23667 + conflicts("%apple-clang@16:", when="@:7.3") executables = ["^bazel$"] @@ -144,6 +153,11 @@ class Bazel(Package): "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", diff --git a/var/spack/repos/builtin/packages/bbmap/package.py b/var/spack/repos/builtin/packages/bbmap/package.py index f45c473e023eda..4404eb725666e2 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 7ab944d91ea140..a756baa783580f 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 598c50f09ef076..21d850f04005d7 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 e1867c3cebaa80..4dd8f74c5ea388 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 @@ def set_make_options(self): 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 bd190c5e46a644..36e731cd784cf4 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/package.py b/var/spack/repos/builtin/packages/bdsim/package.py index 656fde32ce026f..cf007073b44698 100644 --- a/var/spack/repos/builtin/packages/bdsim/package.py +++ b/var/spack/repos/builtin/packages/bdsim/package.py @@ -27,6 +27,8 @@ class Bdsim(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/bdw-gc/package.py b/var/spack/repos/builtin/packages/bdw-gc/package.py index 5f9943691bac16..6c80aac4e2c2a7 100644 --- a/var/spack/repos/builtin/packages/bdw-gc/package.py +++ b/var/spack/repos/builtin/packages/bdw-gc/package.py @@ -11,10 +11,11 @@ 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.6/gc-8.2.6.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") @@ -31,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 e7389a4f4cc367..b58df4beab0596 100644 --- a/var/spack/repos/builtin/packages/bear/package.py +++ b/var/spack/repos/builtin/packages/bear/package.py @@ -31,6 +31,9 @@ class Bear(CMakePackage): 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:") diff --git a/var/spack/repos/builtin/packages/beast-tracer/package.py b/var/spack/repos/builtin/packages/beast-tracer/package.py index 1ed549a8a0ff55..bb3c6d0aa6b617 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 9e557fde3abe9f..ba4c933122d87e 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 d16ec01a24af58..ac817cca25359d 100644 --- a/var/spack/repos/builtin/packages/beatnik/package.py +++ b/var/spack/repos/builtin/packages/beatnik/package.py @@ -20,6 +20,8 @@ class Beatnik(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("main", branch="main") + 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 variant("cuda", default=False, description="Use CUDA support from subpackages") @@ -82,7 +84,7 @@ def cmake_args(self): # 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 9d49dfd649b51e..a1e29fa2f4ada3 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 045c6b1dd6a7df..7a13dc7641f445 100644 --- a/var/spack/repos/builtin/packages/bedtools2/package.py +++ b/var/spack/repos/builtin/packages/bedtools2/package.py @@ -27,6 +27,9 @@ 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:") diff --git a/var/spack/repos/builtin/packages/beforelight/package.py b/var/spack/repos/builtin/packages/beforelight/package.py index 321805e4b652d2..ac5e68ea95a9c3 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 0e8fe590198ebb..8e398aefa3c722 100644 --- a/var/spack/repos/builtin/packages/benchmark/package.py +++ b/var/spack/repos/builtin/packages/benchmark/package.py @@ -18,6 +18,8 @@ class Benchmark(CMakePackage): # first properly installed CMake config packages in # 1.2.0 release: https://github.com/google/benchmark/issues/363 version("main", branch="main") + 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,6 +40,8 @@ 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", diff --git a/var/spack/repos/builtin/packages/berkeley-db/package.py b/var/spack/repos/builtin/packages/berkeley-db/package.py index c549ed24b99cb7..acce6ce336ec72 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 4f97c5a91ba482..2c7f433c182390 100644 --- a/var/spack/repos/builtin/packages/berkeleygw/package.py +++ b/var/spack/repos/builtin/packages/berkeleygw/package.py @@ -47,6 +47,10 @@ class Berkeleygw(MakefilePackage): 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 @@ -118,7 +122,7 @@ def edit(self, spec, prefix): 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") @@ -185,27 +189,27 @@ 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: @@ -224,7 +228,7 @@ def build(self, spec, prefix): 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) @@ -232,7 +236,7 @@ def build(self, spec, prefix): 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) @@ -258,7 +262,7 @@ def build(self, spec, prefix): buildopts.append( "FCPP=%s -C -nostdinc -std=c11" % join_path(self.compiler.prefix, "bin", "cpp") ) - 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)) @@ -274,7 +278,7 @@ def build(self, spec, prefix): 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)) @@ -289,16 +293,16 @@ def build(self, spec, prefix): "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 68b52246a882d5..d74608455c68d1 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 d517b5ed90bed9..add324f8d44e8f 100644 --- a/var/spack/repos/builtin/packages/bfs/package.py +++ b/var/spack/repos/builtin/packages/bfs/package.py @@ -16,17 +16,30 @@ class Bfs(MakefilePackage): license("0BSD") + 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 index 0a2e6443f89339..f71d04d47278e9 100644 --- a/var/spack/repos/builtin/packages/bgen/package.py +++ b/var/spack/repos/builtin/packages/bgen/package.py @@ -25,3 +25,6 @@ class Bgen(WafPackage): 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 334769aca16f92..c83bded26376b0 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 fca44cf20f7f13..0c023efc9e03b1 100644 --- a/var/spack/repos/builtin/packages/bigdft-atlab/package.py +++ b/var/spack/repos/builtin/packages/bigdft-atlab/package.py @@ -14,12 +14,17 @@ 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") @@ -34,7 +39,7 @@ 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", "1.9.3", "1.9.4", "develop"]: + 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" @@ -47,7 +52,7 @@ def configure_args(self): cflags = [] cxxflags = [] - if "+openmp" in spec: + if spec.satisfies("+openmp"): fcflags.append(self.compiler.openmp_flag) if spec.satisfies("+shared"): @@ -70,7 +75,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + 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}") @@ -79,12 +84,12 @@ def configure_args(self): 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(f"--with-openbabel-libs={spec['openbabel'].prefix.lib}") args.append(f"--with-openbabel-incs={spec['openbabel'].prefix.include}") diff --git a/var/spack/repos/builtin/packages/bigdft-chess/package.py b/var/spack/repos/builtin/packages/bigdft-chess/package.py index dc5ba9362a37e5..d407d6f1c3f4ce 100644 --- a/var/spack/repos/builtin/packages/bigdft-chess/package.py +++ b/var/spack/repos/builtin/packages/bigdft-chess/package.py @@ -15,14 +15,21 @@ 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 @@ -31,6 +38,7 @@ class BigdftChess(AutotoolsPackage, CudaPackage): 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")) @@ -39,10 +47,11 @@ 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("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}") @@ -56,11 +65,11 @@ def configure_args(self): 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) @@ -79,7 +88,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + 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}") @@ -88,22 +97,22 @@ def configure_args(self): else: args.append("--disable-mpi") - if "+openmp" in spec: + if spec.satisfies("+openmp"): args.append("--with-openmp") else: args.append("--without-openmp") 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(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 834b65f3777c24..2c885fafc2dae9 100644 --- a/var/spack/repos/builtin/packages/bigdft-core/package.py +++ b/var/spack/repos/builtin/packages/bigdft-core/package.py @@ -15,10 +15,17 @@ 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") @@ -30,6 +37,7 @@ class BigdftCore(AutotoolsPackage, CudaPackage): 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")) @@ -44,12 +52,15 @@ 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"]: + 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" def configure_args(self): @@ -60,11 +71,11 @@ def configure_args(self): 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) @@ -92,7 +103,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + 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}") @@ -101,19 +112,19 @@ def configure_args(self): 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(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}") - if "+openbabel" in spec: + if spec.satisfies("+openbabel"): args.append("--enable-openbabel") args.append(f"--with-openbabel-libs={spec['openbabel'].prefix.lib}") args.append(f"--with-openbabel-incs={spec['openbabel'].prefix.include}") diff --git a/var/spack/repos/builtin/packages/bigdft-futile/package.py b/var/spack/repos/builtin/packages/bigdft-futile/package.py index 8f9218d3835a3c..94a66f100dd528 100644 --- a/var/spack/repos/builtin/packages/bigdft-futile/package.py +++ b/var/spack/repos/builtin/packages/bigdft-futile/package.py @@ -18,12 +18,17 @@ 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( @@ -54,7 +59,7 @@ def configure_args(self): 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 = [ @@ -67,12 +72,12 @@ def configure_args(self): 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: + 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}") @@ -81,7 +86,7 @@ def configure_args(self): else: args.append("--disable-mpi") - if "+cuda" in spec: + if spec.satisfies("+cuda"): args.append("--enable-opencl") args.append(f"--with-ocl-path={spec['cuda'].prefix}") args.append("--enable-cuda-gpu") diff --git a/var/spack/repos/builtin/packages/bigdft-libabinit/package.py b/var/spack/repos/builtin/packages/bigdft-libabinit/package.py index c88763946b2aaa..33e6363d8497e3 100644 --- a/var/spack/repos/builtin/packages/bigdft-libabinit/package.py +++ b/var/spack/repos/builtin/packages/bigdft-libabinit/package.py @@ -17,10 +17,17 @@ 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") @@ -36,7 +43,7 @@ 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"]: + 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" @@ -62,7 +69,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.extend( [ f"CC={spec['mpi'].mpicc}", 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 00000000000000..80545c7db54395 --- /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 95a2ea73ca5a7e..570622ab3a21ea 100644 --- a/var/spack/repos/builtin/packages/bigdft-psolver/package.py +++ b/var/spack/repos/builtin/packages/bigdft-psolver/package.py @@ -12,26 +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") - variant( - "shared", default=True, description="Build shared libraries" - ) # Not default in bigdft, but is typically the default expectation + # 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")) @@ -41,7 +46,7 @@ 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", "1.9.3", "1.9.4", "develop"]: + 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}") @@ -55,11 +60,11 @@ def configure_args(self): 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) @@ -77,7 +82,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + 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}") @@ -86,14 +91,14 @@ def configure_args(self): else: args.append("--disable-mpi") - if "+openmp" in spec: + if spec.satisfies("+openmp"): args.append("--with-openmp") else: args.append("--without-openmp") - args.append(f"--with-atlab-libs={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(f"--with-cuda-path={spec['cuda'].prefix}") args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}") diff --git a/var/spack/repos/builtin/packages/bigdft-spred/package.py b/var/spack/repos/builtin/packages/bigdft-spred/package.py index 14215c3f7fe47a..796c10d98e5724 100644 --- a/var/spack/repos/builtin/packages/bigdft-spred/package.py +++ b/var/spack/repos/builtin/packages/bigdft-spred/package.py @@ -15,13 +15,21 @@ 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") @@ -38,7 +46,7 @@ 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"]: + 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}") @@ -53,11 +61,11 @@ def configure_args(self): 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) @@ -78,7 +86,7 @@ def configure_args(self): if spec.satisfies("+shared"): args.append("--enable-dynamic-libraries") - if "+mpi" in spec: + 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}") @@ -87,7 +95,7 @@ def configure_args(self): 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 7c2abb0c43d85c..7658e885acbbcb 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 c80109971bf27b..ca6b6a995d2792 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 00000000000000..dbd38b2e806b1c --- /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 0b08dd0c290d2e..34bd72518006e5 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/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 46564e2c03a3b9..18bece43ac4bd3 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,8 @@ 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") @@ -87,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 @@ -177,6 +183,20 @@ def determine_version(cls, exe): 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 @@ -204,6 +224,7 @@ def flag_handler(self, name, flags): return (iflags, None, flags) def test_binaries(self): + """check versions reported by binaries""" binaries = [ "ar", "c++filt", @@ -238,7 +259,7 @@ def test_binaries(self): 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 @@ -268,7 +289,7 @@ def configure_args(self): 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 83f0293a2d5c8b..1b5acd325341e2 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 e89488f9ef99eb..8559f7504a3e8a 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 3b36ee0b5862fc..d84bce1f094909 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 b9ed84e0c3d3b1..7706f59e675f53 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 709e8905678511..7226ae8be4d9d7 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -50,6 +50,9 @@ 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 @@ -59,6 +62,7 @@ class Bison(AutotoolsPackage, GNUMirrorPackage): depends_on("gettext", when="+color") depends_on("m4@1.4.6:", type=("build", "run")) + depends_on("diffutils", type="build") patch("pgi.patch", when="@3.0.4") # The NVIDIA compilers do not currently support some GNU builtins. diff --git a/var/spack/repos/builtin/packages/bitgroomingz/package.py b/var/spack/repos/builtin/packages/bitgroomingz/package.py index ec6fdfd17f844e..85430a1579bf19 100644 --- a/var/spack/repos/builtin/packages/bitgroomingz/package.py +++ b/var/spack/repos/builtin/packages/bitgroomingz/package.py @@ -17,13 +17,15 @@ class Bitgroomingz(CMakePackage): version("master", branch="master") version("2022-10-14", commit="a018b20cca9f7d6a5396ab36230e4be6ae1cb25b") + depends_on("c", type="build") # generated + variant("shared", default=True, description="build shared libs") depends_on("zlib-api") 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/bitlbee/package.py b/var/spack/repos/builtin/packages/bitlbee/package.py index 1ffdd1b9b5babb..56f5e9d5bfcceb 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 fc2e3940badd20..5e704b4fdb2a50 100644 --- a/var/spack/repos/builtin/packages/bitmap/package.py +++ b/var/spack/repos/builtin/packages/bitmap/package.py @@ -9,13 +9,15 @@ 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") @@ -23,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 f3695651b61d91..078fe1fcb1dabf 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 6ed4a4a42c84e9..5d6563cf516ec3 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 00000000000000..923d5a0fcd69ee --- /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/package.py b/var/spack/repos/builtin/packages/blaspp/package.py index 0fda353caae526..e58d274483cc1d 100644 --- a/var/spack/repos/builtin/packages/blaspp/package.py +++ b/var/spack/repos/builtin/packages/blaspp/package.py @@ -21,6 +21,9 @@ class Blaspp(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") version("master", branch="master") + version( + "2024.05.31", sha256="24f325d2e1c2cc4275324bd88406555688379480877d19553656a0328287927a" + ) version( "2023.11.05", sha256="62dfc03ec07c0826e0466dc2c204b460caa929d53ad4f050cb132d92670be7ce" ) @@ -49,6 +52,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") @@ -86,11 +91,11 @@ def cmake_args(self): 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 diff --git a/var/spack/repos/builtin/packages/blast-legacy/package.py b/var/spack/repos/builtin/packages/blast-legacy/package.py index bad9bdd26995d1..f85bdac5808230 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 0506a4188316e6..ffc98650cd5106 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 @@ def configure_args(self): 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 @@ def configure_args(self): 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 @@ def configure_args(self): # 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 5246c0eee7c927..4f258d206a83db 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 e2762147f5c0e4..3826610462afea 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 683506906fac02..56524abfd7528a 100644 --- a/var/spack/repos/builtin/packages/blis/package.py +++ b/var/spack/repos/builtin/packages/blis/package.py @@ -55,17 +55,17 @@ def configure_args(self): spec = self.spec config_args = ["--enable-threading={0}".format(spec.variants["threads"].value)] - if "+ilp64" in spec: + if spec.satisfies("+ilp64"): config_args.append("--blas-int-size=64") else: config_args.append("--blas-int-size=32") - if "+cblas" in spec: + 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") @@ -124,6 +124,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") @@ -137,6 +138,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/package.py b/var/spack/repos/builtin/packages/blitz/package.py index 2ef254bd1c12bc..617af332dbe75f 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,17 +16,10 @@ class Blitz(AutotoolsPackage): version("1.0.2", sha256="500db9c3b2617e1f03d0e548977aec10d36811ba1c43bb5ef250c0e3853ae1c2") + depends_on("cxx", type="build") # generated + depends_on("fortran", type="build") # generated + depends_on("python@3:", type="build") - depends_on("m4", type="build") - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") # Fix makefile and include to build with Fujitsu compiler patch("fujitsu_compiler_specfic_header.patch", when="%fj") - - build_targets = ["lib"] - - def check(self): - make("check-testsuite") - make("check-examples") diff --git a/var/spack/repos/builtin/packages/blktrace/package.py b/var/spack/repos/builtin/packages/blktrace/package.py index 99cbdd772543a4..f6ef57e5d584f1 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 ed940950b27b00..0774b107fe8dbb 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 3f03391b157290..e827a2ca7d196c 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 1e488b5f13f7f3..4202ca559c9893 100644 --- a/var/spack/repos/builtin/packages/blt/package.py +++ b/var/spack/repos/builtin/packages/blt/package.py @@ -88,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 95558244604d34..3ae19ae9a72c7c 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 5ae430148c2c09..ff2be55bf51f6e 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 2822968fc63e5d..5eb36f7063628d 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 fd9e6656631ac2..a49e30b439eed2 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 # @@ -145,7 +148,7 @@ def cmake_args(self): # 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", @@ -157,7 +160,7 @@ def cmake_args(self): # # Extension methods # - if "+blas" in spec: + if spec.satisfies("+blas"): args += [ "-DEXT_BLAS=ON", "-DCBLAS_FOUND=True", @@ -167,7 +170,7 @@ def cmake_args(self): else: args += ["-DEXT_BLAS=OFF", "-DDCBLAS_FOUND=False"] - if "+lapack" in spec: + if spec.satisfies("+lapack"): args += [ "-DEXT_LAPACK=ON", "-DLAPACKE_FOUND=True", @@ -177,7 +180,7 @@ def cmake_args(self): else: args += ["-DEXT_LAPACK=OFF", "-DLAPACKE_FOUND=False"] - if "+opencv" in spec: + if spec.satisfies("+opencv"): args += [ "-DEXT_OPENCV=ON", "-DOpenCV_FOUND=True", @@ -231,11 +234,11 @@ def check_install(self): # 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 @@ -265,7 +268,7 @@ def check_install(self): compare_output(cpp_output, "Success!\n") # Python test (if +python) - if "+python" in spec: + 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 4b4ec8d7c369d8..b58a1ef7c13a9e 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 @@ def configure_args(self): 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 0c37acc5538656..ab1be415bee5e2 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 @@ def cmake_args(self): 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 55dba48278ae5e..ae4a2817da99c8 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 6a145c30de43bf..54611870df977f 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 @@ def cmake_args(self): 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/bootstrap-path.patch b/var/spack/repos/builtin/packages/boost/bootstrap-path.patch deleted file mode 100644 index 06cebe0d1ed3d5..00000000000000 --- 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 623de4f5b2b08b..efc4cf17a8ab43 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,7 @@ 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") @@ -79,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", @@ -113,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", @@ -143,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): @@ -245,6 +257,8 @@ def libs(self): 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") @@ -295,6 +309,11 @@ def libs(self): # 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") @@ -342,9 +361,6 @@ def libs(self): # 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) @@ -446,9 +462,9 @@ def patch(self): 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) @@ -460,24 +476,24 @@ def flag_handler(self, name, flags): 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", + "%pgi": "pgi", + "%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 @@ -490,9 +506,9 @@ def bjam_python_line(self, spec): 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): @@ -503,16 +519,22 @@ def determine_bootstrap_options(self, spec, with_libs, options): 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: @@ -520,35 +542,31 @@ def determine_bootstrap_options(self, spec, with_libs, options): # 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 += " : 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", @@ -570,17 +588,17 @@ def determine_b2_options(self, spec, options): ] ) # 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( @@ -591,9 +609,9 @@ def determine_b2_options(self, spec, options): 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: @@ -604,6 +622,20 @@ def determine_b2_options(self, spec, options): 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 @@ -625,7 +657,7 @@ def determine_b2_options(self, spec, options): if flag: cxxflags.append(flag) - if "+pic" in self.spec: + if self.spec.satisfies("+pic"): cxxflags.append(self.compiler.cxx_pic_flag) if sys.platform == "darwin": @@ -651,7 +683,7 @@ def determine_b2_options(self, spec, options): # 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"): @@ -684,6 +716,23 @@ def add_buildopt_symlinks(self, prefix): 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 @@ -695,49 +744,41 @@ def install(self, spec, prefix): 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) @@ -760,19 +801,28 @@ def install(self, spec, prefix): 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) @@ -785,7 +835,7 @@ def install(self, spec, prefix): 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 diff --git a/var/spack/repos/builtin/packages/boostmplcartesianproduct/package.py b/var/spack/repos/builtin/packages/boostmplcartesianproduct/package.py index e940d648b3bb7f..c66b1ca6a59cbf 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 9159f15a0ddc8f..c9dd90fbf0d2ac 100644 --- a/var/spack/repos/builtin/packages/botan/package.py +++ b/var/spack/repos/builtin/packages/botan/package.py @@ -42,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$"] @@ -58,7 +60,7 @@ def edit(self, spec, prefix): 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 2df76062168e41..593ae4adefef43 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 @@ def edit(self, spec, prefix): 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 a17d6749abf67a..33a1e28cc2b51f 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 4d67b338e21f7a..2fc461baecfdba 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 c1bd5c19d9f8a7..c56ce4afa85303 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 bdcd4c186bba8e..f5ae9825ac0890 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 78c9d3aab95d36..c078bd520a1414 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 6aa6a9a2ca7a80..ffd4a73c8bab05 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 5051043206154b..c1b10ce51c3ab6 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 9d6351508e1ec3..880b0360790570 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 81e213fd050aa8..7c9d2c69a002e1 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 b62f82e638354f..7f18cafec16cf7 100644 --- a/var/spack/repos/builtin/packages/bracken/package.py +++ b/var/spack/repos/builtin/packages/bracken/package.py @@ -22,6 +22,8 @@ class Bracken(Package): 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 a8640c9e781865..224e4e1108b7a5 100644 --- a/var/spack/repos/builtin/packages/brahma/package.py +++ b/var/spack/repos/builtin/packages/brahma/package.py @@ -15,20 +15,29 @@ class Brahma(CMakePackage): license("MIT") - version("develop", branch="dev") + version("develop", branch="develop") version("master", branch="master") + 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("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 d9db1868840b0f..6180c1895b485b 100644 --- a/var/spack/repos/builtin/packages/braker/package.py +++ b/var/spack/repos/builtin/packages/braker/package.py @@ -63,8 +63,7 @@ def filter_sbang(self): 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 dd52874eea9677..70f4ad0b90a5ce 100644 --- a/var/spack/repos/builtin/packages/branson/package.py +++ b/var/spack/repos/builtin/packages/branson/package.py @@ -31,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, diff --git a/var/spack/repos/builtin/packages/breakdancer/package.py b/var/spack/repos/builtin/packages/breakdancer/package.py index 3b5d4147260973..4686129c3353bc 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 acf0bb71bc7e2b..397a60dc206b68 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 037802de682746..d74bebb55a1fa5 100644 --- a/var/spack/repos/builtin/packages/bricks/package.py +++ b/var/spack/repos/builtin/packages/bricks/package.py @@ -27,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 @@ -44,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 @@ -73,7 +76,7 @@ def copy_test_sources(self): 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 d1c607238f741e..47077a7393ae39 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 0bb8f27abfa63d..50c91a3c527caa 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 4e94ef3651afc5..40c74e58c3a3c8 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 1dc4c93352151b..799f8133bb5ce6 100644 --- a/var/spack/repos/builtin/packages/brotli/package.py +++ b/var/spack/repos/builtin/packages/brotli/package.py @@ -18,6 +18,8 @@ class Brotli(CMakePackage): 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 299622b7df7f54..3d7f00c922fd8c 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 c0ce3de05d65a3..528ebc70ef9b2d 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 a6a81363b5e44d..be055a7db42016 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/package.py b/var/spack/repos/builtin/packages/btop/package.py index 2e76633ccea247..b388a6daacee62 100644 --- a/var/spack/repos/builtin/packages/btop/package.py +++ b/var/spack/repos/builtin/packages/btop/package.py @@ -22,6 +22,8 @@ class Btop(MakefilePackage, CMakePackage): version("1.3.0", sha256="375e078ce2091969f0cd14030620bd1a94987451cf7a73859127a786006a32cf") version("1.2.13", sha256="668dc4782432564c35ad0d32748f972248cc5c5448c9009faeb3445282920e02") + 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") diff --git a/var/spack/repos/builtin/packages/bubblewrap/package.py b/var/spack/repos/builtin/packages/bubblewrap/package.py index 5925aee4de499c..6811eda3beae89 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 3a9a6982f27a25..49b77e8e2dd9fa 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 f08d719ef8ecf2..f571fd69380812 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 index 31d03507a578ea..bf79f5f581bd82 100644 --- a/var/spack/repos/builtin/packages/bufr-query/package.py +++ b/var/spack/repos/builtin/packages/bufr-query/package.py @@ -18,6 +18,7 @@ class BufrQuery(CMakePackage, PythonExtension): license("Apache-2.0", checked_by="srherbener") + version("0.0.3", sha256="f2952a190cc1d7714a3bfe481fb1545459639ba304fc31b941062b471dea1d41") version("0.0.2", sha256="b87a128246e79e3c76e3158d89823e2ae38e9ee1a5a81b6f7b423837bdb93a1f") version("0.0.1", sha256="001990d864533c101b93d1c351edf50cf8b5ccc575e442d174735f6c332d3d03") @@ -37,10 +38,14 @@ class BufrQuery(CMakePackage, PythonExtension): with when("+python"): extends("python") - depends_on("py-pybind11") + depends_on("py-pybind11", type="build") # Patches - patch("site-packages.patch", when="+python @:0.0.2") + 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): diff --git a/var/spack/repos/builtin/packages/bufr/package.py b/var/spack/repos/builtin/packages/bufr/package.py index 27d92e582ca86b..be3431fe6a1b11 100644 --- a/var/spack/repos/builtin/packages/bufr/package.py +++ b/var/spack/repos/builtin/packages/bufr/package.py @@ -32,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 diff --git a/var/spack/repos/builtin/packages/busybox/package.py b/var/spack/repos/builtin/packages/busybox/package.py index ccecdc8d555605..3b7add98bca6f8 100644 --- a/var/spack/repos/builtin/packages/busybox/package.py +++ b/var/spack/repos/builtin/packages/busybox/package.py @@ -16,6 +16,7 @@ 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") @@ -23,6 +24,9 @@ class Busybox(MakefilePackage): 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(f"CC={spack_cc}") diff --git a/var/spack/repos/builtin/packages/butterflypack/package.py b/var/spack/repos/builtin/packages/butterflypack/package.py index 048b0a02431eca..7fc6cbd77b9648 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 * @@ -44,6 +42,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") @@ -77,9 +79,15 @@ def cmake_args(self): 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 ad003282995649..1c1aea92682529 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 a966b41a34a33b..a9b249070e8421 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 index 0cb1744e41a3bc..ac8275f24c7f83 100644 --- a/var/spack/repos/builtin/packages/byfl/package.py +++ b/var/spack/repos/builtin/packages/byfl/package.py @@ -18,5 +18,9 @@ class Byfl(CMakePackage): 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 00000000000000..44dfe3b6417615 --- /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 f9332bf853cae3..6dc0b50d93debe 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 e9d56f124f49da..7bcb0bfc34244a 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 @@ def libs(self): 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) @@ -122,7 +123,7 @@ def patch(self): 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 @@ def install(self, spec, prefix): 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 378077f64cd3da..51fb1dc9da2bce 100644 --- a/var/spack/repos/builtin/packages/c-ares/package.py +++ b/var/spack/repos/builtin/packages/c-ares/package.py @@ -21,6 +21,9 @@ class CAres(CMakePackage): 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 ba6381f31786d6..28919db0661c46 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 @@ def libs(self): 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 0bbbecefaf79af..6de7e4b01892e2 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)") diff --git a/var/spack/repos/builtin/packages/c-lime/package.py b/var/spack/repos/builtin/packages/c-lime/package.py index b4b2ee31ada224..cb0d8b6cf53e1a 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 4e4480ba9c79c9..e9f5238313959a 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 d36fbd9ffe047c..5f1c33c80aa3b6 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 ab4b2872ec8252..e69588e7ba6114 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 2327939bbbe7ff..42852dc12320c0 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", 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 @@ def cmake_args(self): 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 d92ae8d6803936..9f193722c1e22a 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 5103368b1fa848..ee8a65d94d9fd7 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 @@ def cmake_args(self): ] ) - 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 6784c8f3cde4fb..52af9c58bfd4c7 100644 --- a/var/spack/repos/builtin/packages/cairo/package.py +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -35,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)") @@ -51,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") @@ -81,7 +83,7 @@ def autoreconf(self, spec, prefix): 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 8812da63e61e58..c4d9f0c8c01f2d 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 abaff96c8d27b4..ad06a5e242b71d 100644 --- a/var/spack/repos/builtin/packages/caliper/package.py +++ b/var/spack/repos/builtin/packages/caliper/package.py @@ -9,7 +9,7 @@ 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 @@ -21,7 +21,7 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage): url = "https://github.com/LLNL/Caliper/archive/v2.11.0.tar.gz" tags = ["e4s", "radiuss"] - maintainers("daboehme") + maintainers("daboehme", "adrienbernede") test_requires_compiler = True @@ -76,6 +76,10 @@ 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") @@ -94,8 +98,11 @@ 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") + # 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:2.10 +adiak") depends_on("adiak@0.4:0", when="@2.11: +adiak") @@ -109,12 +116,16 @@ 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.11") conflicts("+adiak", "@:2.1") @@ -128,70 +139,121 @@ 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 = [ - "-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("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)) - 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) + 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 initconfig_mpi_entries(self): + spec = self.spec + entries = super().initconfig_mpi_entries() + + entries.append(cmake_cache_option("WITH_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)) + + 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 + + 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 29566c512f3f64..3b36222c97e6fc 100644 --- a/var/spack/repos/builtin/packages/callpath/package.py +++ b/var/spack/repos/builtin/packages/callpath/package.py @@ -17,6 +17,8 @@ class Callpath(CMakePackage): version("1.0.2", sha256="cbe42bba8b9dda259dcbe7e16ebd7ecd005eabf7e9ccf169535b03110df75c84") version("1.0.1", sha256="9bd9723126f80d0b518c28e5298ad0fa8d8dbc6a3f03fee5ae5449cf4c9a550f") + depends_on("cxx", type="build") # generated + 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 e9a80de93bc11a..2e0c0fbb02d76e 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 @@ def cmake_args(self): "-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 00000000000000..dbb3fa022071b3 --- /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/package.py b/var/spack/repos/builtin/packages/camp/package.py index 1bea45b34c37c2..7e7c305b18d9da 100644 --- a/var/spack/repos/builtin/packages/camp/package.py +++ b/var/spack/repos/builtin/packages/camp/package.py @@ -16,11 +16,23 @@ 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=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", @@ -42,20 +54,37 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage): version("0.2.2", sha256="194d38b57e50e3494482a7f94940b27f37a2bee8291f2574d64db342b981d819") version("0.1.0", sha256="fd4f0f2a60b82a12a1d9f943f8893dc6fe770db493f8fae5ef6f7d0c439bebcc") + depends_on("cxx", type="build") # generated + # TODO: figure out gtest dependency and then set this default True. variant("tests", default=False, description="Build tests") 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.1:", type="build", when="@2024.02.0:") + 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("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 @@ -64,7 +93,7 @@ def cmake_args(self): options.append("-DBLT_SOURCE_DIR={0}".format(spec["blt"].prefix)) options.append(self.define_from_variant("ENABLE_CUDA", "cuda")) - if "+cuda" in spec: + if spec.satisfies("+cuda"): options.append("-DCUDA_TOOLKIT_ROOT_DIR={0}".format(spec["cuda"].prefix)) if not spec.satisfies("cuda_arch=none"): @@ -75,7 +104,7 @@ def cmake_args(self): options.append("-DCMAKE_CUDA_FLAGS:STRING={0}".format(flag)) options.append(self.define_from_variant("ENABLE_HIP", "rocm")) - if "+rocm" in spec: + if spec.satisfies("+rocm"): options.append("-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix)) archs = self.spec.variants["amdgpu_target"].value @@ -83,7 +112,12 @@ def cmake_args(self): options.append("-DGPU_TARGETS={0}".format(archs)) options.append("-DAMDGPU_TARGETS={0}".format(archs)) - options.append(self.define_from_variant("ENABLE_OPENMP", "openmp")) + 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 92b995dd736df5..3f4b285cfc842f 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 @@ def edit(self, spec, prefix): ) 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 @@ def build_targets(self): 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 a002f6b5b31464..00000000000000 --- a/var/spack/repos/builtin/packages/candle-benchmarks/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 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.5.1", sha256="3d8c4f5a8304ee238e93e88e871a8b4d47d6b377159c048ac6d3ed01b6ffc245") - 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 8827ff9d6a87ea..8c8472a84d93c1 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 ef057f955b0900..2be36b1d91c217 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 @@ def build_args(self, spec, prefix): ) # Sundials support - if "+sundials" in spec: + if spec.satisfies("+sundials"): if spec.satisfies("@2.3.0:"): args.append("system_sundials=y") else: @@ -133,7 +137,7 @@ def build_args(self, spec, prefix): ) # Python module - if "+python" in spec: + 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(python.path)]) @@ -144,7 +148,7 @@ def build_args(self, spec, prefix): 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") @@ -152,7 +156,7 @@ def build_args(self, spec, prefix): 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 75094e70f0de8f..a6f18fcde7b477 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 8552fbd9b4f5c5..dfa56ac9f12990 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 491a488edcf465..d64ea3d4712c4a 100644 --- a/var/spack/repos/builtin/packages/capstone/package.py +++ b/var/spack/repos/builtin/packages/capstone/package.py @@ -20,3 +20,9 @@ class Capstone(CMakePackage): 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 f14aa1c9c4d55f..0f0bc8b31dab9f 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 @@ def cmake_args(self): "-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 1b45dc1ed6db36..f6465bb4ca3e50 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") - - # 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 504914b197c950..45a3a7a9f5426e 100644 --- a/var/spack/repos/builtin/packages/cargs/package.py +++ b/var/spack/repos/builtin/packages/cargs/package.py @@ -20,4 +20,6 @@ class Cargs(CMakePackage): 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 00000000000000..fac747fa155edf --- /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 870146b258a69e..ea73223f6718b8 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 @@ def cmake_args(self): # 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 ff4c4e7f129183..9d2bd90237cfd8 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 36f89c148d8b91..7464bef4bdb466 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 index 66689fb48c32e8..50249351734f86 100644 --- a/var/spack/repos/builtin/packages/castep/package.py +++ b/var/spack/repos/builtin/packages/castep/package.py @@ -59,13 +59,13 @@ def build_targets(self): spec = self.spec targetlist = [f"PWD={self.stage.source_path}"] - if "+mpi" in spec: + 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 "^mkl" in spec: + if spec.satisfies("^mkl"): targetlist.append("FFT=mkl") if self.spec.satisfies("@20:"): targetlist.append("MATHLIBS=mkl") diff --git a/var/spack/repos/builtin/packages/catch2/package.py b/var/spack/repos/builtin/packages/catch2/package.py index 604dd3956538c0..7886df269788ec 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:", diff --git a/var/spack/repos/builtin/packages/cbc/package.py b/var/spack/repos/builtin/packages/cbc/package.py index ee4685c8bf788f..79c1e48fcd0b68 100644 --- a/var/spack/repos/builtin/packages/cbc/package.py +++ b/var/spack/repos/builtin/packages/cbc/package.py @@ -21,6 +21,9 @@ class Cbc(AutotoolsPackage): 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") diff --git a/var/spack/repos/builtin/packages/cbench/package.py b/var/spack/repos/builtin/packages/cbench/package.py index 609e5bba5416ad..ad598b6bb7a318 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") diff --git a/var/spack/repos/builtin/packages/cbflib/package.py b/var/spack/repos/builtin/packages/cbflib/package.py index 7e313acece0698..5277b3a12488e5 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 @@ def edit(self, spec, prefix): 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 00000000000000..62571e30aeb6d8 --- /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 86b50b7c5e2fe9..d3d563453550ef 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 00000000000000..7dd69d90d2a64f --- /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 36549c6063000f..841a61e0fe5ae8 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 96b3679b18bc8a..a4d1ae654344be 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 3196840a934d54..4c731a1e8d51f8 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 371c1dd63889b6..69882e9b2a90f6 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 92166c5286e8eb..dcd00bb0f9f392 100644 --- a/var/spack/repos/builtin/packages/cbtf/package.py +++ b/var/spack/repos/builtin/packages/cbtf/package.py @@ -27,6 +27,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." ) diff --git a/var/spack/repos/builtin/packages/cc65/package.py b/var/spack/repos/builtin/packages/cc65/package.py index 1f4998ed545742..cebbf6a3d4f399 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 a2ca2f7fb43c11..5c334f5e23ca16 100644 --- a/var/spack/repos/builtin/packages/ccache/package.py +++ b/var/spack/repos/builtin/packages/ccache/package.py @@ -23,6 +23,7 @@ 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") @@ -56,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") @@ -80,6 +84,8 @@ class Ccache(CMakePackage): 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 index b425ab439a6bd3..284dee70ff4d3d 100644 --- a/var/spack/repos/builtin/packages/cce/detection_test.yaml +++ b/var/spack/repos/builtin/packages/cce/detection_test.yaml @@ -42,3 +42,16 @@ paths: 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/ccfits/package.py b/var/spack/repos/builtin/packages/ccfits/package.py index 1b2a98f8686680..13e2701a69c86e 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 3d48d9d5683b9a..7d05aa4e808b2c 100644 --- a/var/spack/repos/builtin/packages/ccls/package.py +++ b/var/spack/repos/builtin/packages/ccls/package.py @@ -33,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 bd404445ccd823..49125e30499ee5 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 @@ def edit(self, spec, prefix): 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 @@ def edit(self, spec, prefix): 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 d3244d76b61fca..85f35f7b8c6906 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 24ab2790e6723b..bb4fb47a1f5b05 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 8a1940261f56ed..bfdf84ca7a9809 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 fbf3e0b33b141c..ef8cdb560f49ef 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 a725b726ca0881..a02ec04244c5c4 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 1d6bdf304b5668..1816717dc2b8cc 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 @@ def patch(self): 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 00000000000000..67ced0fa8a6f10 --- /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 00000000000000..2e9e6803ae8689 --- /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 + + 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 ++#include + + 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 00000000000000..319e140ef437ed --- /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 ++#include + + 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 + #include ++#include + + #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 44f332b47f0bd1..d44647a0ab256f 100644 --- a/var/spack/repos/builtin/packages/cdo/package.py +++ b/var/spack/repos/builtin/packages/cdo/package.py @@ -20,6 +20,26 @@ 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", @@ -151,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", @@ -220,7 +258,7 @@ def yes_or_prefix(spec_name): 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. @@ -262,12 +300,12 @@ def yes_or_prefix(spec_name): 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") @@ -282,7 +320,7 @@ def yes_or_prefix(spec_name): flags["LDFLAGS"].append("-L%s" % self.spec["expat"].prefix.lib) flags["LIBS"].append("-lexpat") - 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 4e73a052863391..01730fdcda5d69 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 fd72aa13019723..d346bb667ed865 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 @@ -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 25d8a0b966dd4a..b83a96a9e9c3f4 100644 --- a/var/spack/repos/builtin/packages/celeritas/package.py +++ b/var/spack/repos/builtin/packages/celeritas/package.py @@ -19,6 +19,8 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage): license("Apache-2.0") + version("0.5.0", sha256="4a8834224d96fd01897e5872ac109f60d91ef0bd7b63fac05a73dcdb61a5530e") + version("0.4.4", sha256="8b5ae63aa2d50c2ecf48d752424e4a33c50c07d9f0f5ca5448246de3286fd836") version("0.4.3", sha256="b4f603dce1dc9c4894ea4c86f6574026ea8536714982e7dc6dff7472c925c892") version("0.4.2", sha256="eeca9705413f5e16e0fb81154e042600c8df125af7049912757feb01d43730e2") version("0.4.1", sha256="24e5c15eb9eec45f52d94a6719ae3505388b49d409cb7e26c875c70ac409bd2c") @@ -76,6 +78,8 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage): deprecated=True, ) + depends_on("cxx", type="build") + _cxxstd_values = ("14", "17") # Note: cuda and rocm variants are defined by mixin classes @@ -93,7 +97,7 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage): 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") diff --git a/var/spack/repos/builtin/packages/centrifuge/package.py b/var/spack/repos/builtin/packages/centrifuge/package.py index 2b1cf86d3a850b..ce7fea5f4a1fb7 100644 --- a/var/spack/repos/builtin/packages/centrifuge/package.py +++ b/var/spack/repos/builtin/packages/centrifuge/package.py @@ -12,8 +12,11 @@ class Centrifuge(MakefilePackage): 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() diff --git a/var/spack/repos/builtin/packages/cepgen/package.py b/var/spack/repos/builtin/packages/cepgen/package.py index c6a79f3fcb4377..061cfab7e556cb 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 d7a5cc9aa17c30..a53ddb79cedb0b 100644 --- a/var/spack/repos/builtin/packages/cereal/package.py +++ b/var/spack/repos/builtin/packages/cereal/package.py @@ -33,6 +33,8 @@ class Cereal(CMakePackage): version("1.0.0", sha256="51c31c84d4c9e410e56d8bfc3424076b3234f11aa349ac8cda3db9f18118c125") version("0.9.1", sha256="2a99722df9c3d0f75267f732808a4d7e564cb5a35318a3d1c00086e2ef139385") + depends_on("cxx", type="build") # generated + 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 5a8ac5db62d000..7c7af49a4b5cf8 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 @@ def cmake_args(self): ] ) - 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 55660d391f69b4..8e7b812929d201 100644 --- a/var/spack/repos/builtin/packages/cernlib/package.py +++ b/var/spack/repos/builtin/packages/cernlib/package.py @@ -23,6 +23,10 @@ class Cernlib(CMakePackage): 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") depends_on("freetype") diff --git a/var/spack/repos/builtin/packages/cfitsio/package.py b/var/spack/repos/builtin/packages/cfitsio/package.py index 6c87ebf15a676a..c8bc0ba5b71da1 100644 --- a/var/spack/repos/builtin/packages/cfitsio/package.py +++ b/var/spack/repos/builtin/packages/cfitsio/package.py @@ -29,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") @@ -45,7 +48,7 @@ def url_for_version(self, version): def configure_args(self): spec = self.spec extra_args = [] - if "+bzip2" in spec: + if spec.satisfies("+bzip2"): extra_args.append(f"--with-bzip2={spec['bzip2'].prefix}"), return extra_args @@ -54,7 +57,7 @@ def build_targets(self): 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 dccceb27322d5e..18170077580437 100644 --- a/var/spack/repos/builtin/packages/cgal/package.py +++ b/var/spack/repos/builtin/packages/cgal/package.py @@ -33,6 +33,8 @@ class Cgal(CMakePackage): version("4.7", sha256="50bd0a1cad7a8957b09012f831eebaf7d670e2a3467e8f365ec0c71fa5436369") version("4.6.3", sha256="e338027b8767c0a7a6e4fd8679182d1b83b5b1a0da0a1fe4546e7c0ca094fc21") + depends_on("cxx", type="build") # generated + variant("shared", default=True, description="Enables the build of shared libraries") variant( "build_type", @@ -102,7 +104,7 @@ def setup_build_environment(self, env): 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): diff --git a/var/spack/repos/builtin/packages/cgdb/package.py b/var/spack/repos/builtin/packages/cgdb/package.py index 73a8ff07eaf68e..0118b6d6ec6543 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 c372afeed1b8f9..e86d1e3bdb874c 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 4aa3e02be2c6c4..5e417aa77a9a9d 100644 --- a/var/spack/repos/builtin/packages/cgl/package.py +++ b/var/spack/repos/builtin/packages/cgl/package.py @@ -24,6 +24,8 @@ class Cgl(AutotoolsPackage): 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") diff --git a/var/spack/repos/builtin/packages/cgm/package.py b/var/spack/repos/builtin/packages/cgm/package.py index 88d9335db698bb..d3cfeff80465f1 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 @@ def configure_args(self): spec = self.spec args = [] - if "+mpi" in spec: + if spec.satisfies("+mpi"): args.extend( [ "--with-mpi", @@ -42,15 +44,15 @@ def configure_args(self): 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 00000000000000..62f9bd2e1f7d63 --- /dev/null +++ b/var/spack/repos/builtin/packages/cgns/gcc14.patch @@ -0,0 +1,50 @@ +From: Mickael Philit +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 ++#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 4ac08f89d491b3..6ffdb0071771b1 100644 --- a/var/spack/repos/builtin/packages/cgns/package.py +++ b/var/spack/repos/builtin/packages/cgns/package.py @@ -38,6 +38,9 @@ class Cgns(CMakePackage): version("3.3.1", sha256="81093693b2e21a99c5640b82b267a495625b663d7b8125d5f1e9e7aaa1f8d469") version("3.3.0", sha256="8422c67994f8dc6a2f201523a14f6c7d7e16313bdd404c460c16079dbeafc662") + depends_on("c", type="build") # generated + depends_on("fortran", type="build") # generated + 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") @@ -73,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 = [] @@ -102,10 +110,10 @@ def cmake_args(self): "-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", @@ -114,7 +122,7 @@ def cmake_args(self): "-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 00000000000000..954659e771af65 --- /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 08f4ade01309b5..e1b76a7ce00c5a 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/package.py b/var/spack/repos/builtin/packages/chai/package.py index 0f4b8457fec708..9529daaca59d1e 100644 --- a/var/spack/repos/builtin/packages/chai/package.py +++ b/var/spack/repos/builtin/packages/chai/package.py @@ -19,11 +19,29 @@ 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( + "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", @@ -80,6 +98,8 @@ 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") @@ -105,12 +125,15 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage): 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:", type="build", when="@2022.03.0:") + depends_on("cmake@3.8:", type="build") - depends_on("blt") - depends_on("blt@0.6.1:", type="build", when="@2024.02.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") @@ -120,7 +143,9 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage): conflicts("^blt@:0.3.6", when="+rocm") depends_on("umpire") - depends_on("umpire@2024.02.0:", when="@2024.02.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") @@ -133,6 +158,8 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage): 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") @@ -144,13 +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.02.0:", when="@2024.02.0:") + 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.12.0", when="@2.2.0:2.2.2") - depends_on("raja@0.13.0", when="@2.3.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") with when("+cuda"): depends_on("raja+cuda") @@ -191,7 +221,7 @@ def initconfig_compiler_entries(self): # 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) @@ -206,16 +236,15 @@ def initconfig_hardware_entries(self): 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)) - if "+separable_compilation" in spec: + 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)) else: entries.append(cmake_cache_option("ENABLE_HIP", False)) @@ -226,7 +255,7 @@ def initconfig_mpi_entries(self): spec = self.spec entries = super(Chai, self).initconfig_mpi_entries() - entries.append(cmake_cache_option("ENABLE_MPI", "+mpi" in spec)) + entries.append(cmake_cache_option("ENABLE_MPI", spec.satisfies("+mpi"))) return entries @@ -241,10 +270,17 @@ def initconfig_package_entries(self): 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 @@ -252,24 +288,25 @@ def initconfig_package_entries(self): entries.append("# Build Options") entries.append("#------------------{0}\n".format("-" * 60)) - # Build options entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value)) - entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec)) + 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", "+openmp" in spec)) - entries.append(cmake_cache_option("ENABLE_EXAMPLES", "+examples" in spec)) + 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 "tests=benchmarks" in spec: + 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", "tests=none" not in spec)) + 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) + cmake_cache_option( + "{}ENABLE_PICK".format(option_prefix), spec.satisfies("+enable_pick") + ) ) return entries diff --git a/var/spack/repos/builtin/packages/chameleon/package.py b/var/spack/repos/builtin/packages/chameleon/package.py index 5f9c8451ab32b2..a6af23d186a62d 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 @@ def cmake_args(self): ) 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 00000000000000..40235f21bf4855 --- /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 43b55a6a85c2bf..f3cce60c0bd795 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 1f0cb9fa898bd6..ca802875cde95c 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 @@ def cmake_args(self): 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 050ca651d4f5d7..ff55533b118b14 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 00000000000000..b53b7f2c26064c --- /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 feedd735d15e27..0538221e35e417 100644 --- a/var/spack/repos/builtin/packages/chapel/package.py +++ b/var/spack/repos/builtin/packages/chapel/package.py @@ -3,24 +3,897 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os +import subprocess + +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", + "pgi": "pgi", + "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", + "%pgi", + "%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_ 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 78244802438992..32a4f3629bb918 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 45a6e33810aac2..3d2b4dabc3a941 100644 --- a/var/spack/repos/builtin/packages/charliecloud/package.py +++ b/var/spack/repos/builtin/packages/charliecloud/package.py @@ -19,6 +19,7 @@ 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") @@ -102,6 +103,8 @@ 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=True, description="Build with squashfuse support", when="@0.32:") @@ -147,9 +150,9 @@ class Charliecloud(AutotoolsPackage): 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="build", when="@0.36:") - depends_on("squashfuse@0.1.105:0.2.0,0.4.0", type="build", when="@0.35") - depends_on("squashfuse@0.1.105", type="build", when="@0.32:0.34") + 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") @@ -159,14 +162,14 @@ def configure_args(self): 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/package.py b/var/spack/repos/builtin/packages/charmpp/package.py index 5225c20b430087..02ce131961d1ab 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 # # Patch is no longer needed in versions 6.8.0+ @@ -235,6 +244,9 @@ def charmarch(self): { ("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", } ) @@ -265,7 +277,7 @@ def charmarch(self): 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 \ @@ -277,7 +289,7 @@ def install(self, spec, prefix): 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=... \ @@ -290,7 +302,7 @@ def install(self, spec, prefix): 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, \ @@ -312,15 +324,15 @@ def install(self, spec, prefix): 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 /include and /lib fails so --basedir # cannot be used options.extend( @@ -330,9 +342,9 @@ def install(self, spec, prefix): ["--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 @@ -340,7 +352,7 @@ def install(self, spec, prefix): # 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 @@ -348,20 +360,27 @@ def install(self, spec, prefix): "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 diff --git a/var/spack/repos/builtin/packages/chatterbug/package.py b/var/spack/repos/builtin/packages/chatterbug/package.py index eddb9e3a9b8964..2ce3a2c7f995ea 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 @@ def build_targets(self): 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 b2c2900fd7600b..e256b0008a7742 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 148e806d6a456a..e098a4f2d1f6fc 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 4ad3cbffa3801c..19da180caed8fe 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 f28606aad3b02d..0f50baf3d5e990 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 @@ def edit(self, spec, prefix): # 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 @@ def edit(self, spec, prefix): 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 @@ def edit(self, spec, prefix): 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 1219b0c0cbc83f..c50f87a2b2f694 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 fe0c081d7faa6e..0010c2377d98ee 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 5b42f60d607e15..eb7067e0b3866d 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 0e83ec33cd644b..c697d05a02f992 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 @@ def configure_args(self): 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 2929bf09771c11..efa2b2227d50db 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 937044baa5c470..589a3f4762f288 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 14e3b0c11b159d..337152762ea8b6 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 cba0c2cab81a52..84ae3108a4210d 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 10e1ce2652656a..2f774f8d94d1c9 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 812ec40305e7b4..fd021efff6b1a6 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 025f216a44b954..913b1b82f6a077 100644 --- a/var/spack/repos/builtin/packages/claw/package.py +++ b/var/spack/repos/builtin/packages/claw/package.py @@ -45,6 +45,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 8f16ba94d24f83..1f0b821b94317e 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 a51360a6085e96..c9cdbb03c75945 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:") diff --git a/var/spack/repos/builtin/packages/clhep/package.py b/var/spack/repos/builtin/packages/clhep/package.py index 56796d9433ce24..6328b09c67873e 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 f909bd0e5874b9..a7cbf17c192132 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 8dc7876d0f4a96..08087611bd32e1 100644 --- a/var/spack/repos/builtin/packages/clinfo/package.py +++ b/var/spack/repos/builtin/packages/clinfo/package.py @@ -18,6 +18,9 @@ class Clinfo(MakefilePackage): license("CC0-1.0") + version( + "3.0.23.01.25", sha256="6dcdada6c115873db78c7ffc62b9fc1ee7a2d08854a3bccea396df312e7331e3" + ) version( "3.0.21.02.21", sha256="e52f5c374a10364999d57a1be30219b47fb0b4f090e418f2ca19a0c037c1e694" ) @@ -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 abb5c53b3c875f..bff3edef945780 100644 --- a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py @@ -58,12 +58,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 @@ -81,15 +75,13 @@ def cmake_py_shared(self): 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() ) @@ -125,7 +117,7 @@ def pgo_train(self): # 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")) @@ -142,9 +134,7 @@ def pgo_train(self): 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/package.py b/var/spack/repos/builtin/packages/clingo/package.py index 7af9b213fbaf6f..73ff2b17696297 100644 --- a/var/spack/repos/builtin/packages/clingo/package.py +++ b/var/spack/repos/builtin/packages/clingo/package.py @@ -39,6 +39,9 @@ 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") @@ -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,7 +69,6 @@ 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") @@ -75,9 +76,18 @@ class Clingo(CMakePackage): 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.")', @@ -97,7 +107,7 @@ def cmake_args(self): 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() @@ -115,7 +125,7 @@ def cmake_args(self): # 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: + if self.spec.satisfies("+ipo"): args.append(self.define("CMAKE_POLICY_DEFAULT_CMP0069", "NEW")) return args diff --git a/var/spack/repos/builtin/packages/cln/package.py b/var/spack/repos/builtin/packages/cln/package.py index b5ce6793e9340a..bb03afc7f26611 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 @@ def configure_args(self): 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 1a3d557823003c..ce99e6b8803fbe 100644 --- a/var/spack/repos/builtin/packages/cloc/package.py +++ b/var/spack/repos/builtin/packages/cloc/package.py @@ -23,6 +23,10 @@ class Cloc(Package): 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): diff --git a/var/spack/repos/builtin/packages/cloog/package.py b/var/spack/repos/builtin/packages/cloog/package.py index f18ba78ebc0b8c..191ea89fe53718 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 77456edb165562..7982479eccf9a5 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 @@ def build_targets(self): 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) @@ -100,9 +103,6 @@ def build_targets(self): 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 4848130837c1b9..a561b1039e0a5e 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 @@ def patch_for_reference_module(self): 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,42 @@ def type_of_build(self): 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: + elif self.spec.satisfies("%pgi"): 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 5eb8bcef88046a..8e8f8de0fd8eb6 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,33 @@ def build_targets(self): "--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: + elif self.spec.satisfies("%pgi"): 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 f245a386571113..a60c6e56b53922 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 3cafd307e6c13d..caf7e1e6e5aa14 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 ece7896b687db4..adf5b8d79b626d 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 00000000000000..c36e22c59f4315 --- /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 + bool cmELFInternalImpl::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 cmELF::EncodeDynamicEntries( + return std::vector(); + } + ++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 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 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 ab2366982d3270..9b4b760a33b6aa 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,6 +31,16 @@ class Cmake(Package): license("BSD-3-Clause") version("master", branch="master") + 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.26.6", sha256="070b9a2422e666d2c1437e2dab239a236e8a63622d0a8d0ffe9e389613d2b76a") version("3.25.3", sha256="cc995701d590ca6debc4245e9989939099ca52827dd46b5d3592f093afe1901c") @@ -60,321 +72,45 @@ class Cmake(Package): with default_args(deprecated=True): version( - "3.27.8", sha256="fece24563f697870fbb982ea8bf17482c9d5f855d8c9bf0b82463d76c9e8d0cc" + "3.29.3", sha256="252aee1448d49caa04954fd5e27d189dd51570557313e7b281636716a238bccb" ) version( - "3.27.7", sha256="08f71a106036bf051f692760ef9558c0577c42ac39e96ba097e7662bd4158d8e" + "3.29.2", sha256="36db4b6926aab741ba6e4b2ea2d99c9193222132308b4dc824d4123cb730352e" ) version( - "3.27.6", sha256="ef3056df528569e0e8956f6cf38806879347ac6de6a4ff7e4105dc4578732cfb" + "3.29.1", sha256="7fb02e8f57b62b39aa6b4cf71e820148ba1a23724888494735021e32ab0eefcc" ) version( - "3.27.4", sha256="0a905ca8635ca81aa152e123bdde7e54cbe764fdd9a70d62af44cad8b92967af" + "3.29.0", sha256="a0669630aae7baa4a8228048bf30b622f9e9fd8ee8cedb941754e9e38686c778" ) version( - "3.27.3", sha256="66afdc0f181461b70b6fedcde9ecc4226c5cd184e7203617c83b7d8e47f49521" + "3.28.4", sha256="eb9c787e078848dc493f4f83f8a4bbec857cd1f38ab6425ce8d2776a9f6aa6fb" ) version( - "3.27.2", sha256="798e50085d423816fe96c9ef8bee5e50002c9eca09fed13e300de8a91d35c211" + "3.28.3", sha256="72b7570e5c8593de6ac4ab433b73eab18c5fb328880460c86ce32608141ad5c1" ) version( - "3.27.1", sha256="b1a6b0135fa11b94476e90f5b32c4c8fad480bf91cf22d0ded98ce22c5132004" + "3.28.2", sha256="1466f872dc1c226f373cf8fba4230ed216a8f108bd54b477b5ccdfd9ea2d124a" ) version( - "3.27.0", sha256="aaeddb6b28b993d0a6e32c88123d728a17561336ab90e0bf45032383564d3cb8" + "3.28.1", sha256="15e94f83e647f7d620a140a7a5da76349fc47a1bfed66d0f5cdee8e7344079ad" ) 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.2", sha256="c026f22cb931dd532f648f087d587f07a1843c6e66a3dfca4fb0ea21944ed33c" - ) - version( - "3.25.1", sha256="1c511d09516af493694ed9baf13c55947a36389674d657a2d5e0ccedc6b291d8" - ) - version( - "3.25.0", sha256="306463f541555da0942e6f5a0736560f70c487178b9d94a5ae7f34d0538cdd48" - ) - 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.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.5", sha256="d3987c3f7759fa0a401c5fcd5076be44a19613bfaa8baee1b5d1835750dc5375" - ) - version( - "3.22.4", sha256="5c55d0b0bc4c191549e3502b8f99a4fe892077611df22b4178cc020626e22a47" - ) - version( - "3.22.3", sha256="9f8469166f94553b6978a16ee29227ec49a2eb5ceb608275dec40d8ae0d1b5a0" + "3.28.0", sha256="e1dcf9c817ae306e73a45c2ba6d280c65cf4ec00dd958eb144adaf117fb58e71" ) + # used in py-cmake, to be removed in Spack 0.23 version( "3.22.2", sha256="3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced" ) - version( - "3.22.1", sha256="0e998229549d7b3f368703d20e248e7ee1f853910d42704aa87918c213ea82c0" - ) - version( - "3.22.0", sha256="998c7ba34778d2dfdb3df8a695469e24b11e2bfa21fbe41b361a3f45e1c9345e" - ) - 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.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.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.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.4", sha256="86985d73d0a63ec99c236aab5287316e252164f33d7c4cb160954a980c71f36f" - ) - version( - "3.17.3", sha256="0bd60d512275dc9f6ef2a2865426a184642ceb3761794e6b65bff233b91d8c40" - ) - version( - "3.17.1", sha256="3aa9114485da39cbd9665a0bfe986894a282d5f0882b1dea960a739496620727" - ) - version( - "3.17.0", sha256="b74c05b55115eacc4fa2b77a814981dbda05cdc95a53e279fe16b7b272f00847" - ) - 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.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.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.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.3", sha256="acbf13af31a741794106b76e5d22448b004a66485fc99f6d7df4d22e99da164a" - ) - version( - "3.12.2", sha256="0f97485799e51a7070cc11494f3e02349b0fc3a24cc12b082e737bf67a0581a4" - ) - version( - "3.12.1", sha256="c53d5c2ce81d7a957ee83e3e635c8cda5dfe20c9d501a4828ee28e1615e57ab2" - ) - version( - "3.12.0", sha256="d0781a90f6cdb9049d104ac16a150f9350b693498b9dea8a0331e799db6b9d69" - ) - 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.2", sha256="80d0faad4ab56de07aa21a7fc692c88c4ce6156d42b0579c6962004a70a3218b" - ) - version( - "3.10.1", sha256="7be36ee24b0f5928251b644d29f5ff268330a916944ef4a75e23ba01e7573284" - ) - version( - "3.10.0", sha256="b3345c17609ea0f039960ef470aa099de9942135990930a57c14575aae884987" - ) - version("3.9.4", sha256="b5d86f12ae0072db520fdbdad67405f799eb728b610ed66043c20a92b4906ca1") - version("3.9.2", sha256="954a5801a456ee48e76f01107c9a4961677dd0f3e115275bbd18410dc22ba3c1") - version("3.9.0", sha256="167701525183dbb722b9ffe69fb525aa2b81798cf12f5ce1c020c93394dfae0f") - version("3.8.1", sha256="ce5d9161396e06501b00e52933783150a87c33080d4bdcef461b5b7fd24ac228") - version("3.8.0", sha256="cab99162e648257343a20f61bcd0b287f5e88e36fcb2f1d77959da60b7f35969") - version("3.7.1", sha256="449a5bce64dbd4d5b9517ebd1a1248ed197add6ad27934478976fd5f1f9330e1") - version("3.6.0", sha256="fd05ed40cc40ef9ef99fac7b0ece2e0b871858a82feade48546f5d2940147670") - version("3.5.1", sha256="93d651a754bcf6f0124669646391dd5774c0fc4d407c384e3ae76ef9a60477e8") - version("3.5.0", sha256="92c83ad8a4fd6224cf6319a60b399854f55b38ebe9d297c942408b792b1a9efa") - version("3.4.0", sha256="a5b82bf6ace6c481cdb911fd5d372a302740cbefd387e05297cb37f7468d1cea") + + depends_on("c", type="build") + depends_on("cxx", type="build") variant( "build_type", @@ -383,6 +119,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") @@ -399,27 +152,22 @@ class Cmake(Package): when="@3.15.5", ) + # 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") + depends_on("ninja", when="platform=windows") depends_on("gmake", when="platform=linux") depends_on("gmake", when="platform=darwin") - depends_on("gmake", when="platform=cray") depends_on("gmake", when="platform=freebsd") - # 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("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( @@ -449,7 +197,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:") @@ -564,7 +312,7 @@ def bootstrap_args(self): 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: @@ -577,17 +325,28 @@ def bootstrap_args(self): # 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}", @@ -595,17 +354,10 @@ def bootstrap_args(self): # 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 911fa288943842..fe53a9f446bc77 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 dbfed121ba741c..80bd320351dfb6 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 853d997b8049ae..16718fdd66c041 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 ad2e799d21874c..98a3f82fadeab3 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 @@ def edit(self, spec, prefix): "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 735a39fbea8d93..ac9d099f888d2d 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 2046ada5d72f06..a7fd47b85a3032 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 55c531a9800f2c..cae17ca932337b 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 bb6e6b9689e84d..817ffbe9a1c973 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 @@ def check(self): 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 baaec3a7a73eeb..e6236b0c85ec9f 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 16d2066fc55166..42adb5e100d6a5 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 b49556c659718e..860755f22b35a1 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 03130fa0b4f634..0af3911b28ee56 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 @@ def install(self, spec, prefix): 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 e4348104db4c02..55081c0d0d1303 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 f1a97d842b398a..5cbdd9d3842a93 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 e208405387efeb..bc7da6afcc396f 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 5639ee6d5dcc2e..227de4f3b738fb 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 1614166e288975..455ad130be095d 100644 --- a/var/spack/repos/builtin/packages/codes/package.py +++ b/var/spack/repos/builtin/packages/codes/package.py @@ -45,7 +45,7 @@ def configure_args(self): "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 index 6d6577f6a82d17..2347df15ce3ccf 100644 --- a/var/spack/repos/builtin/packages/codipack/package.py +++ b/var/spack/repos/builtin/packages/codipack/package.py @@ -22,6 +22,8 @@ class Codipack(CMakePackage, Package): 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( diff --git a/var/spack/repos/builtin/packages/coevp/package.py b/var/spack/repos/builtin/packages/coevp/package.py index 589a9253a32c38..c44e42e6aefb5e 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 @@ def build_targets(self): 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 feb7881e3f0981..6cf71a9eb3e1b0 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 a184e68e2c8e2e..6cffab95cbd7c4 100644 --- a/var/spack/repos/builtin/packages/coin3d/package.py +++ b/var/spack/repos/builtin/packages/coin3d/package.py @@ -21,6 +21,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 9c2706318165c0..0fe8da7c2e5cdc 100644 --- a/var/spack/repos/builtin/packages/coinhsl/package.py +++ b/var/spack/repos/builtin/packages/coinhsl/package.py @@ -8,7 +8,7 @@ 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 27d248862cb49f..b7295633ee8579 100644 --- a/var/spack/repos/builtin/packages/coinutils/package.py +++ b/var/spack/repos/builtin/packages/coinutils/package.py @@ -21,4 +21,6 @@ class Coinutils(AutotoolsPackage): 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 50c4b1fa512891..1365bb8404cbb7 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 a15ee75b9c13ec..3475d40f4bf780 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 500337d3bd120f..dcea9ae1524b1e 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 f6c846325942f0..5d2e050a13b0c8 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 @@ def build_targets(self): 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 @@ def build_targets(self): 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 6ab94ac8b09bd6..1e64717b579eb2 100644 --- a/var/spack/repos/builtin/packages/comgr/package.py +++ b/var/spack/repos/builtin/packages/comgr/package.py @@ -30,6 +30,10 @@ def url_for_version(self, version): license("NCSA") version("master", branch="amd-stg-open") + 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") @@ -39,16 +43,15 @@ def url_for_version(self, version): 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") with default_args(deprecated=True): - 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.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") @@ -65,11 +68,6 @@ def url_for_version(self, version): depends_on("rocm-cmake@3.5.0:", 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", @@ -83,6 +81,10 @@ def url_for_version(self, version): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", ]: # llvm libs are linked statically, so this *could* be a build dep @@ -92,7 +94,21 @@ def url_for_version(self, version): # that a conditional dependency 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"]: + 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"@{ver}") @property diff --git a/var/spack/repos/builtin/packages/commons-lang3/package.py b/var/spack/repos/builtin/packages/commons-lang3/package.py index ef05a2e8546608..0b3d0ba2fb2410 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/compadre/package.py b/var/spack/repos/builtin/packages/compadre/package.py index 32e276ce55f94c..19c99e217bd5f0 100644 --- a/var/spack/repos/builtin/packages/compadre/package.py +++ b/var/spack/repos/builtin/packages/compadre/package.py @@ -25,6 +25,10 @@ class Compadre(CMakePackage): version("1.4.1", sha256="2e1e7d8e30953f76b6dc3a4c86ec8103d4b29447194cb5d5abb74b8e4099bdd9") version("1.3.0", sha256="f711a840fd921e84660451ded408023ec3bcfc98fd0a7dc4a299bfae6ab489c2") + 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") @@ -55,14 +59,14 @@ def cmake_args(self): ] ) - if "+mpi" in spec: + if spec.satisfies("+mpi"): options.append("-DCompadre_USE_MPI:BOOL=ON") - if "~tests" in spec: + if spec.satisfies("~tests"): options.append("-DCompadre_EXAMPLES:BOOL=OFF") options.append("-DCompadre_TESTS:BOOL=OFF") - if "+shared" in spec: + 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 a6805d07487ebb..08a26f9dd535fa 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 00000000000000..f2fbc24f614421 --- /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 b7441b8ecc5987..d666737cb3ec57 100644 --- a/var/spack/repos/builtin/packages/composable-kernel/package.py +++ b/var/spack/repos/builtin/packages/composable-kernel/package.py @@ -13,12 +13,16 @@ class ComposableKernel(CMakePackage): 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.0.tar.gz" + 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.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") @@ -28,8 +32,11 @@ class ComposableKernel(CMakePackage): 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( @@ -51,6 +58,10 @@ class ComposableKernel(CMakePackage): for ver in [ "master", + "6.2.1", + "6.2.0", + "6.1.2", + "6.1.1", "6.1.0", "6.0.2", "6.0.0", @@ -67,6 +78,10 @@ class ComposableKernel(CMakePackage): 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) @@ -81,12 +96,17 @@ def cmake_args(self): ] if "auto" not in self.spec.variants["amdgpu_target"]: args.append(self.define_from_variant("GPU_TARGETS", "amdgpu_target")) - if self.spec.satisfies("@5.6.0:"): + 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/maphyspp/package.py b/var/spack/repos/builtin/packages/composyx/package.py similarity index 54% rename from var/spack/repos/builtin/packages/maphyspp/package.py rename to var/spack/repos/builtin/packages/composyx/package.py index fb440cad5ae799..d177bee5b25d21 100644 --- a/var/spack/repos/builtin/packages/maphyspp/package.py +++ b/var/spack/repos/builtin/packages/composyx/package.py @@ -7,16 +7,20 @@ from spack.package import * -class Maphyspp(CMakePackage): +class Composyx(CMakePackage): """a Massively Parallel Hybrid Solver in C++""" - homepage = "https://gitlab.inria.fr/solverstack/maphys/maphyspp" - git = "https://gitlab.inria.fr/solverstack/maphys/maphyspp.git" - url = "https://gitlab.inria.fr/api/v4/projects/6194/packages/generic/source/v1.1.9/maphyspp-1.1.9.tar.gz" + 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("master", branch="master", submodules=True) - version("1.1.9", sha256="472deef05f69c26337a6f8e769cf36cbe0a50e6ec096757389ed10286a0d7e04") + 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") @@ -47,20 +51,20 @@ class Maphyspp(CMakePackage): def cmake_args(self): args = [ self.define("BUILD_SHARED_LIBS", True), - self.define("MAPHYSPP_C_DRIVER", True), - self.define("MAPHYSPP_Fortran_DRIVER", True), - self.define("MAPHYSPP_COMPILE_BENCH", False), - self.define("MAPHYSPP_USE_MUMPS", False), - self.define("MAPHYSPP_USE_QRMUMPS", False), - self.define("MAPHYSPP_USE_SZ_COMPRESSOR", False), - self.define_from_variant("MAPHYSPP_COMPILE_EXAMPLES", "examples"), - self.define_from_variant("MAPHYSPP_COMPILE_TESTS", "tests"), - self.define_from_variant("MAPHYSPP_USE_ARMADILLO", "armadillo"), - self.define_from_variant("MAPHYSPP_USE_ARPACK", "arpack-ng"), - self.define_from_variant("MAPHYSPP_USE_EIGEN", "eigen"), - self.define_from_variant("MAPHYSPP_USE_FABULOUS", "fabulous"), - self.define_from_variant("MAPHYSPP_USE_PADDLE", "paddle"), - self.define_from_variant("MAPHYSPP_USE_PASTIX", "pastix"), + 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 001b04953d3616..978298f597bf86 100644 --- a/var/spack/repos/builtin/packages/conduit/package.py +++ b/var/spack/repos/builtin/packages/conduit/package.py @@ -14,7 +14,7 @@ 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,7 @@ 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") @@ -69,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 ########################################################################### @@ -116,6 +124,12 @@ class Conduit(CMakePackage): # package dependencies ########################################################################### + ####################### + # BLT + ####################### + depends_on("blt", type="build") + depends_on("blt@0.6.2:", type="build", when="@0.9:") + ####################### # CMake ####################### @@ -240,7 +254,7 @@ def url_for_version(self, version): 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") @@ -250,6 +264,13 @@ def build_test(self): 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): @@ -286,7 +307,8 @@ def _get_host_config_path(self, spec): 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 @@ -308,7 +330,7 @@ def hostconfig(self): ####################### 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 @@ -359,13 +381,13 @@ def hostconfig(self): 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")) @@ -387,25 +409,41 @@ def hostconfig(self): 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")) @@ -413,7 +451,7 @@ def hostconfig(self): ####################### # 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")) @@ -429,9 +467,9 @@ def hostconfig(self): 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 @@ -439,7 +477,7 @@ def hostconfig(self): 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") @@ -453,14 +491,14 @@ def hostconfig(self): 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)) @@ -473,7 +511,7 @@ def hostconfig(self): 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 @@ -488,11 +526,11 @@ def hostconfig(self): 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") @@ -510,7 +548,7 @@ def hostconfig(self): # 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") @@ -519,7 +557,7 @@ def hostconfig(self): # 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: @@ -537,9 +575,9 @@ def hostconfig(self): 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: @@ -551,7 +589,7 @@ def hostconfig(self): 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") @@ -562,7 +600,7 @@ def hostconfig(self): 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") @@ -573,7 +611,7 @@ def hostconfig(self): 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") @@ -584,7 +622,7 @@ def hostconfig(self): 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 f15f3affbd6045..f7bac7bbdcedd6 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 32ab7d77792f4c..b3f1816a246981 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 @@ def edit(self, spec, prefix): 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 @@ def edit(self, spec, prefix): 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 599104957ca3b6..0b3d75d9f143c6 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 bff4b72b4ed9a7..a6b17ed44fe737 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 0ed38e823589d0..2f11a8cae01ec9 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 62834b7ec449a0..f056d234379cb2 100644 --- a/var/spack/repos/builtin/packages/converge/package.py +++ b/var/spack/repos/builtin/packages/converge/package.py @@ -146,29 +146,29 @@ def install(self, spec, prefix): # 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 c849e48149d617..07a1ebae6ebccf 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 b0a6f70675296e..45fc4c08a5258e 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 56e20a06391704..7d55cfbc88e5c6 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 e5122166dab37a..e1b5f1c0d256ae 100644 --- a/var/spack/repos/builtin/packages/coreutils/package.py +++ b/var/spack/repos/builtin/packages/coreutils/package.py @@ -24,6 +24,7 @@ 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") @@ -36,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, @@ -57,7 +60,7 @@ def configure_args(self): 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 5320ab9fb013ef..ef834f703d3047 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/package.py b/var/spack/repos/builtin/packages/cosma/package.py index 77a9ba7b69a1c4..6e62f716cf4d82 100644 --- a/var/spack/repos/builtin/packages/cosma/package.py +++ b/var/spack/repos/builtin/packages/cosma/package.py @@ -36,6 +36,8 @@ 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") @@ -81,7 +83,7 @@ class Cosma(CMakePackage): 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): @@ -110,11 +112,11 @@ def cosma_blas_cmake_arg(self): 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 e9b69678edf391..40117462a30e28 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 9e66b8938af2d8..93749619afb2fc 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 @@ def install(self, spec, prefix): 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 @@ def install(self, spec, prefix): 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 @@ def install(self, spec, prefix): "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 @@ def check_install(self): 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 @@ def check_install(self): 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 d16466bad6bf48..a5a78a27b0a695 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 4e85387a88580a..427c8468013dfe 100644 --- a/var/spack/repos/builtin/packages/costa/package.py +++ b/var/spack/repos/builtin/packages/costa/package.py @@ -28,6 +28,8 @@ 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=True, description="Build shared libraries") variant("profiling", default=False, description="Enable profiling") @@ -55,11 +57,11 @@ def setup_build_environment(self, env): 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/cotter/package.py b/var/spack/repos/builtin/packages/cotter/package.py index c38d5352e70e8b..f1ab277344174c 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 index b2ba2aab72e163..c3aa9a9db1438a 100644 --- a/var/spack/repos/builtin/packages/countdown/package.py +++ b/var/spack/repos/builtin/packages/countdown/package.py @@ -21,6 +21,8 @@ class Countdown(CMakePackage, CudaPackage): version("1.1.1", sha256="ee7f00ffc047f000a21a7a71f6ea6f4049afb1a8407608adc04993929ceba917") + depends_on("c", type="build") # generated + variant( "acc_mpi", default=True, 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 00000000000000..2b88af03d117e7 --- /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/d4-dispersion-bugfix-2024.3.patch b/var/spack/repos/builtin/packages/cp2k/d4-dispersion-bugfix-2024.3.patch new file mode 100644 index 00000000000000..36613ab6dd32c4 --- /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 8e626999043f18..5d462a906a438c 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -20,6 +20,7 @@ "60": "P100", "70": "V100", "80": "A100", + "90": "H100", "gfx906": "Mi50", "gfx908": "Mi100", "gfx90a": "Mi250", @@ -45,6 +46,8 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, 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") @@ -56,6 +59,10 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): version("7.1", sha256="ccd711a09a426145440e666310dd01cc5772ab103493c4ae6a3470898cd0addb") 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( @@ -169,21 +176,22 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): 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"): depends_on("pkgconfig", type="build", when="@7.0:") for lmax in HFX_LMAX_RANGE: + 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"): @@ -224,12 +232,29 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): depends_on("elpa@2023.05.001:", when="@2023.2:") with when("+dlaf"): - 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") @@ -248,12 +273,10 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, 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="@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:") @@ -276,11 +299,16 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): 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") @@ -297,7 +325,7 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, 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+") 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) @@ -338,6 +366,7 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, 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") # Allow compilation with build_type=RelWithDebInfo and build_type=MinSizeRel @@ -345,15 +374,43 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): # 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") - # Patch for an undefined constant due to incompatible changes in ELPA - @when("@9.1:2022.2 +elpa") + # 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" @@ -381,6 +438,7 @@ def edit(self, pkg, spec, prefix): "cce": ["-O2"], "xl": ["-O3"], "aocc": ["-O2"], + "rocmcc": ["-O1"], } dflags = ["-DNDEBUG"] if spec.satisfies("@:2023.2") else [] @@ -391,10 +449,10 @@ def edit(self, pkg, spec, prefix): # 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[spec.compiler.name][:] @@ -412,23 +470,23 @@ def edit(self, pkg, spec, prefix): # C99-style for-loops with inline definition of iterating variable. 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("%pgi") or 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"] @@ -439,103 +497,31 @@ def edit(self, pkg, spec, prefix): if spec.satisfies("@7.1%gcc@13:"): fcflags.append("-fallow-argument-mismatch") - if "+openmp" in spec: + 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 "%cce" in spec: # Cray enables OpenMP by default + 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 + 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 spec: - dflags.extend(["-D__PLUMED2"]) - cppflags.extend(["-D__PLUMED2"]) - libs.extend([join_path(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 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"].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.extend(scalapack) - libs.extend(mpi) - libs.extend(pkg.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 @@ -543,20 +529,19 @@ def edit(self, pkg, spec, prefix): # (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) @@ -568,23 +553,19 @@ def edit(self, pkg, spec, prefix): # 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] @@ -592,23 +573,14 @@ def edit(self, pkg, spec, prefix): 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"): @@ -632,6 +604,91 @@ def edit(self, pkg, spec, prefix): 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 += [ @@ -679,23 +736,25 @@ def edit(self, pkg, spec, prefix): 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"] + cppflags += ["-D__HIP_PLATFORM_AMD__"] + cppflags += ["-D__GRID_HIP"] + gpuver = GPU_MAP[spec.variants["amdgpu_target"].value[0]] - if "smm=libsmm" in spec: + if spec.satisfies("smm=libsmm"): lib_dir = join_path("lib", self.makefile_architecture, self.makefile_version) mkdirp(lib_dir) try: @@ -713,25 +772,12 @@ def edit(self, pkg, spec, prefix): 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) @@ -739,7 +785,7 @@ def edit(self, pkg, spec, prefix): 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" @@ -751,7 +797,7 @@ def edit(self, pkg, spec, prefix): "FC = {0}\n" "CC = {1}\n" "CXX = {2}\n" "LD = {3}\n".format(fc, cc, cxx, fc) ) - if "%intel" in spec: + 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 : @@ -765,7 +811,7 @@ def edit(self, pkg, spec, prefix): 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") @@ -781,15 +827,24 @@ def fflags(var, lst): 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(prefix.share.data)) @@ -889,7 +944,7 @@ def fix_package_config(self): content += " " + self.spec["fftw-api"].libs.ld_flags fftw = self.spec["fftw-api"] - if fftw.name in ["fftw", "amdfftw"] and fftw.satisfies("+openmp"): + if fftw.name in ["fftw", "amdfftw", "cray-fftw"] and fftw.satisfies("+openmp"): content += " -lfftw3_omp" content += "\n" @@ -903,7 +958,7 @@ def cmake_args(self): spec = self.spec args = [] - 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: @@ -913,7 +968,7 @@ def cmake_args(self): 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: diff --git a/var/spack/repos/builtin/packages/cpio/package.py b/var/spack/repos/builtin/packages/cpio/package.py index 81eb20758f8db6..be381e52c5e46d 100644 --- a/var/spack/repos/builtin/packages/cpio/package.py +++ b/var/spack/repos/builtin/packages/cpio/package.py @@ -24,6 +24,8 @@ class Cpio(AutotoolsPackage, GNUMirrorPackage): version("2.14", sha256="145a340fd9d55f0b84779a44a12d5f79d77c99663967f8cfa168d7905ca52454") version("2.13", sha256="e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88") + depends_on("c", type="build") # generated + build_directory = "spack-build" def patch(self): @@ -40,10 +42,10 @@ def flag_handler(self, name, flags): 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 61977a370669a7..42fb0a49f2057a 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 @@ def install(self, spec, prefix): 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 509724a3fc661f..e50ff93c4936bc 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 04874b3a9e62e3..1fa77baa286c18 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 e90a0dabc84869..eb79d36a3520cb 100644 --- a/var/spack/repos/builtin/packages/cpp-logger/package.py +++ b/var/spack/repos/builtin/packages/cpp-logger/package.py @@ -17,6 +17,9 @@ class CppLogger(CMakePackage): version("develop", branch="develop") version("master", branch="master") + 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 93954c23c997f1..c99e233fc113fa 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 dcc9e14cf9cbc5..6ca15a825e4850 100644 --- a/var/spack/repos/builtin/packages/cppad/package.py +++ b/var/spack/repos/builtin/packages/cppad/package.py @@ -9,14 +9,42 @@ 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 fbda439345b37c..61f9266eefe1a4 100644 --- a/var/spack/repos/builtin/packages/cppcheck/package.py +++ b/var/spack/repos/builtin/packages/cppcheck/package.py @@ -9,7 +9,7 @@ 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 1cee1f9ad1e93f..29f342bd95ff54 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 ac998ace01c62e..f928c954d8ffcd 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 a797e6eefc0cb7..9f63fbb1320ab2 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 403e8bc42e98b5..94ac694297652b 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 1fdba0c399cb54..d960486c965900 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 9866654c5eef3c..669a95e707417f 100644 --- a/var/spack/repos/builtin/packages/cppzmq/package.py +++ b/var/spack/repos/builtin/packages/cppzmq/package.py @@ -30,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 93cff509b40a2e..07a38e0015d498 100644 --- a/var/spack/repos/builtin/packages/cpr/package.py +++ b/var/spack/repos/builtin/packages/cpr/package.py @@ -12,13 +12,16 @@ 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") + depends_on("cxx", type="build") + depends_on("curl") depends_on("git", type="build") diff --git a/var/spack/repos/builtin/packages/cprnc/package.py b/var/spack/repos/builtin/packages/cprnc/package.py index 9e4282879e05fd..c719c107155cc5 100644 --- a/var/spack/repos/builtin/packages/cprnc/package.py +++ b/var/spack/repos/builtin/packages/cprnc/package.py @@ -20,6 +20,8 @@ class Cprnc(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/cpu-features/package.py b/var/spack/repos/builtin/packages/cpu-features/package.py index 0ec7b1969560a9..1e4e0c246f6b5e 100644 --- a/var/spack/repos/builtin/packages/cpu-features/package.py +++ b/var/spack/repos/builtin/packages/cpu-features/package.py @@ -20,6 +20,9 @@ class CpuFeatures(CMakePackage): 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 4d1cb8fc223152..2a3e905be07177 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,9 @@ class Cpuinfo(CMakePackage): license("BSD-2-Clause") version("main", branch="main") - version("2023-11-04", commit="d6860c477c99f1fce9e28eb206891af3c0e1a1d7") # py-torch@2.3: + 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 @@ -28,16 +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("CPUINFO_BUILD_UNIT_TESTS", False), self.define("CPUINFO_BUILD_MOCK_TESTS", False), self.define("CPUINFO_BUILD_BENCHMARKS", False), - self.define("CPUINFO_LIBRARY_TYPE", "shared"), + 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 00000000000000..222da4cef1bbea --- /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 aaaf2264792381..6d2e644b938944 100644 --- a/var/spack/repos/builtin/packages/cqrlib/package.py +++ b/var/spack/repos/builtin/packages/cqrlib/package.py @@ -9,18 +9,24 @@ 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 a00e3ea62ce639..58c918c6fcbfb6 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 0042b18de8c8a8..564ae8a0f37536 100644 --- a/var/spack/repos/builtin/packages/cracklib/package.py +++ b/var/spack/repos/builtin/packages/cracklib/package.py @@ -22,6 +22,8 @@ class Cracklib(AutotoolsPackage): 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 2aceaad214a891..71b49c2e24c02f 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-libsci/package.py b/var/spack/repos/builtin/packages/cray-libsci/package.py index 438cad5b356131..4d063172049c6b 100644 --- a/var/spack/repos/builtin/packages/cray-libsci/package.py +++ b/var/spack/repos/builtin/packages/cray-libsci/package.py @@ -64,11 +64,11 @@ def blas_libs(self): 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 4b422bf38e2b97..7e8bc574421b70 100644 --- a/var/spack/repos/builtin/packages/cray-mpich/package.py +++ b/var/spack/repos/builtin/packages/cray-mpich/package.py @@ -32,6 +32,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,7 +67,7 @@ def external_prefix(self): 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")) @@ -86,7 +88,7 @@ def setup_dependent_build_environment(self, env, dependent_spec): 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") diff --git a/var/spack/repos/builtin/packages/cray-mvapich2/package.py b/var/spack/repos/builtin/packages/cray-mvapich2/package.py index b76d583c2b3d36..03ad2d05160619 100644 --- a/var/spack/repos/builtin/packages/cray-mvapich2/package.py +++ b/var/spack/repos/builtin/packages/cray-mvapich2/package.py @@ -26,6 +26,8 @@ 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 diff --git a/var/spack/repos/builtin/packages/creduce/package.py b/var/spack/repos/builtin/packages/creduce/package.py index d06a171995fb8b..cac9da7e6dc1eb 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 0edb7bf18b53eb..3f4d4b77675164 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 72ddb7c57f3a47..d9ac89f90cb65e 100644 --- a/var/spack/repos/builtin/packages/cronie/package.py +++ b/var/spack/repos/builtin/packages/cronie/package.py @@ -19,6 +19,8 @@ class Cronie(AutotoolsPackage): 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 4c9865b35906f4..bb5c0b3f128e17 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 ca8cb421c0fe45..6dd0242c3a2016 100644 --- a/var/spack/repos/builtin/packages/crtm-fix/package.py +++ b/var/spack/repos/builtin/packages/crtm-fix/package.py @@ -42,12 +42,12 @@ def install(self, spec, prefix): 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 = [] diff --git a/var/spack/repos/builtin/packages/crtm/package.py b/var/spack/repos/builtin/packages/crtm/package.py index 753bcc44689a32..d876a245dd034c 100644 --- a/var/spack/repos/builtin/packages/crtm/package.py +++ b/var/spack/repos/builtin/packages/crtm/package.py @@ -78,6 +78,8 @@ class Crtm(CMakePackage): # Uses the tip of REL-2.3.0_emc branch version("2.3.0", commit="99760e693ce3b90a3b3b0e97d80972b4dfb61196") + 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" diff --git a/var/spack/repos/builtin/packages/crunch/package.py b/var/spack/repos/builtin/packages/crunch/package.py index 35c0195ef5a6bf..bc9406bdd75cad 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/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py index b0654740381ec4..49b1df6e53adc6 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 @@ def build(self, spec, prefix): 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 223726dc1ebfff..7c6a7bc814b809 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 ec189e26f9c011..f5fd07a95979fa 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 6b6ebfd0f5dee0..2de4b7313e07f9 100644 --- a/var/spack/repos/builtin/packages/cscope/package.py +++ b/var/spack/repos/builtin/packages/cscope/package.py @@ -9,7 +9,7 @@ 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 22333049dd5b5c..128f6977c14082 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 0cf000dfa22418..03199ede884968 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 0971f1decbda21..d44984013b80d6 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 81c8feab684c26..7c1760fdd8ded3 100644 --- a/var/spack/repos/builtin/packages/ctre/package.py +++ b/var/spack/repos/builtin/packages/ctre/package.py @@ -26,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 b70f294614b7db..04a03e30870d25 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 00000000000000..75560cbea92323 --- /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 7e1c8ae00caee0..910148019a78a9 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 be571342821ed1..6b1f619db3232c 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 c3c4734153fa53..059f03c5320d36 100644 --- a/var/spack/repos/builtin/packages/cubelib/package.py +++ b/var/spack/repos/builtin/packages/cubelib/package.py @@ -46,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 a358aacd6ffd2b..0fe52ca9752ff5 100644 --- a/var/spack/repos/builtin/packages/cubew/package.py +++ b/var/spack/repos/builtin/packages/cubew/package.py @@ -46,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 bd6fbc94bbf4ec..cbc74c64360448 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 90e218b126b5b0..5bc671c6610a89 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 d70fc3d8651c4e..bd1ff959f2ac26 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -23,8 +23,71 @@ # - 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.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", @@ -589,19 +652,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", "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 8c89391f65c054..c060514c476a5b 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 5b5c10c44e79b7..2d1a7b3b95ede5 100644 --- a/var/spack/repos/builtin/packages/cudnn/package.py +++ b/var/spack/repos/builtin/packages/cudnn/package.py @@ -9,6 +9,14 @@ 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", @@ -378,13 +386,13 @@ def setup_run_environment(self, env): # 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 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 c1e7eec160e791..ab75d9f13c5b58 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 abfd480d5f7126..b9db779b010fb6 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 6d4bf76626876e..b2c5b84ecfba5d 100644 --- a/var/spack/repos/builtin/packages/cups/package.py +++ b/var/spack/repos/builtin/packages/cups/package.py @@ -14,16 +14,26 @@ 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.4.10", sha256="d75757c2bc0f7a28b02ee4d52ca9e4b1aa1ba2affe16b985854f5336940e5ad7") 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 c8ffa33ad9fb92..ab040906c19ce3 100644 --- a/var/spack/repos/builtin/packages/curl/package.py +++ b/var/spack/repos/builtin/packages/curl/package.py @@ -22,8 +22,7 @@ class Curl(NMakePackage, AutotoolsPackage): 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"] @@ -32,220 +31,54 @@ class Curl(NMakePackage, AutotoolsPackage): license("curl") - version("8.7.1", sha256="05bbd2b698e9cfbab477c33aa5e99b4975501835a41b7ca6ca71de03d8849e76") - version("8.6.0", sha256="b4785f2d8877fa92c0e45d7155cf8cc6750dbda961f4b1a45bcbec990cf2fa9b") - 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", + "8.8.0", + sha256="40d3792d38cfa244d8f692974a567e9a5f3387c547579f1124e95ea2a1020d0d", deprecated=True, ) version( - "7.80.0", - sha256="dd0d150e49cd950aff35e16b628edf04927f0289df42883750cf952bb858189c", + "8.7.1", + sha256="05bbd2b698e9cfbab477c33aa5e99b4975501835a41b7ca6ca71de03d8849e76", deprecated=True, ) version( - "7.79.1", - sha256="de62c4ab9a9316393962e8b94777a570bb9f71feb580fb4475e412f2f9387851", + "8.6.0", + sha256="b4785f2d8877fa92c0e45d7155cf8cc6750dbda961f4b1a45bcbec990cf2fa9b", deprecated=True, ) version( - "7.79.0", - sha256="d607a677f473f79f96c964100327125a6204a39d835dc00dab7fc0129b959f42", + "8.4.0", + sha256="e5250581a9c032b1b6ed3cf2f9c114c811fc41881069e9892d115cc73f9e88c6", deprecated=True, ) version( - "7.78.0", - sha256="98530b317dc95ccb324bbe4f834f07bb642fbc393b794ddf3434f246a71ea44a", - deprecated=True, - ) - version( - "7.77.0", - sha256="6c0c28868cb82593859fc43b9c8fdb769314c855c05cf1b56b023acf855df8ea", - deprecated=True, - ) - version( - "7.76.1", - sha256="7a8e184d7d31312c4ebf6a8cb59cd757e61b2b2833a9ed4f9bf708066e7695e9", - deprecated=True, - ) - version( - "7.76.0", - sha256="e29bfe3633701590d75b0071bbb649ee5ca4ca73f00649268bd389639531c49a", - 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": @@ -281,10 +114,6 @@ 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): - # curl queries pkgconfig for openssl compilation flags - depends_on("pkgconfig", type="build") variant( "libs", default="shared,static" if not is_windows else "shared", @@ -293,12 +122,21 @@ class Curl(NMakePackage, AutotoolsPackage): description="Build shared libs, static libs or both", ) - conflicts("platform=cray", when="tls=secure_transport", msg="Only supported on macOS") 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"): @@ -359,7 +197,8 @@ def command(self): 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 @@ -466,21 +305,21 @@ def nmake_args(self): 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 diff --git a/var/spack/repos/builtin/packages/cusz/package.py b/var/spack/repos/builtin/packages/cusz/package.py index 666aec3f33df7c..c6a939d1868268 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 a9e9eb54ee1f77..df5ad01f7ce088 100644 --- a/var/spack/repos/builtin/packages/cutensor/package.py +++ b/var/spack/repos/builtin/packages/cutensor/package.py @@ -13,7 +13,12 @@ "Linux-x86_64": "4fdebe94f0ba3933a422cff3dd05a0ef7a18552ca274dd12564056993f55471d", "Linux-ppc64le": "ad736acc94e88673b04a3156d7d3a408937cac32d083acdfbd8435582cbe15db", "Linux-aarch64": "5b9ac479b1dadaf40464ff3076e45f2ec92581c07df1258a155b5bcd142f6090", - } + }, + "2.0.1.2": { + "Linux-x86_64": "ededa12ca622baad706ea0a500a358ea51146535466afabd96e558265dc586a2", + "Linux-ppc64le": "7176083a4dad44cb0176771be6efb3775748ad30a39292bf7b4584510f1dd811", + "Linux-aarch64": "4214a0f7b44747c738f2b643be06b2b24826bd1bae6af27f29f3c6dec131bdeb", + }, } 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 4a675143ad4af2..00000000000000 --- 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 f7e67a6a582757..28f38b9517455e 100644 --- a/var/spack/repos/builtin/packages/cutlass/package.py +++ b/var/spack/repos/builtin/packages/cutlass/package.py @@ -44,6 +44,8 @@ class Cutlass(CMakePackage, CudaPackage): 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 00000000000000..e6169769e2207a --- /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 9a65d39edf257e..9ca644ab293f0a 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 945fc4d08f41db..3b04c5d61f5c3f 100644 --- a/var/spack/repos/builtin/packages/cvise/package.py +++ b/var/spack/repos/builtin/packages/cvise/package.py @@ -20,6 +20,9 @@ class Cvise(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/cvs/package.py b/var/spack/repos/builtin/packages/cvs/package.py index 867da627895f17..1e4da0d450548a 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 c34e8af7bb9082..bedd235fd8f14e 100644 --- a/var/spack/repos/builtin/packages/cxx/package.py +++ b/var/spack/repos/builtin/packages/cxx/package.py @@ -14,28 +14,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 be90a56cefc4bb..2f9bb7ba0de7c5 100644 --- a/var/spack/repos/builtin/packages/cxxopts/package.py +++ b/var/spack/repos/builtin/packages/cxxopts/package.py @@ -30,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 162d85432656df..386894276a6a6c 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 a464055d49aa68..afc7bd68e88e96 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 13c79ac8e0b6f7..7206bbe28efb90 100644 --- a/var/spack/repos/builtin/packages/czmq/package.py +++ b/var/spack/repos/builtin/packages/czmq/package.py @@ -19,6 +19,9 @@ class Czmq(AutotoolsPackage): 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") @@ -29,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 05aefdc1e6b394..bee632b9f824c1 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 a4666412681109..35eb19168c5321 100644 --- a/var/spack/repos/builtin/packages/dakota/package.py +++ b/var/spack/repos/builtin/packages/dakota/package.py @@ -42,6 +42,12 @@ 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", @@ -58,6 +64,10 @@ 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") @@ -72,7 +82,7 @@ class Dakota(CMakePackage): 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, @@ -82,6 +92,19 @@ 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 @@ -90,7 +113,7 @@ def cmake_args(self): 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 d7763a0a0c013e..1f4ff5ddbdb5fb 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 a911d5e18c286f..a4fb67b8bf4b77 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 @@ def setup_run_environment(self, env): 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 6953292e63d2c3..3d1221dd50215a 100644 --- a/var/spack/repos/builtin/packages/damaris/package.py +++ b/var/spack/repos/builtin/packages/damaris/package.py @@ -18,6 +18,7 @@ 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") @@ -43,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 1335c01215741e..35398ebf7715d5 100644 --- a/var/spack/repos/builtin/packages/damask-grid/package.py +++ b/var/spack/repos/builtin/packages/damask-grid/package.py @@ -10,13 +10,18 @@ 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" ) @@ -36,8 +41,13 @@ class DamaskGrid(CMakePackage): "3.0.0-alpha4", sha256="0bb8bde43b27d852b1fb6e359a7157354544557ad83d87987b03f5d629ce5493" ) - depends_on("petsc@3.20.3:3.21", when="@3.0.0-beta") - 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") @@ -52,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 f39f30de148326..c7e13df7837903 100644 --- a/var/spack/repos/builtin/packages/damask-mesh/package.py +++ b/var/spack/repos/builtin/packages/damask-mesh/package.py @@ -10,13 +10,18 @@ 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" ) @@ -36,8 +41,13 @@ class DamaskMesh(CMakePackage): "3.0.0-alpha4", sha256="0bb8bde43b27d852b1fb6e359a7157354544557ad83d87987b03f5d629ce5493" ) - depends_on("petsc@3.20.3:3.21", when="@3.0.0-beta") - 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") @@ -49,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 c7a0e632a64dc8..91c39a4e279d45 100644 --- a/var/spack/repos/builtin/packages/damask/package.py +++ b/var/spack/repos/builtin/packages/damask/package.py @@ -24,10 +24,13 @@ 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") @@ -35,6 +38,18 @@ class Damask(BundlePackage): 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") diff --git a/var/spack/repos/builtin/packages/damselfly/package.py b/var/spack/repos/builtin/packages/damselfly/package.py index 74b8a078ad95e0..bccbeda6c83a79 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 87bbfe86622247..f0b7ed25f1aca1 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 1dfa9ca9f43fbd..25f67b55f9742c 100644 --- a/var/spack/repos/builtin/packages/darshan-runtime/package.py +++ b/var/spack/repos/builtin/packages/darshan-runtime/package.py @@ -25,6 +25,7 @@ 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") @@ -50,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") @@ -72,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", @@ -83,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): @@ -97,46 +112,56 @@ def configure_args(self): 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): @@ -145,7 +170,7 @@ def basepath(self): @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 b3c20ae1938ee6..38a9195c7add41 100644 --- a/var/spack/repos/builtin/packages/darshan-util/package.py +++ b/var/spack/repos/builtin/packages/darshan-util/package.py @@ -21,6 +21,7 @@ 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") @@ -46,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", @@ -78,14 +83,13 @@ def configure_args(self): spec = self.spec extra_args = [] - extra_args.append("CC=%s" % self.compiler.cc) extra_args.append("--with-zlib=%s" % spec["zlib-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: @@ -109,7 +113,7 @@ def tests_log_path(self): @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 b5fe8a7cd19830..791bfc7f7582a3 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 c36f9e83e6a104..dec03d20f2f291 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 a62d8eec05eece..ed064f7014bc8b 100644 --- a/var/spack/repos/builtin/packages/dataspaces/package.py +++ b/var/spack/repos/builtin/packages/dataspaces/package.py @@ -52,7 +52,7 @@ def setup_build_environment(self, env): 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 dbef82bcbe8def..8ee50449a3d3f8 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, @@ -63,7 +67,7 @@ def cmake_args(self): "-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 64606671c0a9e7..2da01bf79f31d6 100644 --- a/var/spack/repos/builtin/packages/dateutils/package.py +++ b/var/spack/repos/builtin/packages/dateutils/package.py @@ -20,4 +20,6 @@ class Dateutils(AutotoolsPackage): 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 00000000000000..cb247efb0e9a4d --- /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 75dca8c2512f38..c22c7c45ce7b10 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 @@ def cmake_args(self): 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 8f207fb99b0c0c..f4917e9492581b 100644 --- a/var/spack/repos/builtin/packages/dbcsr/package.py +++ b/var/spack/repos/builtin/packages/dbcsr/package.py @@ -19,6 +19,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 +29,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") @@ -51,10 +56,16 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage): 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:") @@ -77,7 +88,7 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage): # 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: @@ -86,8 +97,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: @@ -136,16 +147,24 @@ def cmake_args(self): "-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 08af93657bb317..ab9bdaa0cb8aed 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 cbee80b7ed8482..d9086972b89712 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 1d7ec8fc8e07a4..4b54a5fce89f1d 100644 --- a/var/spack/repos/builtin/packages/dbus/package.py +++ b/var/spack/repos/builtin/packages/dbus/package.py @@ -6,7 +6,7 @@ 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 +17,24 @@ 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.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 +47,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 +57,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 94e9cb8b4de691..6d361a1e5de128 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 87c25a443dc886..735f74c01d38af 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 b92f1b0e731d6a..530a58678ead90 100644 --- a/var/spack/repos/builtin/packages/dcm2niix/package.py +++ b/var/spack/repos/builtin/packages/dcm2niix/package.py @@ -24,3 +24,6 @@ class Dcm2niix(CMakePackage): 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 f6c14c642ed6e7..df554558da9d35 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 00000000000000..53df4e75eb4c33 --- /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 00000000000000..df77705d628dd8 --- /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 25647bcc21d83b..aadaa4651d54fe 100644 --- a/var/spack/repos/builtin/packages/dd4hep/package.py +++ b/var/spack/repos/builtin/packages/dd4hep/package.py @@ -26,6 +26,8 @@ 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") @@ -44,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") @@ -161,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 @: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") @@ -184,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.") @@ -200,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 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 6592329774349d..00000000000000 --- 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 932458001c211c..00000000000000 --- 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& 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 11dd8fb2c947a4..2988892c2a3c3c 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 fd5ebcf4e0d5c1..7e3b90521b5518 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 71fbb69df71f91..94563ec32dc78e 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -51,6 +51,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", @@ -354,16 +358,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", @@ -500,7 +494,7 @@ def cmake_args(self): # 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 @@ -515,7 +509,7 @@ def cmake_args(self): # 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), @@ -525,9 +519,9 @@ def cmake_args(self): ) # 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( @@ -537,7 +531,7 @@ def cmake_args(self): ] ) # 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)]) # Python bindings @@ -553,7 +547,7 @@ def cmake_args(self): 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:]) @@ -601,12 +595,12 @@ def cmake_args(self): # 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), @@ -616,7 +610,7 @@ def cmake_args(self): # 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( [ @@ -635,7 +629,7 @@ def cmake_args(self): # 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( [ @@ -650,7 +644,7 @@ def cmake_args(self): # Open Cascade options.append(self.define_from_variant("DEAL_II_WITH_OPENCASCADE", "oce")) - if "+oce" in spec: + if spec.satisfies("+oce"): options.append(self.define("OPENCASCADE_DIR", spec["oce"].prefix)) # As a final step, collect CXX flags that may have been @@ -666,7 +660,7 @@ def cmake_args(self): 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)) @@ -678,5 +672,5 @@ def setup_run_environment(self, env): 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 1c258d9fcef998..5bfa199736290b 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 63eace559fd4ad..395a9929673845 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 47314ef952136b..c015f1b316a480 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 00000000000000..7634ba306c0680 --- /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 94d808fd36faca..5f9baa0fb2e900 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 24296810e0d28b..11112be094afcb 100644 --- a/var/spack/repos/builtin/packages/delly2/package.py +++ b/var/spack/repos/builtin/packages/delly2/package.py @@ -25,6 +25,8 @@ class Delly2(MakefilePackage): 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")) @@ -41,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 ccc1258c550cfe..a35a6784053839 100644 --- a/var/spack/repos/builtin/packages/delphes/package.py +++ b/var/spack/repos/builtin/packages/delphes/package.py @@ -43,6 +43,9 @@ class Delphes(CMakePackage): version("3.0.6", sha256="9e225731d57d2a76d35886841f8eff121bb3a45560b16077bd8c351151581d88") version("3.0.5", sha256="ab64ec6d2476fbfa40562e7edb510a8ab4c4fe5be77a4353ebf315c2af181a80") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + variant("pythia8", default=True, description="build with pythia8") depends_on("cmake", type="build") diff --git a/var/spack/repos/builtin/packages/demuxlet/package.py b/var/spack/repos/builtin/packages/demuxlet/package.py index d0724e204ef6ee..6c98a2ca010f65 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 b679b51cb06fc9..e378af69a43d85 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 00000000000000..1d08d4134fa57c --- /dev/null +++ b/var/spack/repos/builtin/packages/detray/package.py @@ -0,0 +1,110 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# 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.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 00000000000000..c2ec7d65acbd31 --- /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 1efaf68aa4ad3f..f8041291c2c635 100644 --- a/var/spack/repos/builtin/packages/dftbplus/package.py +++ b/var/spack/repos/builtin/packages/dftbplus/package.py @@ -27,6 +27,7 @@ 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") @@ -41,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, @@ -177,12 +182,12 @@ def edit(self, spec, prefix): 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) ) @@ -195,7 +200,7 @@ def edit(self, spec, prefix): 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"] @@ -216,20 +221,20 @@ def edit(self, spec, prefix): "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) @@ -267,7 +272,7 @@ def cmake_args(self): # (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( [ @@ -293,7 +298,7 @@ def cmake_args(self): 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 ff42d16ab86310..b28c0509802495 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 8c2d5c62889f02..a55cc34d4eff66 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 a4423d68197dbc..7e6973257e48ab 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 e673ef2d4de572..60d42644982ccc 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 9fe94c845255fe..258d5773f3658e 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 7617794128d574..a7c86efb8e36e7 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 c0ea26edd5fba9..c87e675eaebd5d 100644 --- a/var/spack/repos/builtin/packages/diamond/package.py +++ b/var/spack/repos/builtin/packages/diamond/package.py @@ -16,6 +16,8 @@ class Diamond(CMakePackage): license("GPL-3.0-only") + 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 +36,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 b49547f0b7c427..d5c2f315a43d25 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 73f405bf96e037..5d61f9551f4bbe 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 128663a98991a6..5246249d7ba731 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 b24852f7af2b30..18468f662f3099 100644 --- a/var/spack/repos/builtin/packages/diffutils/package.py +++ b/var/spack/repos/builtin/packages/diffutils/package.py @@ -27,6 +27,8 @@ class Diffutils(AutotoolsPackage, GNUMirrorPackage): 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 3697955ff66d58..a9c7ae6cfe7374 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 ea48ff48fe91a6..3ab48b7c391f42 100644 --- a/var/spack/repos/builtin/packages/dihydrogen/package.py +++ b/var/spack/repos/builtin/packages/dihydrogen/package.py @@ -12,7 +12,7 @@ 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 @@ def initconfig_compiler_entries(self): 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 @@ def initconfig_package_entries(self): # 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 8c5751fbc53377..2c41548e82ee50 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 f8714e2f01ee40..c7c322279e7a34 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 1d7630754a7c58..fb7849a032bf41 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 b5ed1495b2ce3d..e091d1242f22d3 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/" @@ -26,18 +26,5 @@ class Direnv(Package): version("2.20.0", sha256="cc72525b0a5b3c2ab9a52a3696e95562913cd431f923bcc967591e75b7541bff") version("2.11.3", sha256="2d34103a7f9645059270763a0cfe82085f6d9fe61b2a85aca558689df0e7b006") - depends_on("go", type="build") depends_on("go@1.16:", type="build", when="@2.28:") depends_on("go@1.20:", type="build", when="@2.33:") - - 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) diff --git a/var/spack/repos/builtin/packages/discotec/package.py b/var/spack/repos/builtin/packages/discotec/package.py index aa876aa1cd34a0..77007f7dd96f13 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 @@ def cmake_args(self): 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 95c5bcdb1c530b..474546aae9c448 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 a84709eba6ba63..e5e09a455b0c24 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 3ca4692da967f6..90eb8b86821e01 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 02daf6b841b262..fe4dc758f01ec0 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 4bedadec9fae49..95d817301bd0e1 100644 --- a/var/spack/repos/builtin/packages/distcc/package.py +++ b/var/spack/repos/builtin/packages/distcc/package.py @@ -19,6 +19,8 @@ class Distcc(AutotoolsPackage): 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 bca8f759cf4fc6..3c8b272c73cfa0 100644 --- a/var/spack/repos/builtin/packages/diy/package.py +++ b/var/spack/repos/builtin/packages/diy/package.py @@ -10,6 +10,8 @@ class Diy(CMakePackage): """Data-parallel out-of-core library""" homepage = "https://github.com/diatomic/diy" + maintainers("vicentebolea") + url = "https://github.com/diatomic/diy/archive/3.6.0.tar.gz" git = "https://github.com/diatomic/diy.git" @@ -19,12 +21,46 @@ class Diy(CMakePackage): 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="047bed205c905064923d7ecf1d03e38c07f3ae0baa0f4afe1b234f68315472d3", + 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 00000000000000..0d50d05e002b28 --- /dev/null +++ b/var/spack/repos/builtin/packages/dla-future-fortran/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) + +# 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("fortran", type="build") # generated + + 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/package.py b/var/spack/repos/builtin/packages/dla-future/package.py index ef931e9927dece..c831dd1f671452 100644 --- a/var/spack/repos/builtin/packages/dla-future/package.py +++ b/var/spack/repos/builtin/packages/dla-future/package.py @@ -16,6 +16,9 @@ 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") @@ -24,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( @@ -44,6 +50,18 @@ 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") @@ -70,6 +88,7 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): depends_on("pika@0.17:", when="@0.2.1") 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") @@ -125,8 +144,8 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): 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 @@ -139,7 +158,7 @@ def cmake_args(self): args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared")) # BLAS/LAPACK - if 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 = { @@ -180,7 +199,7 @@ def cmake_args(self): self.define("MKL_LAPACK_TARGET", f"mkl::mkl_intel_32bit_{mkl_threads}_dyn"), ] - if "+scalapack" in spec: + if spec.satisfies("+scalapack"): try: mpi_provider = spec["mpi"].name if mpi_provider in ["mpich", "cray-mpich", "mvapich", "mvapich2"]: @@ -203,27 +222,39 @@ def cmake_args(self): ) ) 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: + 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: + if spec.satisfies("+cuda"): archs = spec.variants["cuda_arch"].value if "none" not in archs: arch_str = ";".join(archs) diff --git a/var/spack/repos/builtin/packages/dlb/package.py b/var/spack/repos/builtin/packages/dlb/package.py index 2f4968019e2625..988d4061f04e2c 100644 --- a/var/spack/repos/builtin/packages/dlb/package.py +++ b/var/spack/repos/builtin/packages/dlb/package.py @@ -22,6 +22,7 @@ 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") @@ -31,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") @@ -45,5 +53,8 @@ def configure_args(self): 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 355d793656e9b8..26a2399112c93c 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 eadfcf781ca8d2..efe5c6b4f5fed4 100644 --- a/var/spack/repos/builtin/packages/dlpack/package.py +++ b/var/spack/repos/builtin/packages/dlpack/package.py @@ -24,5 +24,8 @@ class Dlpack(Package): 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 d6672d6baae778..9c7d8e211d4e40 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") diff --git a/var/spack/repos/builtin/packages/dmidecode/package.py b/var/spack/repos/builtin/packages/dmidecode/package.py index 37f964655e66b9..1eb0db8b6bb453 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 60cc32da43ecd3..18f443e9e7e339 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 ee31dcadc35ed3..4e890bbf85ce82 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 565b066bd6a9b1..54b01df358c6e0 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 f5e8ca90d02e9d..8b15753a5cd769 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 e52445450ca7b0..0c0108320e2771 100644 --- a/var/spack/repos/builtin/packages/dnsmasq/package.py +++ b/var/spack/repos/builtin/packages/dnsmasq/package.py @@ -29,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 088eb6aadf2db2..2ea5086d3f002a 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 c88435d527ff74..e393f959ee164f 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 cc0c8027481e92..d299dbabe64f6d 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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--add", "rewriteSystem", "https://www.oasis-open.org/docbook/xml/current", - "file://{0}".format(prefix), + f"file://{prefix}", docbook, ) xmlcatalog( @@ -294,7 +294,7 @@ def config_docbook(self): "--add", "rewriteURI", "https://www.oasis-open.org/docbook/xml/current", - "file://{0}".format(prefix), + f"file://{prefix}", docbook, ) @@ -305,7 +305,7 @@ def config_docbook(self): "--add", "delegatePublic", "-//OASIS//ENTITIES DocBook XML", - "file://{0}".format(docbook), + f"file://{docbook}", catalog, ) xmlcatalog( @@ -313,23 +313,18 @@ def config_docbook(self): "--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 @@ def config_docbook(self): "--add", "delegateURI", "https://www.oasis-open.org/docbook/", - "file://{0}".format(docbook), + f"file://{docbook}", catalog, ) @@ -348,40 +343,40 @@ def config_docbook(self): "--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 c97b3efe5eef1b..86f7d5153ad6c0 100644 --- a/var/spack/repos/builtin/packages/dock/package.py +++ b/var/spack/repos/builtin/packages/dock/package.py @@ -29,7 +29,7 @@ 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): @@ -48,7 +48,7 @@ def install(self, spec, prefix): 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 00000000000000..c382ccf223621c --- /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/package.py b/var/spack/repos/builtin/packages/dorado/package.py index e3b4c400d81c29..a56d355c625dc8 100644 --- a/var/spack/repos/builtin/packages/dorado/package.py +++ b/var/spack/repos/builtin/packages/dorado/package.py @@ -19,6 +19,9 @@ class Dorado(CMakePackage, CudaPackage): 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") diff --git a/var/spack/repos/builtin/packages/dorian3d-dlib/package.py b/var/spack/repos/builtin/packages/dorian3d-dlib/package.py index 74951a4a921e7e..d68366dd08f85d 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 29465bff033dc0..cc90aae1b7ed9e 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 6d89720b87d2f6..f54245d7a3220a 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 43ddf559246700..d0d30b9ba308f3 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 6f74fe3d5dc72c..ea64a933770642 100644 --- a/var/spack/repos/builtin/packages/dotnet-core-sdk/package.py +++ b/var/spack/repos/builtin/packages/dotnet-core-sdk/package.py @@ -87,7 +87,7 @@ class DotnetCoreSdk(Package): variant("telemetry", default=False, description="allow collection of telemetry data") def setup_run_environment(self, env): - if "~telemetry" in self.spec: + if self.spec.satisfies("~telemetry"): env.set("DOTNET_CLI_TELEMETRY_OPTOUT", "1") def install(self, spec, prefix): 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 bfee55f0335922..168e51eb91aeeb 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,10 +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") diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index a0fe2e2fcdd386..2ca28689d7afdc 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 @@ def determine_variants(cls, exes, version_str): 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 @@ def determine_variants(cls, exes, version_str): 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,19 +124,34 @@ def determine_variants(cls, exes, version_str): 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 != "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): + return [ + self.define("use_sys_spdlog", self.spec.satisfies("@1.9.8:")), + self.define("use_sys_sqlite3", self.spec.satisfies("@1.10:")), + ] diff --git a/var/spack/repos/builtin/packages/dpdk/package.py b/var/spack/repos/builtin/packages/dpdk/package.py index 590fe54ef49aaf..2d86cf2178143b 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 fd045639ab10e9..b6ed230af938fc 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") @@ -82,6 +84,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 +112,7 @@ def cmake_args(self): "-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 0129222109664b..7152ee96b291fe 100644 --- a/var/spack/repos/builtin/packages/dracut/package.py +++ b/var/spack/repos/builtin/packages/dracut/package.py @@ -19,4 +19,6 @@ class Dracut(AutotoolsPackage): 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 3a896ffcd68092..fe31b2bb460cf6 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 85668f3e9e76e3..a96546d041a424 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 4986e640263f6c..9c0a38721de56f 100644 --- a/var/spack/repos/builtin/packages/dray/package.py +++ b/var/spack/repos/builtin/packages/dray/package.py @@ -8,6 +8,7 @@ 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") @@ -115,19 +120,13 @@ def install(self, spec, prefix): """ 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 @@ -169,7 +168,7 @@ def create_host_config(self, spec, prefix): # 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") @@ -206,7 +205,7 @@ def create_host_config(self, spec, prefix): 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 @@ -219,7 +218,7 @@ def create_host_config(self, spec, prefix): 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")) @@ -257,7 +256,7 @@ def create_host_config(self, spec, prefix): 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 @@ -266,13 +265,13 @@ def create_host_config(self, spec, prefix): 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")) @@ -280,7 +279,7 @@ def create_host_config(self, spec, prefix): ####################### # 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")) @@ -292,7 +291,7 @@ def create_host_config(self, spec, prefix): ####################### # 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")) @@ -300,7 +299,7 @@ def create_host_config(self, spec, prefix): ####################### # 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")) @@ -308,7 +307,7 @@ def create_host_config(self, spec, prefix): ####################### # 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 0759e0c0e43e77..77a3d4205c2531 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 8ea7d53d3bb85d..65e7bca88c15e2 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 e003c5602d95b5..1d43a943eec4dd 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 381dba628e7d04..a913c197c47a8b 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 5486455f9daedb..1c44116a31efed 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 44f76ab619861d..1fb90c9ab04a1f 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") diff --git a/var/spack/repos/builtin/packages/dsrc/package.py b/var/spack/repos/builtin/packages/dsrc/package.py index 4baa53b74bd552..d7a98f398c43d0 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 a5a20a4be59688..bc63e22b6e2f56 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 @@ def edit(self): @run_after("install") def cache_test_sources(self): """Save off the pdb sources for stand-alone testing.""" - self.cache_extra_test_sources("pdb") + 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 a775a98803f8c7..8790d702fb92c2 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 @@ def edit(self, spec, prefix): 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 992b2bf646a4d0..c331ea2ed36c33 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 97e057717b4f88..a11ef8b7a2009a 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 3f2b899122f91a..6bac330a3af831 100644 --- a/var/spack/repos/builtin/packages/duckdb/package.py +++ b/var/spack/repos/builtin/packages/duckdb/package.py @@ -18,8 +18,17 @@ class Duckdb(MakefilePackage): maintainers("glentner", "teaguesterling") version("master", branch="master") + version("1.1.2", sha256="a3319a64c390ed0454c869b2e4fc0af2413cd49f55cd0f1400aaed9069cdbc4c") + version("1.1.1", sha256="a764cef80287ccfd8555884d8facbe962154e7c747043c0842cd07873b4d6752") + version("1.1.0", sha256="d9be2c6d3a5ebe2b3d33044fb2cb535bb0bd972a27ae38c4de5e1b4caa4bf68d") + version("1.0.0", sha256="04e472e646f5cadd0a3f877a143610674b0d2bcf9f4102203ac3c3d02f1c5f26") + version("0.10.3", sha256="7855587b3491dd488993287caee28720bee43ae28e92e8f41ea4631e9afcbf88") version("0.10.2", sha256="662a0ba5c35d678ab6870db8f65ffa1c72e6096ad525a35b41b275139684cea6") - version("0.10.0", sha256="5a925b8607d00a97c1a3ffe6df05c0a62a4df063abd022ada82ac1e917792013") + version( + "0.10.0", + sha256="5a925b8607d00a97c1a3ffe6df05c0a62a4df063abd022ada82ac1e917792013", + deprecated=True, + ) version( "0.9.2", sha256="afff7bd925a98dc2af4039b8ab2159b0705cbf5e0ee05d97f7bb8dce5f880dc2", @@ -35,34 +44,27 @@ class Duckdb(MakefilePackage): sha256="3dbf3326a831bf0797591572440e81a3d6d668f8e33a25ce04efae19afc3a23d", deprecated=True, ) - version( - "0.8.1", - sha256="a0674f7e320dc7ebcf51990d7fc1c0e7f7b2c335c08f5953702b5285e6c30694", - deprecated=True, - ) - version( - "0.8.0", - sha256="df3b8e0b72bce38914f0fb1cd02235d8b616df9209beb14beb06bfbcaaf2e97f", - deprecated=True, - ) - version( - "0.7.1", - sha256="67f840f861e5ffbe137d65a8543642d016f900b89dd035492d562ad11acf0e1e", - deprecated=True, - ) + + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated depends_on("python@3.7:") - depends_on("cmake", type="build") - depends_on("gmake", type="build") - depends_on("ninja", when="+ninjabuild", type="build") + 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("autocomplete", default=True, description="Include autocomplete for CLI in build") 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, @@ -70,22 +72,44 @@ class Duckdb(MakefilePackage): 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("jdbc", default=False, description="Build JDBC driver (may not work)") - variant("odbc", default=False, description="Build with ODBC driver (may not work)") - variant("python", default=False, description="Build with Python driver (may not work)") + 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): - if "+ninjabuild" in self.spec: + 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", @@ -94,12 +118,12 @@ def setup_build_environment(self, env): "httpfs", "icu", "inet", - "jdbc", "json", - "odbc", - "openssl", + "openssl", # Deprecate after 0.9.2 retired "parquet", "python", + "tpce", + "tpch", ] for flag in variant_flags: make_flag = "BUILD_" + flag.upper() @@ -109,6 +133,15 @@ def setup_build_environment(self, env): 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) @@ -149,6 +182,15 @@ def patch(self): "CMakeLists.txt", ) + if self.spec.satisfies("+extension_repo"): + mkdirp(self.prefix.lib.duckdb.extensions) + def install(self, spec, prefix): mkdir(prefix.bin) - install("build/release/duckdb", 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 340abe8a47cc7c..71834aecd9df25 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 85afeedbb6e73c..b85f84e78a6bae 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/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index 9593f3262f49ac..f71ab53fb762ba 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -51,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, @@ -136,12 +139,12 @@ def cmake_args(self): 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") @@ -191,14 +194,14 @@ def cmake_args(self): # 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 4dbf4f438b1757..cf80d6ae6a70d6 100644 --- a/var/spack/repos/builtin/packages/dysco/package.py +++ b/var/spack/repos/builtin/packages/dysco/package.py @@ -17,6 +17,8 @@ class Dysco(CMakePackage): 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 5560a5348df4af..baa78b5a95f312 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 8000d18ae71381..a4564dcc71d512 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 66c8600096aa42..078a57a7d5f241 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-cl/package.py b/var/spack/repos/builtin/packages/e4s-cl/package.py index 4208a2e7e2f2e0..bbb4003718dd3e 100644 --- a/var/spack/repos/builtin/packages/e4s-cl/package.py +++ b/var/spack/repos/builtin/packages/e4s-cl/package.py @@ -22,6 +22,7 @@ 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 b57c30ecb1e39a..8a90b61af38613 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 3a68066d11b59c..3abe19fb37102b 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 9c1886c58343a9..a79c520a6e3c65 100644 --- a/var/spack/repos/builtin/packages/earlyoom/package.py +++ b/var/spack/repos/builtin/packages/earlyoom/package.py @@ -18,6 +18,8 @@ class Earlyoom(MakefilePackage): 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 f93940c9ae024b..fbe2163509121f 100644 --- a/var/spack/repos/builtin/packages/easi/package.py +++ b/var/spack/repos/builtin/packages/easi/package.py @@ -21,12 +21,18 @@ class Easi(CMakePackage): license("BSD-3-Clause") 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( @@ -60,22 +66,22 @@ def cmake_args(self): 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 "+python" in spec: + if spec.satisfies("+python"): args += [self.define("easi_INSTALL_PYTHONDIR", python_platlib)] return args def setup_run_environment(self, env): - if "+python" in self.spec: + 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 c1fba765e8d3d7..a46b625b712e18 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 f92a83e3592a7e..a7ed3feb71ea74 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 @@ def build_targets(self): 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 d4882131a7a285..9e4cdf6c92adbe 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 1939befda827d1..643c2b3e235830 100644 --- a/var/spack/repos/builtin/packages/eccodes/package.py +++ b/var/spack/repos/builtin/packages/eccodes/package.py @@ -67,6 +67,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( @@ -330,7 +334,7 @@ def cmake_args(self): 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)) @@ -343,10 +347,10 @@ def cmake_args(self): 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)) diff --git a/var/spack/repos/builtin/packages/ecdsautils/package.py b/var/spack/repos/builtin/packages/ecdsautils/package.py index 2c9602eb7353a1..a5b7427b01743e 100644 --- a/var/spack/repos/builtin/packages/ecdsautils/package.py +++ b/var/spack/repos/builtin/packages/ecdsautils/package.py @@ -9,10 +9,17 @@ 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/package.py b/var/spack/repos/builtin/packages/ecflow/package.py index 01eaf1b165de65..22762230ca1cb9 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" diff --git a/var/spack/repos/builtin/packages/eckit/package.py b/var/spack/repos/builtin/packages/eckit/package.py index f1239f791ab327..25789ba3f0368b 100644 --- a/var/spack/repos/builtin/packages/eckit/package.py +++ b/var/spack/repos/builtin/packages/eckit/package.py @@ -32,6 +32,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 67698167dc6f45..9a4d7b874b6f05 100644 --- a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py +++ b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py @@ -33,6 +33,10 @@ 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") @@ -82,7 +86,7 @@ def cmake_args(self): 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 "~shared" in self.spec: + 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 b393e2636cccd4..9f0ad1f0c7f6dc 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 61b2fcdfec9b4f..22704c2fe766de 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-proxy-apps/package.py b/var/spack/repos/builtin/packages/ecp-proxy-apps/package.py index b2f124e68ee14d..833d5b9e524f77 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 8b94a62e1e3750..02ee092f81dc91 100644 --- a/var/spack/repos/builtin/packages/ectrans/package.py +++ b/var/spack/repos/builtin/packages/ectrans/package.py @@ -26,6 +26,9 @@ class Ectrans(CMakePackage): 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 df2c77d0ab396a..36e5d5171fe139 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 4d6f8024f6b512..5cfe0db26f3118 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 index a6c2fd8131a8f8..6ded3f667b93a2 100644 --- a/var/spack/repos/builtin/packages/editorconfig/package.py +++ b/var/spack/repos/builtin/packages/editorconfig/package.py @@ -19,4 +19,6 @@ class Editorconfig(CMakePackage): 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 16053f9e3bfdee..352cc81919e866 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 414eacdca76308..838c11b101c8f8 100644 --- a/var/spack/repos/builtin/packages/edm4hep/package.py +++ b/var/spack/repos/builtin/packages/edm4hep/package.py @@ -21,88 +21,41 @@ class Edm4hep(CMakePackage): license("Apache-2.0") version("main", branch="main") + version("0.99.1", sha256="84d990f09dbd0ad2198596c0c51238a4b15391f51febfb15dd3d191dc7aae9f4") + version("0.99", sha256="3636e8c14474237029bf1a8be11c53b57ad3ed438fd70a7e9b87c5d08f1f2ea6") version("0.10.5", sha256="003c8e0c8e1d1844592d43d41384f4320586fbfa51d4d728ae0870b9c4f78d81") version( "0.10.4", sha256="76d51947525bc8a27b62f567033255da2e632d42d07a32ff578887948d56bd6f", deprecated=True, ) - version("0.10.3", sha256="0ba5e4e90376f750f9531831909160e3d7b9c2d1f020d7556f0d3977b7eaafcc") - version("0.10.2", sha256="c22c5c2f0fd1d09da9b734c1fa7ee546675fd2b047406db6ab8266e7657486d2") - version("0.10.1", sha256="28a3bd4df899309b14ec0d441f8b6ed0065206a08a0018113bb490e9d008caed") - version("0.10", sha256="a95c917c19793cfad6b0959854a653c5ce698c965598cabd649d544da07712c0") version( - "0.9", - sha256="170ef84822761c4b02da9047f2b4d0dd0f48ed1c027b10171d4207b1542fbd5c", + "0.10.3", + sha256="0ba5e4e90376f750f9531831909160e3d7b9c2d1f020d7556f0d3977b7eaafcc", deprecated=True, ) version( - "0.8", - sha256="102d57167885eba3bea79f6b6647e5303ad8732c5784590abdcdd816b2411c79", + "0.10.2", + sha256="c22c5c2f0fd1d09da9b734c1fa7ee546675fd2b047406db6ab8266e7657486d2", deprecated=True, ) version( - "0.7.2", - sha256="e289280d5de2c0a3b542bf9dfe04b9f6471b0a0fcf33f5c8101ea7252e2a7643", + "0.10.1", + sha256="28a3bd4df899309b14ec0d441f8b6ed0065206a08a0018113bb490e9d008caed", deprecated=True, ) version( - "0.7.1", - sha256="82e215a532f548a73a6f6094eaa8b436c553994e135f6d63a674543dc89a9f1b", - 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.", @@ -113,22 +66,23 @@ class Edm4hep(CMakePackage): 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:") + 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 @@ -138,7 +92,8 @@ def cmake_args(self): 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 53d4bddacb0220..00000000000000 --- 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=$:$:$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 4b41e8cefd845d..777d1ce7142177 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 @@ def edit(self, spec, prefix): 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 1ef249380af2a2..9bfa06da51a9e8 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 6301084fa3506b..e1fda7e9f72936 100644 --- a/var/spack/repos/builtin/packages/eigen/package.py +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -36,6 +36,10 @@ class Eigen(CMakePackage): version("3.2.6", sha256="e097b8dcc5ad30d40af4ad72d7052e3f78639469baf83cffaadc045459cda21f") version("3.2.5", sha256="8068bd528a2ff3885eb55225c27237cf5cda834355599f05c2c85345db8338b4") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + depends_on("fortran", type="build") # generated + # there is a bug that provokes bad parsing of nvhpc version patch( "https://gitlab.com/libeigen/eigen/-/commit/001a57519a7aa909d3bf0cd8c6ec8a9cd19d9c70.diff", diff --git a/var/spack/repos/builtin/packages/eigenexa/package.py b/var/spack/repos/builtin/packages/eigenexa/package.py index 46b76b958c7e0d..8eb21e6f37a071 100644 --- a/var/spack/repos/builtin/packages/eigenexa/package.py +++ b/var/spack/repos/builtin/packages/eigenexa/package.py @@ -23,6 +23,9 @@ class Eigenexa(AutotoolsPackage): 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") depends_on("libtool", type="build") @@ -71,7 +74,7 @@ def setup_build_environment(self, env): @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/elbencho/package.py b/var/spack/repos/builtin/packages/elbencho/package.py index 4088b11d282bfc..bfb632efb61335 100644 --- a/var/spack/repos/builtin/packages/elbencho/package.py +++ b/var/spack/repos/builtin/packages/elbencho/package.py @@ -33,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") @@ -56,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") @@ -65,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 49306457d6a81a..85dba11538a32a 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 @@ def libs(self): 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 @@ def cmake_args(self): # 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 @@ def cmake_args(self): "-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 @@ def cmake_args(self): 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 9205da948129b7..c38246216af7f9 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 2bffffa3356972..d097728c9171d8 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,7 +128,7 @@ def configure_args(self): 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:"): @@ -133,7 +137,7 @@ def configure_args(self): else: args.append("--without-libiconv-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 @@ def configure_args(self): 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 96dda40d5ee5ad..4f357442225e13 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 @@ -133,7 +136,7 @@ def edit(self, spec, prefix): 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 +146,7 @@ def edit(self, spec, prefix): 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 +154,29 @@ def edit(self, spec, prefix): # 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 +192,7 @@ def edit(self, spec, prefix): 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 3d8863054a56ba..123cdf58660066 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 @@ def cmake_args(self): 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 @@ def cmake_args(self): 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 @@ def cmake_args(self): 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 @@ def patch(self): 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/package.py b/var/spack/repos/builtin/packages/elpa/package.py index 65f021b5b6283f..b1f07a460dad71 100644 --- a/var/spack/repos/builtin/packages/elpa/package.py +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -24,6 +24,9 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage): version("master", branch="master") + version( + "2024.03.001", sha256="41c6cbf56d2dac26443faaba8a77307d261bf511682a64b96e24def77c813622" + ) version( "2023.11.001-patched", sha256="62ee109afc06539507f459c08b958dc4db65b757dbd77f927678c77f7687415e", @@ -46,13 +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") - variant("gpu_streams", default=True, description="Activates GPU streams support") + + 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", type="build", when="@master") + depends_on("autoconf@2.71:", type="build", when="@master") depends_on("automake", type="build", when="@master") depends_on("blas") @@ -62,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( @@ -76,10 +98,9 @@ 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="+openmp", + when="@:2023.11.001-patched +openmp", msg="GPU streams currently not supported in combination with OpenMP", ) @@ -137,7 +158,7 @@ def configure_args(self): if spec.target.family != "x86_64": options.append("--disable-sse-assembly") - if "%aocc" in spec or "%fj" in spec: + if spec.satisfies("%aocc") or spec.satisfies("%fj"): options.append("--disable-shared") options.append("--enable-static") @@ -148,17 +169,17 @@ def configure_args(self): 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 "%fj" in spec: + if spec.satisfies("%fj"): options.append("--disable-Fortran2008-features") options.append("--enable-FUGAKU") - if "+openmp" in spec: + if spec.satisfies("+openmp"): options.extend(["FCFLAGS=-Kparallel"]) cuda_flag = "nvidia-gpu" - if "+cuda" in spec: + if spec.satisfies("+cuda"): prefix = spec["cuda"].prefix # Can't yet be changed to the new option --enable-nvidia-gpu-kernels # https://github.com/marekandreas/elpa/issues/55 @@ -178,7 +199,7 @@ def configure_args(self): else: 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") @@ -187,23 +208,18 @@ def configure_args(self): if spec.satisfies("+gpu_streams"): options.append("--enable-gpu-streams=amd") - elif "@2021.05.001:" in self.spec: + elif self.spec.satisfies("@2021.05.001:"): options.append("--disable-amd-gpu" + kernels) options += self.enable_or_disable("openmp") # Additional linker search paths and link libs - ldflags = [spec["blas"].libs.search_flags, spec["lapack"].libs.search_flags] + ldflags = [spec["blas"].libs.search_flags, spec["lapack"].libs.search_flags, "-lstdc++"] libs = [spec["lapack"].libs.link_flags, spec["blas"].libs.link_flags] - # If using blas with openmp support, link with openmp - # Needed for Spack-provided OneAPI MKL and for many externals - if self.spec["blas"].satisfies("threads=openmp"): - ldflags.append(self.compiler.openmp_flag) - 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), @@ -211,7 +227,7 @@ def configure_args(self): "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 1e2c68116d9f72..14ec21867828bf 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 2edb0fddf65076..fe26f1cec3f6e5 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 5c6da3eef68fa9..e06936a754e693 100644 --- a/var/spack/repos/builtin/packages/elsi/package.py +++ b/var/spack/repos/builtin/packages/elsi/package.py @@ -4,21 +4,41 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os.path +from spack.error import NoHeadersError from spack.package import * -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") - 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", @@ -28,29 +48,104 @@ 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_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" + "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): + 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), @@ -59,19 +154,33 @@ def cmake_args(self): 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("+use_external_elpa"): - elpa_module = find(self.spec["elpa"].prefix, "elpa.mod") - args.append(self.define("INC_PATHS", os.path.dirname(elpa_module[0]))) + 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 self.spec.satisfies("%fj"): diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py index 06044750731b07..3e428b74bcfa05 100644 --- a/var/spack/repos/builtin/packages/emacs/package.py +++ b/var/spack/repos/builtin/packages/emacs/package.py @@ -13,14 +13,17 @@ 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") @@ -36,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", @@ -43,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") @@ -86,15 +96,18 @@ def configure_args(self): 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") @@ -103,6 +116,15 @@ def configure_args(self): return args + @run_after("install") + def move_macos_app(self): + """Move the Emacs.app build on MacOS to /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 3f3bf23dcfd18f..a010792a6353f7 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 387e4f34646c67..cfaa52a634c05d 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 eea9a804ac06f9..131d4749a90fba 100644 --- a/var/spack/repos/builtin/packages/embree/package.py +++ b/var/spack/repos/builtin/packages/embree/package.py @@ -15,6 +15,8 @@ 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") @@ -36,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") diff --git a/var/spack/repos/builtin/packages/enca/package.py b/var/spack/repos/builtin/packages/enca/package.py index 8d3d67ca8e69d9..f784a79af25759 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 b32545e730bd1e..3221b2332a570e 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 c0c1774edc0f2b..efae17adbf76d9 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 606bf98b7c0c5c..921c97535a5d9e 100644 --- a/var/spack/repos/builtin/packages/ensmallen/package.py +++ b/var/spack/repos/builtin/packages/ensmallen/package.py @@ -24,6 +24,8 @@ class Ensmallen(CMakePackage): 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 fd87aaca5c46b3..281a97041678d5 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 073626ca959fb3..1ebfab0249a9c5 100644 --- a/var/spack/repos/builtin/packages/entt/package.py +++ b/var/spack/repos/builtin/packages/entt/package.py @@ -16,10 +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") @@ -30,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 351191187874d1..173c340162fd3c 100644 --- a/var/spack/repos/builtin/packages/environment-modules/package.py +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -58,6 +58,8 @@ 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("less", type=("build", "run"), when="@4.1:") @@ -90,10 +92,10 @@ def install(self, spec, prefix): 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("@4.4.0:4.8"): config_args.extend( [ "--with-icase=search", @@ -102,13 +104,13 @@ def install(self, spec, prefix): ] ) - 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 @@ -118,17 +120,17 @@ def install(self, spec, prefix): ] ) - 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", diff --git a/var/spack/repos/builtin/packages/enzo/package.py b/var/spack/repos/builtin/packages/enzo/package.py index b8498d08626432..fa4c5fd8bcaf9f 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 ab1db23e04ba0b..c793e1edddb7b2 100644 --- a/var/spack/repos/builtin/packages/enzyme/package.py +++ b/var/spack/repos/builtin/packages/enzyme/package.py @@ -24,6 +24,7 @@ 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") @@ -33,6 +34,10 @@ 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") diff --git a/var/spack/repos/builtin/packages/eospac/package.py b/var/spack/repos/builtin/packages/eospac/package.py index 2e7ac65facafec..c245a0d50a92f8 100644 --- a/var/spack/repos/builtin/packages/eospac/package.py +++ b/var/spack/repos/builtin/packages/eospac/package.py @@ -22,9 +22,18 @@ class Eospac(Package): # previous stable release will appear first as a new beta. # - alpha and beta versions are marked with 'deprecated=True' to help # spack's version comparison. + 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", - preferred=True, sha256="54df29b1dc3b35c654ef2ebfbfa42d960a230cfb2d3c04a75ba93d3a789a312a", url="https://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.5.9_4c633156bacc7b721bdd2735e40e09984a4d60a3.tgz", ) @@ -128,6 +137,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") @@ -155,11 +168,11 @@ def install(self, spec, prefix): # 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 2509eab83eb850..b08a31b7328f90 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 fbaf1dc9613343..8b6ba207834d1f 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 14e02f0a09f5d8..f745369ed35f30 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 3f7e1b8f72f6c6..8cdb0d4f7f0d9f 100644 --- a/var/spack/repos/builtin/packages/eprosima-fastcdr/package.py +++ b/var/spack/repos/builtin/packages/eprosima-fastcdr/package.py @@ -19,3 +19,5 @@ class EprosimaFastcdr(CMakePackage): 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 3af859c1fffa40..bf139fb5e7b3a6 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 16144c585d1bf9..65cd58256b9bc4 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 81670ed8db7347..077a13db46dd11 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 6fed09c5e6bdc1..8dc7622d981370 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,8 @@ class Er(CMakePackage): version("0.0.4", sha256="c456d34719bb57774adf6d7bc2fa9917ecb4a9de442091023c931a2cb83dfd37") version("0.0.3", sha256="243b2b46ea274e17417ef5873c3ed7ba16dacdfdaf7053d1de5434e300de796b") + depends_on("c", type="build") # generated + depends_on("mpi") depends_on("kvtree+mpi") depends_on("rankstr", when="@0.0.4:") @@ -65,8 +68,5 @@ def cmake_args(self): 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 b1132258d41dc0..d5105430566b07 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 e21d2d736d6917..7a6b4b1db579fd 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 dee89bebb8af5e..1f077d6fd66180 100644 --- a/var/spack/repos/builtin/packages/erne/package.py +++ b/var/spack/repos/builtin/packages/erne/package.py @@ -9,13 +9,16 @@ 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 79c23768054417..ca7a8104e0178c 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 ee41621b5fc83d..d9815c23ae9238 100644 --- a/var/spack/repos/builtin/packages/esmf/package.py +++ b/var/spack/repos/builtin/packages/esmf/package.py @@ -34,6 +34,7 @@ class Esmf(MakefilePackage, PythonExtension): version("8.7.0b04", commit="609c81179572747407779492c43776e34495d267") version("8.6.1", sha256="dc270dcba1c0b317f5c9c6a32ab334cb79468dda283d1e395d98ed2a22866364") version("8.6.1b04", commit="64d3aacc36f2d4d39255eb521c34123903cc0551") + version("8.6.1", sha256="dc270dcba1c0b317f5c9c6a32ab334cb79468dda283d1e395d98ed2a22866364") version("8.6.0", sha256="ed057eaddb158a3cce2afc0712b49353b7038b45b29aee86180f381457c0ebe7") version("8.5.0", sha256="acd0b2641587007cc3ca318427f47b9cae5bfd2da8d2a16ea778f637107c29c4") version("8.4.2", sha256="969304efa518c7859567fa6e65efd960df2b4f6d72dbf2c3f29e39e4ab5ae594") @@ -69,6 +70,10 @@ class Esmf(MakefilePackage, PythonExtension): 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") @@ -293,7 +298,7 @@ def setup_build_environment(self, env): msg += '"{0}", is not supported by ESMF.' 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) @@ -303,7 +308,7 @@ def setup_build_environment(self, env): 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: @@ -337,28 +342,30 @@ def setup_build_environment(self, env): # 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: @@ -374,7 +381,7 @@ def setup_build_environment(self, env): # 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. @@ -393,7 +400,7 @@ def setup_build_environment(self, env): # 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") @@ -408,7 +415,7 @@ def setup_build_environment(self, env): # Parallel-NetCDF # ################### - if "+pnetcdf" in spec: + if spec.satisfies("+pnetcdf"): # ESMF provides the ability to write Mesh weights # using Parallel-NetCDF. @@ -419,7 +426,7 @@ def setup_build_environment(self, env): ############## # 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) @@ -433,7 +440,7 @@ def setup_build_environment(self, env): # 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. @@ -449,11 +456,11 @@ def setup_build_environment(self, env): ######################### # 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 "+shared" in spec: + if spec.satisfies("+shared"): if sys.platform == "darwin": env.set("ESMF_TRACE_LIB_BUILD", "OFF") @@ -479,7 +486,7 @@ def setup_dependent_build_environment(self, env, dependent_spec): def install(self, pkg, spec, prefix): make("install") - if "+python" in spec: + 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 bda77a149fa4db..bcfbe4b220961f 100644 --- a/var/spack/repos/builtin/packages/essl/package.py +++ b/var/spack/repos/builtin/packages/essl/package.py @@ -45,18 +45,18 @@ def blas_libs(self): 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 0475d965d8fa85..7021384dd9d75e 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 ae28904c544981..35a564e6ff10aa 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 da8800471b0704..04f9bcddda9730 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 df30e5e257a594..91df214f7d0815 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 aa0da87e422ca9..76dcd756322cb6 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 fee10a7f91eb21..b9c4340a56a1ff 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 4ea4c237b67c31..28529bd9108dd1 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 3e5c1d9c88ee4b..9ab3a30868735f 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 51b12f1111869e..cac9dd6a184c8c 100644 --- a/var/spack/repos/builtin/packages/evtgen/package.py +++ b/var/spack/repos/builtin/packages/evtgen/package.py @@ -27,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") @@ -95,18 +97,18 @@ def configure(self, spec, prefix): 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 ce1937dc1f8ae7..36a5b3ccd959a8 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 b1fd6416b9fdf3..3ca8bcb7a013d1 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.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 808e286574c4ac..950909d3b7b90a 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") @@ -195,7 +199,7 @@ def cmake_args(self): 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 @@ def cmake_args(self): 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 @@ def cmake_args(self): ] ) - 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 @@ def cmake_args(self): # 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 d23fff888bf28f..54b0ab843cecae 100644 --- a/var/spack/repos/builtin/packages/examinimd/package.py +++ b/var/spack/repos/builtin/packages/examinimd/package.py @@ -43,14 +43,14 @@ def build_targets(self): # 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 1747eb95ea7439..958b8095872ba8 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 5c3a4280229ec0..0da28676d39fac 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 e19cb8d201427e..911d7f04a01f9a 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 8ea3720414b02c..f7c611a918fe34 100644 --- a/var/spack/repos/builtin/packages/exawind/package.py +++ b/var/spack/repos/builtin/packages/exawind/package.py @@ -16,59 +16,88 @@ class Exawind(CMakePackage, CudaPackage, ROCmPackage): tags = ["ecp", "ecp-apps"] - # Testing is currently always enabled, but should be optional in the future - # to avoid cloning the mesh submodule + license("Apache-2.0") + 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) - license("Apache-2.0") - variant("openfast", default=False, description="Enable OpenFAST integration") - variant("hypre", default=True, description="Enable hypre solver") - variant("stk_simd", default=False, description="Enable SIMD in STK") - variant("umpire", default=False, description="Enable Umpire") - variant("tiny_profile", default=False, description="Turn on AMR-wind with tiny profile") + 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") - conflicts("amr-wind+hypre", when="+sycl") - for arch in CudaPackage.cuda_arch_values: - depends_on("amr-wind+cuda cuda_arch=%s" % arch, when="+cuda cuda_arch=%s" % arch) - depends_on("nalu-wind+cuda cuda_arch=%s" % arch, when="+cuda cuda_arch=%s" % arch) + 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="+rocm amdgpu_target=%s" % arch) - depends_on("nalu-wind+rocm amdgpu_target=%s" % arch, when="+rocm amdgpu_target=%s" % arch) - - depends_on("nalu-wind+tioga") - depends_on("amr-wind+netcdf+mpi") - depends_on("tioga~nodegid") + 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("nalu-wind+openfast", when="+openfast") - depends_on("amr-wind+hypre", when="+hypre~sycl") - depends_on("amr-wind~hypre", when="~hypre") - depends_on("nalu-wind+hypre", when="+hypre") - depends_on("nalu-wind~hypre", when="~hypre") - depends_on("amr-wind+sycl", when="+sycl") - depends_on("nalu-wind+umpire", when="+umpire") - depends_on("amr-wind+umpire", when="+umpire") - depends_on("amr-wind+tiny_profile", when="+tiny_profile") + 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("MPI_HOME", spec["mpi"].prefix)] - if "+umpire" in self.spec: - args.append(self.define_from_variant("EXAWIND_ENABLE_UMPIRE", "umpire")) - args.append(self.define("UMPIRE_DIR", self.spec["umpire"].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)) @@ -77,6 +106,7 @@ def cmake_args(self): 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))) @@ -84,15 +114,18 @@ def cmake_args(self): if spec.satisfies("^amr-wind+hdf5"): args.append(self.define("H5Z_ZFP_USE_STATIC_LIBS", True)) - if spec.satisfies("^amr-wind+ascent"): - args.append(self.define("CMAKE_EXE_LINKER_FLAGS", self.compiler.openmp_flag)) - return args def setup_build_environment(self, env): - if "~stk_simd" in self.spec: - env.append_flags("CXXFLAGS", "-DUSE_STK_SIMD_NONE") - if "+rocm" in self.spec: + 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 72e9c2f82be1b2..873288236155f1 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 @@ def edit(self, spec, prefix): 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 @@ def edit(self, spec, prefix): " ".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 @@ def edit(self, spec, prefix): ] ) - 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 @@ def edit(self, spec, prefix): 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 f720a3a56b4ce9..2e3a2e126fe225 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 937576b4ae9721..181f0c3e0bfbc4 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 8cd81156133fe0..6629a68a693219 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 00000000000000..6dc79dc9435486 --- /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/package.py b/var/spack/repos/builtin/packages/exodusii/package.py index dbc60affbc89ee..00c29b96fe9204 100644 --- a/var/spack/repos/builtin/packages/exodusii/package.py +++ b/var/spack/repos/builtin/packages/exodusii/package.py @@ -180,10 +180,11 @@ def cmake_args(self): [ define("CMAKE_C_COMPILER", spec["mpi"].mpicc), define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx), - define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc), define("MPI_BASE_DIR", spec["mpi"].prefix), ] ) + if self.spec.satisfies("+fortran"): + options.append(define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc)) # ##################### Dependencies ########################## # Always need NetCDF-C diff --git a/var/spack/repos/builtin/packages/exonerate-gff3/package.py b/var/spack/repos/builtin/packages/exonerate-gff3/package.py index 3d7fac832ccce0..eb5c6234bdde38 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 0eac5a46059404..1453cf9074765f 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 36d79c06c76c1e..a41d4912de8415 100644 --- a/var/spack/repos/builtin/packages/expat/package.py +++ b/var/spack/repos/builtin/packages/expat/package.py @@ -17,8 +17,16 @@ class Expat(AutotoolsPackage, CMakePackage): license("MIT") - version("2.6.2", sha256="9c7c1b5dcbc3c237c500a8fb1493e14d9582146dd9b42aa8d3ffb856a3b927e0") - # deprecate all releases before 2.6.2 because of security issues + version("2.6.3", sha256="b8baef92f328eebcf731f4d18103951c61fa8c8ec21d5ff4202fb6f2198aeb2d") + # deprecate all releases before 2.6.3 because of security issues + # 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", @@ -139,6 +147,9 @@ class Expat(AutotoolsPackage, CMakePackage): 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 @@ -173,7 +184,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 @@ -185,7 +196,7 @@ def cmake_args(self): 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 372817b8d660df..02a8cc259979c6 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/package.py b/var/spack/repos/builtin/packages/extrae/package.py index 1eb38a0a4c595c..24f12bba595749 100644 --- a/var/spack/repos/builtin/packages/extrae/package.py +++ b/var/spack/repos/builtin/packages/extrae/package.py @@ -43,14 +43,18 @@ class Extrae(AutotoolsPackage): license("LGPL-2.1-or-later") version("4.1.2", sha256="adbc1d3aefde7649262426d471237dc96f070b93be850a6f15280ed86fd0b952") - version("4.0.6", sha256="b5060336cac57f1345faa09009b1940edf1e6991aae05cc10d0b714d31360a92") + 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") @@ -64,7 +68,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") @@ -88,9 +91,15 @@ 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", + ) + 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 @@ -107,32 +116,37 @@ def configure_args(self): 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 + if spec.satisfies("+dyninst") else ["--without-dyninst"] ) args += ( ["--with-cuda=%s" % spec["cuda"].prefix] - if "+cuda" in self.spec + if spec.satisifes("+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:"): 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): diff --git a/var/spack/repos/builtin/packages/exuberant-ctags/package.py b/var/spack/repos/builtin/packages/exuberant-ctags/package.py index 41452896fad6ef..fbe19519380bae 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 @@ 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 98e1582ff6ac15..321b4aab22e6bf 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 2a119e960e5d66..7648bbb26aa9ff 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 @@ def patch(self): 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 be2d921a1acd93..6e8bc62d11f149 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 760cfbbb6f0ddb..fee8a91208bad8 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 645126b67d8ce8..0d180c933802c6 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 29e3fc0f67f6e7..9013fbc1bd38f2 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 4c8aef39d8a503..041f1be910d435 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 index 96427c3e2a4877..caa3285b4e617f 100644 --- a/var/spack/repos/builtin/packages/fabulous/package.py +++ b/var/spack/repos/builtin/packages/fabulous/package.py @@ -19,6 +19,10 @@ class Fabulous(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/fairlogger/package.py b/var/spack/repos/builtin/packages/fairlogger/package.py index 83570639b9726b..a60fb497a4c335 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 bb21f841ca2896..18e5bcf60aac63 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 8f4b6acb69af20..ceb57a874ec0d3 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 @@ def setup_run_environment(self, env): 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 = [ @@ -97,7 +103,7 @@ def cmake_args(self): self.define("FAISS_OPT_LEVEL", "generic"), ] - 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( @@ -106,22 +112,21 @@ def cmake_args(self): 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")) @@ -130,17 +135,17 @@ def configure_args(self): 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 @@ -149,10 +154,9 @@ def build(self, pkg, spec, prefix): 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 @@ -171,7 +175,7 @@ def _prefix_and_install(file): _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 c74d7597b1aec7..8ffb4b930a111a 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 e314fd3ebd5e12..4f7380281b41d2 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 3b6c4268c8dcfc..d61d090123efd0 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 898e13354ab0c7..8df968456fa9db 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 ca48172e31661e..8ee6368055f58c 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 b4b600d299e6aa..8d91fe59b2295c 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 8808b625facc13..bd1e3d5906195e 100644 --- a/var/spack/repos/builtin/packages/fargparse/package.py +++ b/var/spack/repos/builtin/packages/fargparse/package.py @@ -31,6 +31,8 @@ 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") 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 00000000000000..00872846e512da --- /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 916bcab19334c5..cf5ceec34442dc 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 412fb7b28d2c25..c7c6ae641f2806 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 fe8a3ee2d5bc11..9658e3b40e2f8c 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 a99b515fde7fa0..38404ad9f121f9 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 0192f7cc19295f..954680a11bc15b 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 1a124ff62d3984..6bc2164d99741c 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 b90442f0c23a6c..c2738a3bbf0cd5 100644 --- a/var/spack/repos/builtin/packages/fastjet/package.py +++ b/var/spack/repos/builtin/packages/fastjet/package.py @@ -60,6 +60,10 @@ 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( @@ -72,6 +76,14 @@ class Fastjet(AutotoolsPackage): ) 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:"), @@ -88,9 +100,9 @@ class Fastjet(AutotoolsPackage): ) variant( "plugins", - multi=True, - values=("all", "cxx") + available_plugins, - default="all", + values=disjoint_sets(("all",), ("cxx",), available_plugins) + .prohibit_empty_set() + .with_default("all"), description="List of plugins to enable, or 'cxx' or 'all'", ) @@ -126,3 +138,8 @@ def configure_args(self): 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 351a78358e664f..fce4bd24867839 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 00000000000000..348026f3e348a4 --- /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 422b0294bd1f04..03ff52e50ec01b 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 588597d359b770..07a31ad7115860 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 3efd1c347d7d0c..1fc57b12ab3aa4 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 5c35700bdbd159..585caec673db46 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 8a766c29770fbd..3d26bbd290573e 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 @@ def install(self, spec, prefix): @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 651cc94255ddbf..3279c83915f56d 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 f2268f2573453f..4649a9cfc05d7b 100644 --- a/var/spack/repos/builtin/packages/faust/package.py +++ b/var/spack/repos/builtin/packages/faust/package.py @@ -16,11 +16,15 @@ 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): diff --git a/var/spack/repos/builtin/packages/fbgemm/package.py b/var/spack/repos/builtin/packages/fbgemm/package.py index 39893255ed4e6b..e0a6c5cfa05a91 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 0f1f88f8708f27..97f6b462281df5 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 cab2aa562fb50f..89b1e3105e95b6 100644 --- a/var/spack/repos/builtin/packages/fckit/package.py +++ b/var/spack/repos/builtin/packages/fckit/package.py @@ -27,6 +27,9 @@ class Fckit(CMakePackage): 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")) @@ -65,7 +68,7 @@ def cmake_args(self): "-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: diff --git a/var/spack/repos/builtin/packages/fd/package.py b/var/spack/repos/builtin/packages/fd/package.py index 47f0d13eac6a67..59bb889fca5c82 100644 --- a/var/spack/repos/builtin/packages/fd/package.py +++ b/var/spack/repos/builtin/packages/fd/package.py @@ -16,7 +16,29 @@ class Fd(CargoPackage): 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") + + 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) + + mkdirp(fish_completion_path(self.prefix)) + with open(fish_completion_path(self.prefix) / "fd.fish", "w") as file: + fd("--gen-completions", "fish", output=file) + + 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 547f5bdbc120a5..74994b9ff10f44 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", diff --git a/var/spack/repos/builtin/packages/fds/package.py b/var/spack/repos/builtin/packages/fds/package.py index 0b08921af187e6..51c983a09dd4fd 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 @@ def build_targets(self): 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 fcb2010409a887..80174e0c0c865d 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 e41ba4e1bb948e..5e7c3657a921ad 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 edda25396ec288..9a154a05672104 100644 --- a/var/spack/repos/builtin/packages/fenics-basix/package.py +++ b/var/spack/repos/builtin/packages/fenics-basix/package.py @@ -17,34 +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", - deprecated=True, - ) - version( - "0.4.2", - sha256="a54f5e442b7cbf3dbb6319c682f9161272557bd7f42e2b8b8ccef88bc1b7a22f", - 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") - - 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", - ) + 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 d6c9187e6d81da..b252d5a9c90152 100644 --- a/var/spack/repos/builtin/packages/fenics-dolfinx/package.py +++ b/var/spack/repos/builtin/packages/fenics-dolfinx/package.py @@ -17,35 +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", - deprecated=True, - ) - version( - "0.5.0", - sha256="503c70c01a44d1ffe48e052ca987693a49f8d201877652cabbe2a44eb3b7c040", - deprecated=True, - ) - version( - "0.4.1", - sha256="68dcf29a26c750fcea5e02d8d58411e3b054313c3bf6fcbc1d0f08dd2851117f", - deprecated=True, - ) - 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( @@ -57,54 +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 af177d7fb036a6..12b9808bef602a 100644 --- a/var/spack/repos/builtin/packages/fenics-ufcx/package.py +++ b/var/spack/repos/builtin/packages/fenics-ufcx/package.py @@ -14,29 +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", - deprecated=True, - ) - version( - "0.5.0", - sha256="3413409e5885e41e220f99e0f95cc817e94c4931143d1f700c6e0c5e1bfad1f6", - deprecated=True, - ) - version( - "0.4.2", - sha256="3be6eef064d6ef907245db5b6cc15d4e603762e68b76e53e099935ca91ef1ee4", - deprecated=True, - ) 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 cf56c14fd01c1a..cec4412ee6579d 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 @@ -40,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") @@ -190,7 +193,6 @@ def setup_run_environment(self, env): # 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 f470cab980928d..fd55780e677c74 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 9bc92d4a285d9d..583d20681829a0 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 739bd4c4eaa723..019845322060ef 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 56494e0b0932bc..9e9a317b476fa9 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") @@ -77,7 +80,7 @@ def patch(self): 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", @@ -108,7 +111,7 @@ def patch(self): 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" @@ -134,7 +137,7 @@ def patch(self): # 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" @@ -179,7 +182,7 @@ def install(self, spec, prefix): 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) @@ -196,7 +199,7 @@ def setup_run_environment(self, env): 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 0a3afb7c10bbcf..9e6875dd36efa2 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 bf11ce4883642c..e2e55b1e709c75 100644 --- a/var/spack/repos/builtin/packages/ffmpeg/package.py +++ b/var/spack/repos/builtin/packages/ffmpeg/package.py @@ -12,11 +12,16 @@ 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") @@ -37,11 +42,14 @@ class Ffmpeg(AutotoolsPackage): 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( @@ -93,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") @@ -123,7 +133,7 @@ class Ffmpeg(AutotoolsPackage): # Solve build failure against vulkan headers 1.3.279 patch( "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/fef22c87ada4", - sha256="856bdc2b6e2a7066cf683a235193b9025d4d73dd7686eda2fbcf83e7e65f8bf9", + sha256="5726e8e999e3fc7a5ae4c4c846c9151246e5846c54dc3b8ff8326ee31c59631a", when="@6.1.1", ) @@ -150,12 +160,12 @@ class Ffmpeg(AutotoolsPackage): # fix incompatibility with texinfo@7, especially @7.1: patch( "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/f01fdedb69e4accb1d1555106d8f682ff1f1ddc7", - sha256="416751f41cfbf086c28b4bbf01ace4c08e5651e59911dca6240292bb1b5c6b53", + sha256="673813d13f5c37b75ff5bcb56790ccd6b16962fdb9bddcbbeeead979d47d31b3", when="@6.0", ) patch( "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/f01fdedb69e4accb1d1555106d8f682ff1f1ddc7", - sha256="416751f41cfbf086c28b4bbf01ace4c08e5651e59911dca6240292bb1b5c6b53", + sha256="673813d13f5c37b75ff5bcb56790ccd6b16962fdb9bddcbbeeead979d47d31b3", when="@5:5.1.3", ) @@ -171,7 +181,6 @@ def headers(self): @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") diff --git a/var/spack/repos/builtin/packages/ffsb/package.py b/var/spack/repos/builtin/packages/ffsb/package.py index 7000586d8ac175..8ca9c3c3ff27fc 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 98f870f545821b..af0a89e94b3e0e 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 @@ def edit(self, spec, prefix): 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 @@ def install(self, spec, prefix): 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 fa606cf3ce24cb..44aace9f3ed3d4 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -79,7 +79,7 @@ def patch(self): 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") @@ -114,13 +114,13 @@ def configure(self, spec, prefix): 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. @@ -230,6 +230,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, @@ -244,6 +247,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) 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 a4f0e6adc61673..31108f76afc9e3 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/fftx/package.py b/var/spack/repos/builtin/packages/fftx/package.py index fa4052cf01a8c7..96ed533315bf18 100644 --- a/var/spack/repos/builtin/packages/fftx/package.py +++ b/var/spack/repos/builtin/packages/fftx/package.py @@ -30,6 +30,8 @@ class Fftx(CMakePackage, CudaPackage, ROCmPackage): version("1.1.0", sha256="a6f95605abc11460bbf51839727a456a31488e27e12a970fc29a1b8c42f4e3b5") version("1.0.3", sha256="b5ff275facce4a2fbabd0aecc65dd55b744794f2e07cd8cfa91363001c664896") + depends_on("cxx", type="build") # generated + 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 +43,9 @@ def create_lib_source_code(self): # 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 +58,7 @@ def cmake_args(self): 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 3f16008ff49e6f..8711d91200aaf7 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 488ecf450d85a4..e84b06000cf319 100644 --- a/var/spack/repos/builtin/packages/fiat/package.py +++ b/var/spack/repos/builtin/packages/fiat/package.py @@ -23,6 +23,10 @@ class Fiat(CMakePackage): 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 29c5ea00c525a3..c7463005f75321 100644 --- a/var/spack/repos/builtin/packages/fides/package.py +++ b/var/spack/repos/builtin/packages/fides/package.py @@ -19,6 +19,8 @@ class Fides(CMakePackage): version("1.2.0", sha256="12be939d75c765dab9241f9ed2b64af01cce2b10281de402f64fb685e6ccd7df") version("1.1.0", sha256="40d2e08b8d5cfdfc809eae6ed2ae0731108ce3b1383485f4934a5ec8aaa9425e") version("1.0.0", sha256="c355fdb4ca3790c1fa9a4491a0d294b8f883b6946c540ad9e5633c9fd8c8c3aa") + + depends_on("cxx", type="build") # generated variant("mpi", default=True, description="build mpi support") # Certain CMake versions have been found to break for our use cases diff --git a/var/spack/repos/builtin/packages/figcone/package.py b/var/spack/repos/builtin/packages/figcone/package.py index 3b1135f6c32579..be38b281ed5e96 100644 --- a/var/spack/repos/builtin/packages/figcone/package.py +++ b/var/spack/repos/builtin/packages/figcone/package.py @@ -17,3 +17,5 @@ class Figcone(CMakePackage): 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 2037a2de715196..bfefd211f7a50c 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 d2bc55cb710200..c79acb62b53db0 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 4b1efcfad3a4fb..cc8d23badbcbd4 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 fc778210cdeb36..ec349a006d4681 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 ceb344bec17c6d..06038deda12a26 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 6ff1decade2eba..92c8640c4a12e7 100644 --- a/var/spack/repos/builtin/packages/findutils/package.py +++ b/var/spack/repos/builtin/packages/findutils/package.py @@ -51,6 +51,8 @@ def url_for_version(self, version): 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 fee86980667327..554e8f97c136bc 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 * @@ -35,27 +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 = [] - spec = self.spec + config_args = ["--disable-native"] - if spec.satisfies("+gui"): + 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 bd8039e9e6130d..03d86c820119e9 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 cca14b84bdad15..b4359aabaf6aec 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 @@ def cmake_args(self): "-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 92e7f494702341..dd0157bd9d3e28 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/fjcontrib/package.py b/var/spack/repos/builtin/packages/fjcontrib/package.py index a8cb05b4ab865e..2563359dd9b5b2 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 * @@ -70,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"] @@ -85,9 +85,9 @@ def configure_args(self): 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 6cc847ea5eccdb..80b18f12938820 100644 --- a/var/spack/repos/builtin/packages/flac/package.py +++ b/var/spack/repos/builtin/packages/flac/package.py @@ -24,4 +24,7 @@ class Flac(AutotoolsPackage): 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 d49eacef5912d2..f6dbf090d4c3b0 100644 --- a/var/spack/repos/builtin/packages/flamemaster/package.py +++ b/var/spack/repos/builtin/packages/flamemaster/package.py @@ -242,7 +242,7 @@ def cmake_args(self): 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 301d1d88f5d4a6..60521f83b99d70 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 @@ def patch(self): "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) diff --git a/var/spack/repos/builtin/packages/flap/package.py b/var/spack/repos/builtin/packages/flap/package.py index 082ff297e6d7a2..fc2d9013930b03 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 8cd9e98f5afc8b..67ca048eb002f0 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 9f2bc1574ae6ff..77c6ddb9793928 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 486d2c95e9ea38..38ac09ef24babd 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,7 @@ 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") @@ -23,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") @@ -53,11 +57,10 @@ 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 = [] diff --git a/var/spack/repos/builtin/packages/flatcc/package.py b/var/spack/repos/builtin/packages/flatcc/package.py index 1a685e7f85a99b..f9c054a5a679e4 100644 --- a/var/spack/repos/builtin/packages/flatcc/package.py +++ b/var/spack/repos/builtin/packages/flatcc/package.py @@ -31,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") diff --git a/var/spack/repos/builtin/packages/flcl/package.py b/var/spack/repos/builtin/packages/flcl/package.py index dad907c1f7b9cc..be0e0b514d2727 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 ef09c6a29f8450..00000000000000 --- 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 991ff6f778760d..517f57b0a7f996 100644 --- a/var/spack/repos/builtin/packages/flecsi/package.py +++ b/var/spack/repos/builtin/packages/flecsi/package.py @@ -17,27 +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", 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, - deprecated=True, - ) variant( "backend", default="mpi", - values=("serial", "mpi", "legion", "hpx", "charmpp"), + values=("mpi", "legion", "hpx"), description="Backend to use for distributed memory", multi=False, ) @@ -56,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") @@ -81,92 +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-20191217", 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 ^[virtuals=mpi] 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("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 @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: ^[virtuals=mpi] mpich") - depends_on("openmpi@4.1.0:", when="@2.0: ^[virtuals=mpi] openmpi") + 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 @@ -185,13 +131,13 @@ def cmake_args(self): 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 @@ -202,29 +148,14 @@ def cmake_args(self): 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_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 0e47ba5ea3794e..ca875c8ade1196 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 ec6c271ad44166..dc2e6d7727761e 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") @@ -78,7 +82,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 +112,43 @@ def configure(self): 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 +172,7 @@ def install(self, spec, prefix): 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 c887e3580b3ccf..cacd5c71a92b6d 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 36e1a6296854b7..80359b1ced88bc 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 a332fd4218ffb3..97024d4d6c5f96 100644 --- a/var/spack/repos/builtin/packages/flexiblas/package.py +++ b/var/spack/repos/builtin/packages/flexiblas/package.py @@ -22,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 72e52395444e1f..e13cbf754564dd 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 @@ def cmake_args(self): 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 d8d351ad73fb69..6222815e22000d 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 0c3560fb320c50..2d49648e508f77 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 8aaad29b0098c6..30c86cfe034517 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 f860c05cc5ab0f..2cb32fd091c1dc 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 @@ def install(self, spec, prefix): "--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 7a57524b304c87..c5b827681450a8 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 b85a496cf7c181..52eddda9fc938a 100644 --- a/var/spack/repos/builtin/packages/flux-core/package.py +++ b/var/spack/repos/builtin/packages/flux-core/package.py @@ -22,6 +22,11 @@ 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") @@ -58,71 +63,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 @@ -140,27 +82,22 @@ class FluxCore(AutotoolsPackage): depends_on("ncurses@6.2:", when="@0.32.0:") depends_on("libzmq@4.0.4:") depends_on("czmq@3.0.1:", when="@:0.54.0") - depends_on("hwloc@1.11.1:1", when="@:0.17.0") - depends_on("hwloc@1.11.1:", when="@0.17.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")) 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"), 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") @@ -246,6 +183,12 @@ def setup_build_environment(self, env): 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=";" ) @@ -268,7 +211,7 @@ def configure_args(self): 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 @@ -285,4 +228,4 @@ def flag_handler(self, name, flags): 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 a94bb4c4f7b625..23d7425d36634b 100644 --- a/var/spack/repos/builtin/packages/flux-pmix/package.py +++ b/var/spack/repos/builtin/packages/flux-pmix/package.py @@ -23,6 +23,8 @@ class FluxPmix(AutotoolsPackage): 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:") @@ -55,8 +57,8 @@ def add_pluginpath(self): 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 679e26ac7c290a..66d5532bf31db9 100644 --- a/var/spack/repos/builtin/packages/flux-sched/package.py +++ b/var/spack/repos/builtin/packages/flux-sched/package.py @@ -24,6 +24,12 @@ class FluxSched(CMakePackage, AutotoolsPackage): license("LGPL-3.0-only") version("master", branch="master") + 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") @@ -43,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 @@ -72,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")) @@ -171,6 +171,12 @@ def lua_lib_dir(self): 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=";" ) @@ -180,17 +186,27 @@ def setup_run_environment(self, env): 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): + 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: - return [self.define("FLUX_SCHED_VER", self.spec.version)] - return [] + # 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 1d108f8449ba55..23183c6d3b5076 100644 --- a/var/spack/repos/builtin/packages/flux-security/package.py +++ b/var/spack/repos/builtin/packages/flux-security/package.py @@ -27,6 +27,8 @@ class FluxSecurity(AutotoolsPackage): 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") diff --git a/var/spack/repos/builtin/packages/fluxbox/package.py b/var/spack/repos/builtin/packages/fluxbox/package.py index 4559ad9c80f619..3a5ae980d86321 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 00000000000000..837c3e8ef85031 --- /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 f94fb771b05de6..59034e63d5813b 100644 --- a/var/spack/repos/builtin/packages/fms/package.py +++ b/var/spack/repos/builtin/packages/fms/package.py @@ -55,10 +55,13 @@ 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/pull/1418/commits/c9bba516ba1115d4a7660fba92f9d67cf3fd32ad.patch?full_index=1", - sha256="f835c54b2898c980a4cc2a9786134af91a8b1e8b1f11b1734227c6dea26c3b79", + "https://github.com/NOAA-GFDL/FMS/commit/c9bba516ba1115d4a7660fba92f9d67cf3fd32ad.patch?full_index=1", + sha256="07d5b68838bba61ee547bd4cd7c12d81228c91a80a966b8693694fa236d0ac30", when="@2023.03", ) diff --git a/var/spack/repos/builtin/packages/fmt/package.py b/var/spack/repos/builtin/packages/fmt/package.py index eadbb0ac5a6f8c..c0d1b2461a9f7b 100644 --- a/var/spack/repos/builtin/packages/fmt/package.py +++ b/var/spack/repos/builtin/packages/fmt/package.py @@ -18,6 +18,9 @@ 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") @@ -44,6 +47,8 @@ class Fmt(CMakePackage): version("3.0.0", sha256="1b050b66fa31b74f1d75a14f15e99e728ab79572f176a53b2f8ad7c201c30ceb") version("master", branch="master") + depends_on("cxx", type="build") + variant( "cxxstd", default="11", @@ -96,10 +101,10 @@ class Fmt(CMakePackage): # Fix 'variable "buffer" may not be initialized' compiler error patch( - "fmt-no-variable-initialize_10.0.0.patch", when="@10.0.0:10.2.1%clang@12.0.1.ibm.gcc.8.3.1" + "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:10.2.1%clang@14.0.5.ibm.gcc.8.3.1" + "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): @@ -109,7 +114,7 @@ def cmake_args(self): 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), @@ -123,7 +128,7 @@ def cmake_args(self): 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 a9a333dde88b96..6a9d8a026f727c 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 @@ def configure(self, spec, prefix): # 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 @@ def configure(self, spec, prefix): "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 @@ def configure(self, spec, prefix): "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 @@ def configure(self, spec, prefix): "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 @@ def configure(self, spec, prefix): "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 @@ def install(self, spec, prefix): } # 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 @@ def install(self, spec, prefix): 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 index de5e65211e52c0..183785bde239a3 100644 --- a/var/spack/repos/builtin/packages/foldseek/package.py +++ b/var/spack/repos/builtin/packages/foldseek/package.py @@ -14,6 +14,7 @@ class Foldseek(CMakePackage): 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") @@ -21,3 +22,4 @@ class Foldseek(CMakePackage): 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 f621fe475c0ce6..72fa97883fc967 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 4ba5cbcc8edf02..5ef6c416ffe290 100644 --- a/var/spack/repos/builtin/packages/font-util/package.py +++ b/var/spack/repos/builtin/packages/font-util/package.py @@ -19,6 +19,8 @@ class FontUtil(AutotoolsPackage, XorgPackage): 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") @@ -221,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": diff --git a/var/spack/repos/builtin/packages/fontconfig/package.py b/var/spack/repos/builtin/packages/fontconfig/package.py index 3ce221d1996689..ac3d33ab165546 100644 --- a/var/spack/repos/builtin/packages/fontconfig/package.py +++ b/var/spack/repos/builtin/packages/fontconfig/package.py @@ -23,6 +23,8 @@ 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") @@ -56,14 +58,23 @@ def configure_args(self): if not self.spec["libpng"].satisfies("libs=shared"): deps.append("libpng") if self.spec["libxml2"].satisfies("~shared"): - deps.extend(["zlib", "xz", "iconv"]) + # DH*? + # first line is from spack develop, we had the second line + deps.append("libxml-2.0") + # deps.extend(["zlib", "xz", "iconv"]) + # *DH? if deps: + pc = which("pkg-config") for lib in deps: - ldflags.append(self.spec[lib].libs.ld_flags) - libs.append(self.spec[lib].libs.link_flags) + 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}") + args.extend(self.with_or_without("pic")) return args diff --git a/var/spack/repos/builtin/packages/fonttosfnt/package.py b/var/spack/repos/builtin/packages/fonttosfnt/package.py index 52b0de7ba824c0..730fa99631af10 100644 --- a/var/spack/repos/builtin/packages/fonttosfnt/package.py +++ b/var/spack/repos/builtin/packages/fonttosfnt/package.py @@ -9,7 +9,7 @@ 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") @@ -18,9 +18,11 @@ class Fonttosfnt(AutotoolsPackage, XorgPackage): 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 4c288031bd4638..6a99d02d03db13 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 0cd7a1a85d174d..b3d36d6c007af5 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 747eaa9eaf7636..2866df52a104e3 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 @@ def cmake_args(self): 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 @@ def test_metis(self): 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 082d1224c64288..df1d30cf20b16b 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 a90a954f6f20af..c1871ab528e799 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 @@ def cached_tests_work_dir(self): 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 6c62b5b4a526fc..8d09c815ebe2c3 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 710bdde1504958..08cbec0b49d7c8 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 554f919720e161..bcd88f7f6c7b21 100644 --- a/var/spack/repos/builtin/packages/fox/package.py +++ b/var/spack/repos/builtin/packages/fox/package.py @@ -28,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") diff --git a/var/spack/repos/builtin/packages/fp16/package.py b/var/spack/repos/builtin/packages/fp16/package.py index d971dc6a1ebf18..a0e49e0da168b9 100644 --- a/var/spack/repos/builtin/packages/fp16/package.py +++ b/var/spack/repos/builtin/packages/fp16/package.py @@ -21,6 +21,8 @@ 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("cxx", type="build") # generated + 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 e0da5fae0134d0..5fb4168c6b421b 100644 --- a/var/spack/repos/builtin/packages/fpart/package.py +++ b/var/spack/repos/builtin/packages/fpart/package.py @@ -17,7 +17,7 @@ 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") @@ -35,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 0607838e56c6d9..d4f29c354cd044 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 5a243a48082036..335624b2db2009 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 4186175b510905..f629bb1bfdcd70 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 f294fc05d346ac..61e8f4da09d6e0 100644 --- a/var/spack/repos/builtin/packages/fplo/package.py +++ b/var/spack/repos/builtin/packages/fplo/package.py @@ -136,5 +136,4 @@ def perl_interpreter(self): 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 a8c410e31a0aa7..18f179d15b29cf 100644 --- a/var/spack/repos/builtin/packages/fpm/package.py +++ b/var/spack/repos/builtin/packages/fpm/package.py @@ -42,13 +42,13 @@ class Fpm(Package): depends_on("git@1.8.5:", 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 3b50ee68832398..833bf24fffe228 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 7a5c011b196eda..6c4da7cb87dbf2 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 88d80ee3459344..95321c2432bb1d 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 89aab4e7368b40..32e42333de05c0 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 003a652cd7528d..1931c5e33f38ce 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 1a395a5dad3d3a..3d5af4172978f8 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 712a1b9b96baf5..37ca96d694023a 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 @@ def configure_args(self): "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 993f4dc29e26f0..79e04f38859cc2 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 a0e6ae2e2608f3..f3ac391b7b04d8 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 2e2b23a614415e..443bed5176042b 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 4f3ad7adfb7c85..a54230cb2392cc 100644 --- a/var/spack/repos/builtin/packages/freetype/package.py +++ b/var/spack/repos/builtin/packages/freetype/package.py @@ -22,7 +22,15 @@ class Freetype(AutotoolsPackage, CMakePackage): license("FTL OR GPL-2.0-or-later") - version("2.13.2", sha256="1ac27e16c134a7f2ccea177faba19801131116fd682efc1f5737037c5db224b5") + 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") @@ -39,12 +47,14 @@ class Freetype(AutotoolsPackage, CMakePackage): 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( diff --git a/var/spack/repos/builtin/packages/freexl/package.py b/var/spack/repos/builtin/packages/freexl/package.py index c74e29146fa581..3288dd477e228e 100644 --- a/var/spack/repos/builtin/packages/freexl/package.py +++ b/var/spack/repos/builtin/packages/freexl/package.py @@ -17,4 +17,16 @@ class Freexl(AutotoolsPackage): 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 beea8647cbd4ba..b657b2dceb1b13 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 2c9d9f03a71a1b..1ffafa9adacbdc 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 0691a409352523..d383f96cc57bcf 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 cae1ff6ecd233f..690911373e8559 100644 --- a/var/spack/repos/builtin/packages/fsl/package.py +++ b/var/spack/repos/builtin/packages/fsl/package.py @@ -111,7 +111,7 @@ def patch(self): 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 d08250cc2f9eb8..c1af295066c521 100644 --- a/var/spack/repos/builtin/packages/fslsfonts/package.py +++ b/var/spack/repos/builtin/packages/fslsfonts/package.py @@ -9,14 +9,16 @@ 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 2d316b44743d55..c8f9caecfaca5e 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 4a0da90af87e3e..a6bd204c3e51a7 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 @@ def setup_build_environment(self, env): 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 @@ def build(self, spec, prefix): 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 d9ac0dba6dbb65..3798f8457db3be 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 c54a9427e0ebbb..df26fa71b64578 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 44276329c4f26d..c53450588ada50 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 fe0e6c62d2cec2..ea544bd2f9e897 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 4041e58f49c6bc..c572f4132ab1c4 100644 --- a/var/spack/repos/builtin/packages/ftxui/package.py +++ b/var/spack/repos/builtin/packages/ftxui/package.py @@ -19,3 +19,5 @@ class Ftxui(CMakePackage): 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 29ea363b1d7d56..c647b94445e4e7 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 @@ def configure(self, spec, prefix): "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 06e184f296973d..618927ebc83875 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 91ba765750e7ac..36c6cec58487a5 100644 --- a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py +++ b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py @@ -22,6 +22,8 @@ class FujitsuMpi(Package): 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") @@ -53,6 +55,22 @@ def setup_dependent_package(self, module, dependent_spec): self.spec.mpif77 = self.prefix.bin.mpifrt self.spec.mpifc = self.prefix.bin.mpifrt + def setup_dependent_build_environment(self, env, dependent_spec): + # 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 diff --git a/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py b/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py index 76682cc862d930..a12b8ca0e9b2e0 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 @@ def blas_libs(self): 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 @@ def scalapack_libs(self): 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 @@ def scalapack_libs(self): 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 @@ def scalapack_libs(self): 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 ad627247567121..487e29dce1c1ea 100644 --- a/var/spack/repos/builtin/packages/fullock/package.py +++ b/var/spack/repos/builtin/packages/fullock/package.py @@ -25,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 f9745c18c79b3c..776da697d84903 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 f4b4023dd8018c..1594093df90e90 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 18112758dc998c..927c216c996ec6 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 f9349661692d0a..4bd936ca302b41 100644 --- a/var/spack/repos/builtin/packages/fxdiv/package.py +++ b/var/spack/repos/builtin/packages/fxdiv/package.py @@ -19,6 +19,8 @@ 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("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/fxt/package.py b/var/spack/repos/builtin/packages/fxt/package.py index d8039a53dacc81..f4e6a5846ba04a 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 37653cf3a8a7e1..572c3525d93737 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 d9a5b6057fd9fd..a3c75798c47fd6 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,6 +19,10 @@ class Fzf(MakefilePackage): license("MIT") + 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") @@ -29,6 +33,7 @@ class Fzf(MakefilePackage): 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") @@ -38,6 +43,10 @@ def determine_version(cls, exe): 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) diff --git a/var/spack/repos/builtin/packages/g2/package.py b/var/spack/repos/builtin/packages/g2/package.py index ea3bb603442dd1..6edcc1593c86db 100644 --- a/var/spack/repos/builtin/packages/g2/package.py +++ b/var/spack/repos/builtin/packages/g2/package.py @@ -29,7 +29,10 @@ class G2(CMakePackage): version("3.4.5", sha256="c18e991c56964953d778632e2d74da13c4e78da35e8d04cb742a2ca4f52737b6") version("3.4.3", sha256="679ea99b225f08b168cbf10f4b29f529b5b011232f298a5442ce037ea84de17c") - variant("pic", default=True, description="Build with position-independent code (PIC)") + depends_on("c", type="build") + depends_on("fortran", type="build") + + variant("pic", default=True, description="Build with position-independent-code") variant( "precision", default=("4", "d"), @@ -39,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 @@ -77,7 +101,12 @@ def setup_run_environment(self, env): 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)) diff --git a/var/spack/repos/builtin/packages/g2c/package.py b/var/spack/repos/builtin/packages/g2c/package.py index 29a7db27267eed..1ddc6fe37a7313 100644 --- a/var/spack/repos/builtin/packages/g2c/package.py +++ b/var/spack/repos/builtin/packages/g2c/package.py @@ -24,6 +24,8 @@ class G2c(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/g2o/package.py b/var/spack/repos/builtin/packages/g2o/package.py index effc4b3c7c5d19..e3c8f04621f69c 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 5f5bad1e1e87b9..b5ad734b014528 100644 --- a/var/spack/repos/builtin/packages/g2tmpl/package.py +++ b/var/spack/repos/builtin/packages/g2tmpl/package.py @@ -25,6 +25,9 @@ class G2tmpl(CMakePackage): 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): diff --git a/var/spack/repos/builtin/packages/g4emlow/package.py b/var/spack/repos/builtin/packages/g4emlow/package.py index d2f220dd2b6457..87c25b950b6121 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,6 +31,8 @@ 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)) diff --git a/var/spack/repos/builtin/packages/g4ndl/package.py b/var/spack/repos/builtin/packages/g4ndl/package.py index be9f298c2f8154..a8c8f688985555 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") 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 00000000000000..073aebcc7f8fc4 --- /dev/null +++ b/var/spack/repos/builtin/packages/g4nudexlib/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 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", "G4NUDEXLIB{0}".format(self.version)) + 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", "G4NUDEXLIB{0}".format(self.version)) + 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 diff --git a/var/spack/repos/builtin/packages/g4particlexs/package.py b/var/spack/repos/builtin/packages/g4particlexs/package.py index 93c53fb277a266..fb86575b466cf1 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") 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 00000000000000..e9ff5df2840c3b --- /dev/null +++ b/var/spack/repos/builtin/packages/g4urrpt/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 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", "G4URRPT{0}".format(self.version)) + 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", "G4URRPT{0}".format(self.version)) + 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 diff --git a/var/spack/repos/builtin/packages/gadap/package.py b/var/spack/repos/builtin/packages/gadap/package.py index 6c50abe4a59c41..1c43350ea97d1d 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 230da6450511c7..7f7b06ff2c5b88 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 34a96c284a650b..8fbde6cda968d4 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 00000000000000..57d76cee6b3251 --- /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 f1e72b89d168c8..9ea5be344cc927 100644 --- a/var/spack/repos/builtin/packages/garfieldpp/package.py +++ b/var/spack/repos/builtin/packages/garfieldpp/package.py @@ -30,6 +30,10 @@ class Garfieldpp(CMakePackage): 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 74e6061918e218..a6100797123cce 100644 --- a/var/spack/repos/builtin/packages/gasnet/package.py +++ b/var/spack/repos/builtin/packages/gasnet/package.py @@ -37,11 +37,16 @@ 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( + "2022.3.0", + deprecated=True, + sha256="91b59aa84c0680c807e00d3d1d8fa7c33c1aed50b86d1616f93e499620a9ba09", + ) version( "2021.9.0", deprecated=True, @@ -67,6 +72,9 @@ class Gasnet(Package, CudaPackage, ROCmPackage): 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. @@ -75,12 +83,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", ) @@ -118,12 +126,15 @@ class Gasnet(Package, CudaPackage, ROCmPackage): ) 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): @@ -152,20 +163,22 @@ def install(self, spec, prefix): 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 "+level_zero" in spec: + 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") @@ -191,7 +204,7 @@ def install(self, spec, prefix): @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() @@ -206,7 +219,7 @@ def _setup_test_env(self): 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") @@ -219,7 +232,7 @@ def test_testtools(self): 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 f37117d84476b5..9931d15bb2c85f 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 9a77788ef7a45e..72060b61277807 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 08caa8ed0f52e3..5c84bfb53f4914 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/gaudi/build_testing.patch b/var/spack/repos/builtin/packages/gaudi/build_testing.patch deleted file mode 100644 index ee736fd6dd47ba..00000000000000 --- 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 00000000000000..84d98517068596 --- /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 ++#include + #include + #include + #include +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 ++ + 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 + #include + ++#include ++ + #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 468c117b517379..00000000000000 --- 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 95339a09318478..00000000000000 --- 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 c401f1d3a9cdcd..b580eeec77c471 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,9 @@ 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") @@ -39,13 +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:") + 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") @@ -53,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( @@ -65,31 +68,53 @@ class Gaudi(CMakePackage): sha256="b05f6b7c1efb8c3af291c8d81fd1627e58af7c5f9a78a0098c6e3bfd7ec80c15", when="@37.1 ^catch2@3.1:", ) + # add missing 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 @@ -98,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") @@ -132,6 +157,10 @@ def cmake_args(self): # 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/gawk/package.py b/var/spack/repos/builtin/packages/gawk/package.py index 51d52619d471ea..8f0ef30ba0dfcb 100644 --- a/var/spack/repos/builtin/packages/gawk/package.py +++ b/var/spack/repos/builtin/packages/gawk/package.py @@ -30,6 +30,7 @@ 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") @@ -38,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 89388076ba695f..a77623f279e4a7 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 f5c36221b1c1c4..7046b8ff099f1d 100644 --- a/var/spack/repos/builtin/packages/gcc-runtime/package.py +++ b/var/spack/repos/builtin/packages/gcc-runtime/package.py @@ -54,10 +54,9 @@ class GccRuntime(Package): provides("libgfortran@5", when="%gcc@8:") depends_on("libc", type="link", when="platform=linux") - depends_on("libc", type="link", when="platform=cray") def install(self, spec, prefix): - if spec.platform in ["linux", "cray", "freebsd"]: + 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() diff --git a/var/spack/repos/builtin/packages/gcc/detection_test.yaml b/var/spack/repos/builtin/packages/gcc/detection_test.yaml index 7269c0301c1740..67b5bc1e129e0f 100644 --- a/var/spack/repos/builtin/packages/gcc/detection_test.yaml +++ b/var/spack/repos/builtin/packages/gcc/detection_test.yaml @@ -26,7 +26,7 @@ paths: extra_attributes: compilers: c: ".*/bin/gcc" - cxx: ".*/bin/g++" + cxx: ".*/bin/g\\+\\+" # Mock a version < 7 of GCC that requires -dumpversion and # errors with -dumpfullversion @@ -52,27 +52,6 @@ paths: cxx: ".*/bin/g[+][+]-5$" fortran: ".*/bin/gfortran-5$" -# 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" - platforms: [darwin, linux] - results: - - spec: "gcc@6.5.0 languages=c" - extra_attributes: - compilers: - c: ".*/bin/x86_64-linux-gnu-gcc-6$" - - spec: "gcc@10.1.0 languages=c,c++" - extra_attributes: - compilers: - c: ".*/bin/x86_64-linux-gnu-gcc-10$" - cxx: ".*/bin/x86_64-linux-gnu-g[+][+]-10$" - # Apple clang under disguise as gcc should not be detected - layout: - executables: @@ -94,3 +73,49 @@ paths: 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 18c3a6cf50e206..60b8d44b7a0a4f 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -3,11 +3,10 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import glob -import itertools import os import sys -from archspec.cpu import UnsupportedMicroarchitecture +import archspec.cpu import llnl.util.tty as tty from llnl.util.symlink import readlink @@ -34,18 +33,25 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage, CompilerPackage): 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") @@ -97,6 +103,10 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage, CompilerPackage): version("4.6.4", sha256="35af16afa0b67af9b8eb15cafb76d2bc5f568540552522f5dc2c88dd45d977e8") version("4.5.4", sha256="eef3f0456db8c3d992cbb51d5d32558190bc14f3bc19383dd93acc27acc6befc") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + depends_on("fortran", type="build") # generated + # 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. @@ -525,50 +535,26 @@ def supported_languages(self): fortran_names = ["gfortran"] d_names = ["gdc"] go_names = ["gccgo"] - compiler_prefixes = [r"\w+-\w+-\w+-"] compiler_suffixes = [r"-mp-\d+(?:\.\d+)?", r"-\d+(?:\.\d+)?", r"\d\d"] - compiler_version_regex = r"(? 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 - - result.append(exe) + # Apple's gcc is actually apple clang, so skip it. + 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 result + return exes_in_prefix @classmethod def determine_variants(cls, exes, version_str): @@ -607,7 +593,7 @@ def cc(self): 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 +604,7 @@ def cxx(self): 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 +615,7 @@ def fortran(self): 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 @@ -697,7 +683,7 @@ def get_common_target_flags(self, spec): for uarch in microarchitectures: try: return uarch.optimization_flags("gcc", str(spec.version)) - except UnsupportedMicroarchitecture: + except archspec.cpu.UnsupportedMicroarchitecture: pass # no arch specific flags in common, unlikely to happen. return "" @@ -725,7 +711,7 @@ def build_optimization_config(self): 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 +752,12 @@ def configure_args(self): 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 +832,7 @@ def configure_args(self): 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. @@ -933,13 +919,13 @@ def nvptx_install(self): @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"] @@ -993,33 +979,15 @@ def write_specs_file(self): tty.info(f"Wrote new spec file to {specs_file}") def setup_run_environment(self, env): - # Search prefix directory for possibly modified compiler names - from spack.compilers.gcc import Gcc as Compiler - - # Get the contents of the installed binary directory - bin_path = self.spec.prefix.bin - - if not os.path.isdir(bin_path): - return - - bin_contents = os.listdir(bin_path) + if self.spec.satisfies("languages=c"): + env.set("CC", self.cc) - # 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 - - abspath = os.path.join(bin_path, filename) - - # 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 @@ -1152,6 +1120,10 @@ def runtime_constraints(cls, *, spec, pkg): # The version of gcc-runtime is the same as the %gcc used to "compile" it 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 diff --git a/var/spack/repos/builtin/packages/gccxml/package.py b/var/spack/repos/builtin/packages/gccxml/package.py index 2b492412a25301..fba71f1f27ac6d 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 3c1b892fc59dee..837f54bc90c3cf 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 3b6098b1139e54..072c44606cdfbd 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 19b89f45e33ede..6fc6d60ff7e4dd 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 @@ def patch(self): 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 : + 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 @@ def cmake_args(self): 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 776a4b1c6abba2..d0cda7a4b3721a 100644 --- a/var/spack/repos/builtin/packages/gdal/package.py +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -32,6 +32,10 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): license("MIT") + 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") @@ -73,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") @@ -254,18 +262,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:") @@ -286,6 +298,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): # 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") @@ -297,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") @@ -304,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') @@ -321,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") @@ -333,6 +350,7 @@ 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') @@ -340,6 +358,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): # depends_on('lib-opencad', when='+opencad') depends_on("opencl", when="+opencl") 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") @@ -348,26 +367,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") @@ -380,17 +405,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") @@ -406,13 +434,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") @@ -475,7 +510,7 @@ def determine_version(cls, exe): 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) @@ -492,7 +527,7 @@ def setup_run_environment(self, env): 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) @@ -612,7 +647,7 @@ def with_or_without(self, name, variant=None, package=None, attribute=None): 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)) @@ -722,7 +757,7 @@ def configure_args(self): self.with_or_without("perl"), self.with_or_without("php"), ] - if "+iconv" in self.spec: + if self.spec.satisfies("+iconv"): if self.spec["iconv"].name == "libiconv": args.append(f"--with-libiconv-prefix={self.spec['iconv'].prefix}") else: @@ -764,7 +799,7 @@ def configure_args(self): ldflags = [] libs = [] - if "+hdf4" in self.spec: + if self.spec.satisfies("+hdf4"): hdf4 = self.spec["hdf"] if "+external-xdr" in hdf4 and hdf4["rpc"].name == "libtirpc": args.append("LIBS=" + hdf4["rpc"].libs.link_flags) @@ -797,19 +832,19 @@ def patch(self): 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 a93f2ab8e18a04..4b500ed36af40e 100644 --- a/var/spack/repos/builtin/packages/gdb/package.py +++ b/var/spack/repos/builtin/packages/gdb/package.py @@ -21,6 +21,7 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage): license("GPL-3.0-or-later AND LGPL-3.0-or-later") + version("14.2", sha256="2de5174762e959a5e529e20c20d88a04735469d8fffd98f61664e70b341dc47c") version("14.1", sha256="683e63182fb72bd5d8db32ab388143796370a8e3e71c26bc264effb487db7927") version("13.2", sha256="7ead13d9e19fa0c57bb19104e1a5f67eefa9fc79f2e6360de491e8fddeda1e30") version("13.1", sha256="4cc3d7143d6d54d289d227b1e7289dbc0fa4cbd46131ab87136e1ea831cf46d4") @@ -42,6 +43,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,10 +83,14 @@ 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:") @@ -112,7 +121,7 @@ def configure_args(self): 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)) @@ -120,7 +129,7 @@ def configure_args(self): @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 e2efcf9683a650..0d7bf356ccee04 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 97a57b6ce44fec..7c0c74201bea58 100644 --- a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py +++ b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py @@ -6,61 +6,55 @@ 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" + git = "https://gitlab.gnome.org/GNOME/gdk-pixbuf" 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="b9505b3445b9a7e48ced34760c3bcb73e966df3ac94c95a148cb669ab748e3c7") + # https://nvd.nist.gov/vuln/detail/CVE-2022-48622 version( - "2.40.0", - sha256="1582595099537ca8ff3b99c6804350b4c058bb8ad67411bbaae024ee7cead4e6", + "2.42.10", + sha256="ee9b6c75d13ba096907a2e3c6b27b61bcd17f5c7ebeab5a5b439d2f2e39fe44b", deprecated=True, ) version( - "2.38.2", - sha256="73fa651ec0d89d73dd3070b129ce2203a66171dfc0bd2caa3570a9c93d2d0781", + "2.42.9", + sha256="28f7958e7bf29a32d4e963556d241d0a41a6786582ff6a5ad11665e0347fc962", deprecated=True, ) version( - "2.38.0", - sha256="dd50973c7757bcde15de6bcd3a6d462a445efd552604ae6435a0532fbbadae47", + "2.42.6", + sha256="c4a6b75b7ed8f58ca48da830b9fa00ed96d668d3ab4b1f723dcf902f78bde77f", deprecated=True, ) version( - "2.31.2", - sha256="9e467ed09894c802499fb2399cd9a89ed21c81700ce8f27f970a833efb1e47aa", + "2.42.2", + sha256="83c66a1cfd591d7680c144d2922c5955d38b4db336d7cd3ee109f7bcf9afef15", 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 +62,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 b81062260df03c..79804fce3c0d3e 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 @@ def cmake_args(self): # 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 @@ def cmake_args(self): @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 e5a98dbd5fb390..c9b9640c6204ee 100644 --- a/var/spack/repos/builtin/packages/gdrcopy/package.py +++ b/var/spack/repos/builtin/packages/gdrcopy/package.py @@ -25,12 +25,25 @@ class Gdrcopy(MakefilePackage, CudaPackage): version("2.0", sha256="98320e6e980a7134ebc4eedd6cf23647104f2b3c557f2eaf0d31a02609f5f2b0") version("1.3", sha256="f11cdfe389b685f6636b80b4a3312dc014a385ad7220179c1318c60e2e28af3a") + 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 cef0167b3b60ea..5f0ede0e58db9a 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 @@ def cmake_args(self): 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 c4134e356a9453..201d2e8d88f79a 100644 --- a/var/spack/repos/builtin/packages/geant4-data/package.py +++ b/var/spack/repos/builtin/packages/geant4-data/package.py @@ -18,6 +18,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 +45,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", diff --git a/var/spack/repos/builtin/packages/geant4-vmc/package.py b/var/spack/repos/builtin/packages/geant4-vmc/package.py index 60e4bb866b412f..89bf862c534d43 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/package.py b/var/spack/repos/builtin/packages/geant4/package.py index 9a399e0900a684..a606c9c7e1cdcc 100644 --- a/var/spack/repos/builtin/packages/geant4/package.py +++ b/var/spack/repos/builtin/packages/geant4/package.py @@ -21,7 +21,16 @@ class Geant4(CMakePackage): executables = ["^geant4-config$"] 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") @@ -48,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:"), @@ -67,6 +78,7 @@ class Geant4(CMakePackage): 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:") @@ -93,7 +105,9 @@ 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) @@ -109,6 +123,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:") @@ -117,6 +132,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") @@ -125,6 +141,9 @@ class Geant4(CMakePackage): depends_on("vecgeom@1.1.0", when="@10.5.0:10.5") depends_on("vecgeom@0.5.2", when="@10.4.0:10.4") + with when("+hdf5"): + depends_on("hdf5 +threadsafe") + def std_when(values): for v in values: if isinstance(v, _ConditionalVariantValues): @@ -151,8 +170,13 @@ def std_when(values): 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 @@ -171,6 +195,9 @@ def std_when(values): # 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") @@ -262,7 +289,7 @@ def cmake_args(self): 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(self.define("GEANT4_BUILD_TLS_MODEL", "global-dynamic")) @@ -277,22 +304,26 @@ def cmake_args(self): 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 +opengl" in spec: + if spec.satisfies("+x11 +opengl"): options.append(self.define("GEANT4_USE_OPENGL_X11", True)) - if "+motif +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 00000000000000..6039025829665d --- /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(&(fLastInside.p)); +- tmpinside = const_cast(&(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(&(fLastNormal.p)); +- auto tmpnormal = const_cast(&(fLastNormal.vec)); +- auto tmpsurface = const_cast(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(&(fLastDistanceToInWithV.p)); +- tmpv = const_cast(&(fLastDistanceToInWithV.vec)); +- tmpdist = const_cast(&(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(&(fLastDistanceToIn.p)); +- tmpdist = const_cast(&(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(&(fLastDistanceToOutWithV.p)); +- tmpv = const_cast(&(fLastDistanceToOutWithV.vec)); +- tmpdist = const_cast(&(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(&(fLastDistanceToOut.p)); +- tmpdist = const_cast(&(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(&(fLastInside.p)); +- tmpin = const_cast(&(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(&(fLastNormal.p)); +- auto tmpnormal = const_cast(&(fLastNormal.vec)); +- auto tmpsurface = const_cast(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(&(fLastDistanceToInWithV.p)); +- tmpv = const_cast(&(fLastDistanceToInWithV.vec)); +- tmpdist = const_cast(&(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(&(fLastDistanceToIn.p)); +- tmpdist = const_cast(&(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(&(fLastDistanceToOutWithV.p)); +- tmpv = const_cast(&(fLastDistanceToOutWithV.vec)); +- tmpdist = const_cast(&(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(&(fLastDistanceToOut.p)); +- tmpdist = const_cast(&(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 c9cc7b7586dc90..3f25b066f5a21c 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 4558126bb12674..6f5226a325bfef 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 7005968e7d671a..d969ef3ceabd21 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 00000000000000..f18a478c3b7e00 --- /dev/null +++ b/var/spack/repos/builtin/packages/gem5/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 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 6a43842e0fd930..c144364d9e068a 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 cb56090e2e332a..e77e689b980149 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 8a344157fed7d5..0a65beaa6252c4 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 @@ def filter_sbang(self): 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 00000000000000..408152abc0a37d --- /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 ef52f73e5b884b..74e0b1ec2efa66 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 485693084f50c0..61ccc3dfe37644 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 @@ def configure_args(self): 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 @@ def setup_build_environment(self, env): 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 @@ def cached_tests_work_dir(self): 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 c4e7f4b4417f01..dad4a85e7b7d1b 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 6c0f3c6be25338..a580a7aa90c5e5 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 b445d8b23aafab..ed184b6d5b6e31 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 e7abda341b103c..1e949c89700c0e 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" @@ -130,17 +137,17 @@ def _configure_args(self, spec, prefix): "--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 e4c42ce2f6f046..2e1cce0f249f25 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 7a3d299e2aee5d..69cbd3cea323f5 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 59622cd79cdd38..4128923dbc1021 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 b36c194c921d61..6ddee5019d3ac9 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 51e828435624ec..bc1cb40498cd71 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 d7d1dc52934b36..ee49ea2f5d36b2 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 2e3b02833882b3..9a34a6953e8837 100644 --- a/var/spack/repos/builtin/packages/geoip/package.py +++ b/var/spack/repos/builtin/packages/geoip/package.py @@ -8,13 +8,23 @@ 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 index 3fb17ff571f445..9490c569e8aa53 100644 --- a/var/spack/repos/builtin/packages/geomodel/package.py +++ b/var/spack/repos/builtin/packages/geomodel/package.py @@ -14,12 +14,25 @@ class Geomodel(CMakePackage): 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") + 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" ) @@ -60,16 +73,12 @@ class Geomodel(CMakePackage): depends_on("opengl") def cmake_args(self): - def cmake_variant(cmake_label, spack_variant): - enabled = spec.satisfies("+" + spack_variant) - return f"-DGEOMODEL_BUILD_{cmake_label}={enabled}" - args = [ - cmake_variant("VISUALIZATION", "visualization"), - cmake_variant("GEOMODELG4", "geomodelg4"), - cmake_variant("FULLSIMLIGHT", "fullsimlight"), - cmake_variant("FSL", "fsl"), - cmake_variant("EXAMPLES", "examples"), - cmake_variant("TOOLS", "tools"), + 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"), ] return args diff --git a/var/spack/repos/builtin/packages/geopm-runtime/package.py b/var/spack/repos/builtin/packages/geopm-runtime/package.py index 99230e1d4c446c..74fb3736eebfe0 100644 --- a/var/spack/repos/builtin/packages/geopm-runtime/package.py +++ b/var/spack/repos/builtin/packages/geopm-runtime/package.py @@ -15,17 +15,22 @@ class GeopmRuntime(AutotoolsPackage): homepage = "https://geopm.github.io" git = "https://github.com/geopm/geopm.git" - url = "https://github.com/geopm/geopm/tarball/v3.0.1" + 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, description="Create man pages with Sphinx") + 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") @@ -53,33 +58,40 @@ class GeopmRuntime(AutotoolsPackage): # Autotools dependencies depends_on("automake", type="build") + depends_on("autoconf", type="build") depends_on("libtool", type="build") depends_on("file") - # Docs dependencies - 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 - 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") + 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", "develop"]: - depends_on(f"geopm-service@{ver}", type="build", when=f"@{ver}") + 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") @@ -92,29 +104,42 @@ class GeopmRuntime(AutotoolsPackage): 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 "+checkprogs" in self.spec: + if self.spec.satisfies("+checkprogs"): target += ["checkprogs"] return target def autoreconf(self, spec, prefix): bash = which("bash") - if not spec.version.isdevelop(): - # Required to workaround missing VERSION files - # from GitHub generated source tarballs - with open("VERSION_OVERRIDE", "w") as fd: - fd.write(f"{spec.version}") - bash("./autogen.sh") + 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"), - "--disable-geopmd-local", - f"--with-geopmd={self.spec['geopm-service'].prefix}", - ] + + 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") @@ -137,7 +162,7 @@ def setup_run_environment(self, env): lib_dir = self.prefix.lib env.prepend_path("LD_LIBRARY_PATH", lib_dir) - if "+checkprogs" in self.spec: + 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/package.py b/var/spack/repos/builtin/packages/geopm-service/package.py index 0798a0375ef804..2bfaa68a0026e6 100644 --- a/var/spack/repos/builtin/packages/geopm-service/package.py +++ b/var/spack/repos/builtin/packages/geopm-service/package.py @@ -18,17 +18,22 @@ class GeopmService(AutotoolsPackage): homepage = "https://geopm.github.io" git = "https://github.com/geopm/geopm.git" - url = "https://github.com/geopm/geopm/tarball/v3.0.1" + 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, description="Create man pages with Sphinx") + 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( @@ -62,27 +67,34 @@ class GeopmService(AutotoolsPackage): # Autotools dependencies depends_on("automake", type="build") + depends_on("autoconf", type="build") depends_on("libtool", type="build") depends_on("file") - # Docs dependencies - 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 - 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") + 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") @@ -93,15 +105,24 @@ class GeopmService(AutotoolsPackage): extends("python") - configure_directory = "service" + @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("service"): + 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_OVERRIDE", "w") as fd: + with open(version_file, "w") as fd: fd.write(f"{spec.version}") bash("./autogen.sh") @@ -121,7 +142,7 @@ def configure_args(self): args += self.enable_or_disable("levelzero") args += self.enable_or_disable("nvml") - if "+nvml" in self.spec: + if self.spec.satisfies("+nvml"): args += [ "--with-nvml=" + join_path( 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 75e19e2f5da8e3..00000000000000 --- a/var/spack/repos/builtin/packages/geopm/package.py +++ /dev/null @@ -1,142 +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", deprecated=True) - version("master", branch="master", deprecated=True) - version( - "1.1.0", - sha256="5f9a4df37ef0d64c53d64829d46736803c9fe614afd8d2c70fe7a5ebea09f88e", - deprecated=True, - ) - version( - "1.0.0", - sha256="24fe72265a7e44d62bdfe49467c49f0b7a649131ddda402d763c00a49765e1cb", - deprecated=True, - ) - version( - "0.6.1", - sha256="0ca42853f90885bf213df190c3462b8675c143cc843aee0d8b8a0e30802b55a9", - deprecated=True, - ) - version( - "0.6.0", - sha256="95ccf256c2b7cb35838978152479569d154347c3065af1639ed17be1399182d3", - deprecated=True, - ) - version( - "0.5.1", - sha256="db247af55f7000b6e4628af099956349b68a637500b9d4fe8d8fb13687124d53", - deprecated=True, - ) - version( - "0.5.0", - sha256="cdc123ea68b6d918dcc578a39a7a38275a5d711104364eb889abed15029f4060", - deprecated=True, - ) - version( - "0.4.0", - sha256="7d165f5a5fe0f19ca586bd81a4631202effb542e9d762cc9cc86ad6ef7afcad9", - deprecated=True, - ) - version( - "0.3.0", - sha256="73b45d36e7d2431d308038fc8c50a521a1d214c5ce105a17fba440f28509d907", - deprecated=True, - ) - - # 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 ae859c85b079fd..1359fdb8bce82c 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 @@ def cmake_args(self): 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 b4db62738ce4e0..f60f26c88c22a5 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -31,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") @@ -50,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")) @@ -80,7 +83,7 @@ def patch(self): # 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("@20:"): # libtextstyle/configure not present prior + 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", @@ -90,7 +93,7 @@ def patch(self): def flag_handler(self, name, flags): # this goes together with gl_cv_libxml_force_included=no - if name == "ldflags": + if name == "ldflags" and self.spec.satisfies("+libxml2"): flags.append("-lxml2") return (flags, None, None) @@ -122,12 +125,12 @@ def configure_args(self): else: config_args.append("--without-libiconv-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") @@ -138,7 +141,7 @@ def configure_args(self): 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 fc88a05935eb71..585fa110f20610 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 00000000000000..874b1f58d7f0ca --- /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 00000000000000..4b892903c5017a --- /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 88c66316cae13c..6b057b4d1c3414 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 58896451b2e340..c289d8a0e6c5b9 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 fbc0e846d98779..67f90a2654d2c3 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 a5dc64a92cf039..e478a8b8ed5efb 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 @@ def flag_handler(self, name, flags): if name == "fflags": flags.append("-Free") return (None, None, flags) + + def check(self): + with working_dir(self.builder.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 5bf8a00b9b1f69..6933b97ec5dabd 100644 --- a/var/spack/repos/builtin/packages/gftl-shared/package.py +++ b/var/spack/repos/builtin/packages/gftl-shared/package.py @@ -42,6 +42,8 @@ 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") diff --git a/var/spack/repos/builtin/packages/gftl/package.py b/var/spack/repos/builtin/packages/gftl/package.py index 490bac23c49423..207b297126bf90 100644 --- a/var/spack/repos/builtin/packages/gftl/package.py +++ b/var/spack/repos/builtin/packages/gftl/package.py @@ -57,6 +57,8 @@ 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") diff --git a/var/spack/repos/builtin/packages/gh/package.py b/var/spack/repos/builtin/packages/gh/package.py index ca768b4eb02553..fddbc6311b7337 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,7 @@ 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") @@ -43,14 +44,24 @@ class Gh(Package): 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 030edfe45b411f..ce99f529a17d94 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 9384b1e16fca07..843de73ad7861b 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 @@ def patch(self): ) 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 b28aed78931423..fc8b5b1ea9d84b 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 @@ def edit(self, spec, prefix): 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 e823df76d8f26e..8519d2a71c12ba 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 @@ def url_for_version(self, version): 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 @@ def configure_args(self): "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/package.py b/var/spack/repos/builtin/packages/ginkgo/package.py index 4e063cd9d24cc2..dd5dc4b557db94 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,6 +42,9 @@ 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") @@ -54,10 +58,11 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage): 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") @@ -101,7 +106,7 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage): ) # Probably fixed in NVIDIA/cccl#1528 which hopefully comes with the next CUDA release - conflicts("^cuda@12.4.0", when="+cuda", msg="CCCL 2.3 bug causes build failure.") + 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:") @@ -115,9 +120,16 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage): # 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 @@ -147,6 +159,8 @@ def cmake_args(self): 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 @@ -175,13 +189,13 @@ def cmake_args(self): 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)) @@ -199,7 +213,7 @@ def cmake_args(self): self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip) ) - if "+sycl" in self.spec: + 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 icpx compiler.") @@ -211,7 +225,7 @@ def extra_install_tests(self): @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.""" @@ -229,7 +243,7 @@ def _build_and_run_test(self, script): ] # 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 62df61d23e0fb0..2cecdfce1bfb31 100644 --- a/var/spack/repos/builtin/packages/git-annex/package.py +++ b/var/spack/repos/builtin/packages/git-annex/package.py @@ -124,7 +124,7 @@ def determine_version(cls, exe): 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 e2e9ffe793f960..5e22601b80bab9 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 bb6ea8fdac9cb0..da8c14c6ad170a 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -16,7 +16,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 +29,101 @@ 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.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.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 +143,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 +185,7 @@ def setup_build_environment(self, env): # 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 +200,7 @@ def setup_build_environment(self, env): # For build step: env.append_flags("EXTLIBS", curlconfig("--static-libs", output=str).strip()) - if "~perl" in spec: + if self.spec.satisfies("~perl"): env.append_flags("NO_PERL", "1") def configure_args(self): @@ -281,14 +216,14 @@ def configure_args(self): 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") @@ -306,7 +241,7 @@ def check(self): def build(self, spec, prefix): args = [] - if "~nls" in self.spec: + if self.spec.satisfies("~nls"): args.append("NO_GETTEXT=1") make(*args) @@ -316,7 +251,7 @@ def build(self, spec, prefix): def install(self, spec, prefix): args = ["install"] - if "~nls" in self.spec: + if self.spec.satisfies("~nls"): args.append("NO_GETTEXT=1") make(*args) @@ -328,11 +263,26 @@ def install(self, spec, prefix): @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 @@ -344,7 +294,7 @@ def install_manpages(self): @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)) @@ -357,7 +307,7 @@ def setup_run_environment(self, env): # 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 f42822459d0387..4499def68f4646 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 da229fbb7c921c..6826fd4fb00721 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") @@ -61,7 +63,7 @@ def cmake_args(self): if spec.satisfies("platform=windows"): options.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared")) - if "~doc" in spec: + 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/glab/package.py b/var/spack/repos/builtin/packages/glab/package.py index fb4d9007fb6fca..58ed827e1fd112 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,7 @@ class Glab(Package): license("MIT") + version("1.46.1", sha256="935f732ddacc6e54fc83d06351fc25454ac8a58c465c3efa43e066ea226257c2") version("1.36.0", sha256="8d6c759ebfe9c6942fcdb7055a4a5c7209a3b22beb25947f906c9aef3bc067e8") version("1.35.0", sha256="7ed31c7a9b425fc15922f83c5dd8634a2758262a4f25f92583378655fcad6303") version("1.33.0", sha256="447a9b76acb5377642a4975908f610a3082026c176329c7c8cfed1461d2e1570") @@ -31,18 +32,29 @@ 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:") + + 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 6e2e41779f385b..43db0431d236a5 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,15 +35,15 @@ def cmake_args(self): args = [ self.define("BUILD_UTILS", True), self.define("GLEW_REGAL", False), - self.define("GLEW_EGL", "gl=egl" in spec), + 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_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]]) ) @@ -76,4 +55,4 @@ def cmake_args(self): 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) + 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 4ed24a057343a8..ca2be8bdbb2f23 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 bdaadb3cfd915f..ba005f779c8fb0 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 998c0d7beed17e..d44f39fd5eb80d 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 ba46ce87f23dae..0ff19d9257209a 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -120,6 +120,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", @@ -289,20 +292,20 @@ class MesonBuilder(BaseBuilder, 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") @@ -336,7 +339,7 @@ def meson_args(self): class AutotoolsBuilder(BaseBuilder, 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") @@ -355,7 +358,7 @@ def configure_args(self): 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 72c70ca46aade7..db4dce7ec695c8 100644 --- a/var/spack/repos/builtin/packages/glibc/package.py +++ b/var/spack/repos/builtin/packages/glibc/package.py @@ -68,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") diff --git a/var/spack/repos/builtin/packages/glibmm/package.py b/var/spack/repos/builtin/packages/glibmm/package.py index 25b0ba95eae427..3e533d3551ef06 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 f16453f198d79d..85df3c25ed7663 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 3904efb2f4c7d7..8b78d03c82e541 100644 --- a/var/spack/repos/builtin/packages/glm/package.py +++ b/var/spack/repos/builtin/packages/glm/package.py @@ -24,6 +24,8 @@ class Glm(CMakePackage): 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:") diff --git a/var/spack/repos/builtin/packages/globalarrays/package.py b/var/spack/repos/builtin/packages/globalarrays/package.py index 700b712dab7460..bf7844924c70f8 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", @@ -71,7 +75,7 @@ def configure_args(self): "--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 00000000000000..982082bdf728ab --- /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 00000000000000..c141110d867f10 --- /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 00000000000000..454d3aab691001 --- /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 00000000000000..5b4d233015f3c3 --- /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 00000000000000..f95e69effb062a --- /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 00000000000000..f4a4f5e0355ea8 --- /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 00000000000000..1f63f68bc13f30 --- /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 00000000000000..a17c6def1c09d4 --- /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 00000000000000..9d68a84369cd34 --- /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 00000000000000..573859cdb4801e --- /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 00000000000000..c81d6128305971 --- /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 00000000000000..e8bfa9342be460 --- /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 00000000000000..006ff1cc7f189c --- /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 00000000000000..a49237f6b85497 --- /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 00000000000000..b2d16c4420245a --- /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 00000000000000..f47d9f37ec617d --- /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 00000000000000..0c3ce0dd5c3dd4 --- /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 00000000000000..0252b985b6fa0b --- /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 00000000000000..630de7603c94c1 --- /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 00000000000000..4a649591cdc281 --- /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 00000000000000..8b0eb093ade45d --- /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 00000000000000..bbd131f5b7a3d9 --- /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 eea294f4f85495..b38537f499936c 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,35 +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(f"--prefix={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 c01d99a8771f55..4d431020a87437 100644 --- a/var/spack/repos/builtin/packages/gloo/package.py +++ b/var/spack/repos/builtin/packages/gloo/package.py @@ -31,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( @@ -46,7 +48,14 @@ class Gloo(CMakePackage, CudaPackage): ) generator("ninja") + 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 index 979d56da20740a..2c20cfda216a68 100644 --- a/var/spack/repos/builtin/packages/glow/package.py +++ b/var/spack/repos/builtin/packages/glow/package.py @@ -33,8 +33,18 @@ class Glow(GoPackage): version("1.0.2", sha256="2d98c1e780d750b83d8da094de4c2a999c324021906e6d813b7c75d0320243c8") version("1.0.1", sha256="78d163bea8e6c13fb343f1e3586e93e0392e5052c408a248cc2f0fcc7aa38618") - def install(self, spec, prefix): - mkdirp(prefix.bin) - install("glow", prefix.bin) - mkdirp(prefix.completions) - install_tree(".", prefix.completions) + @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 2cd7426f7102cf..ea7a1047932236 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 5112cee7c66dd5..01834d01edde65 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 0df17e464a5d24..e104e4dea36e70 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 52a7822362801c..872be1a028fa06 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", diff --git a/var/spack/repos/builtin/packages/gmake/package.py b/var/spack/repos/builtin/packages/gmake/package.py index 95ea48276d0d4e..2e52b7e5ea9746 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") # generated 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,14 +79,18 @@ def configure_args(self): def install(self, spec, prefix): configure = Executable(join_path(self.stage.source_path, "configure")) - if self.spec.satisfies("@4.3"): - build_sh_dir = self.stage.source_path - else: - build_sh_dir = "./" - build_sh = Executable(join_path(build_sh_dir, "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 739e76f5fea51d..0ba006aa2ff102 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 c10f374153d419..0e62740defa8a3 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 c65558e0cca0c2..1fc0d934a6ddf3 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 d385de6a303233..df7a05e381ca54 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,10 @@ 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") # 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") @@ -60,6 +65,6 @@ def flag_handler(self, name, flags): 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 453ebf85ff4a6e..79517a3cf5bd7a 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -20,12 +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.0", sha256="0208110adb1792d1c59dcbcbea5d5ecb1272dfef63f69ceedb91923c40e1a652") + 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") @@ -42,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, @@ -72,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") diff --git a/var/spack/repos/builtin/packages/gmt/package.py b/var/spack/repos/builtin/packages/gmt/package.py index 02e3d1973e383c..be2b4ec5c74a8f 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 @@ def cmake_args(self): 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 @@ def cmake_args(self): ] ) - if "+glib" in spec: + if spec.satisfies("+glib"): args.extend( [ self.define("GLIB_INCLUDE_DIR", spec["glib"].headers.directories[0]), @@ -152,7 +155,7 @@ def cmake_args(self): ] ) - if "graphicsmagick" in spec: + if spec.satisfies("graphicsmagick"): args.extend( [ self.define("GM", spec["graphicsmagick"].prefix.bin.gm), @@ -160,7 +163,7 @@ def cmake_args(self): ] ) - 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 40de8de678a907..45495d1f11064a 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 f413ab30f7eb0e..41322d15641858 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 dcfa07c259e7d2..f9d1dded275bf7 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") @@ -72,7 +74,7 @@ class Gnina(CMakePackage, CudaPackage): def cmake_args(self): 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 a0420c6a4ab4e2..d999b073b909cf 100644 --- a/var/spack/repos/builtin/packages/gnuconfig/package.py +++ b/var/spack/repos/builtin/packages/gnuconfig/package.py @@ -21,6 +21,9 @@ class Gnuconfig(Package): maintainers("haampie") version("master", branch="master") + version( + "2024-07-27", sha256="1135044961853c7f116145cee9bb15c3d29b1b081cf8293954efd0f05d801a7c" + ) version( "2022-09-17", sha256="95306801ad7086e6a6e13397cb859183d8b7adbba2e372ce0819bad5fcb919b7" ) diff --git a/var/spack/repos/builtin/packages/gnupg/package.py b/var/spack/repos/builtin/packages/gnupg/package.py index 9b1a4c64db912a..859389b8503219 100644 --- a/var/spack/repos/builtin/packages/gnupg/package.py +++ b/var/spack/repos/builtin/packages/gnupg/package.py @@ -35,16 +35,23 @@ class Gnupg(AutotoolsPackage): 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("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") diff --git a/var/spack/repos/builtin/packages/gnuplot/package.py b/var/spack/repos/builtin/packages/gnuplot/package.py index 908f6812569de2..fc5f19f1ecc63c 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 @@ -44,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") @@ -88,12 +91,12 @@ def configure_args(self): 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" @@ -101,7 +104,7 @@ def configure_args(self): 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) @@ -131,22 +134,22 @@ def configure_args(self): 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") diff --git a/var/spack/repos/builtin/packages/gnuradio/package.py b/var/spack/repos/builtin/packages/gnuradio/package.py index cb4f86c7a8e264..515d765389d07f 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")) diff --git a/var/spack/repos/builtin/packages/gnutls/package.py b/var/spack/repos/builtin/packages/gnutls/package.py index 562866a2630a1a..d3ef1b8a32450f 100644 --- a/var/spack/repos/builtin/packages/gnutls/package.py +++ b/var/spack/repos/builtin/packages/gnutls/package.py @@ -33,8 +33,14 @@ 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") @@ -51,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") @@ -63,7 +70,7 @@ def url_for_version(self, version): 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): @@ -76,15 +83,9 @@ def configure_args(self): 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 27784763adb36c..108c8542524669 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. diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 08baa20a7330c2..0a7dffb912d6a5 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -41,66 +41,46 @@ class Go(Package): license("BSD-3-Clause") - version("1.22.2", sha256="374ea82b289ec738e968267cac59c7d5ff180f9492250254784b2044e90df5a9") - version("1.22.1", sha256="79c9b91d7f109515a25fc3ecdaad125d67e6bdb54f6d4d98580f46799caea321") - version("1.22.0", sha256="4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c") - version("1.21.6", sha256="124926a62e45f78daabbaedb9c011d97633186a33c238ffc1e25320c02046248") - version("1.21.5", sha256="285cbbdf4b6e6e62ed58f370f3f6d8c30825d6e56c5853c66d3c23bcdb09db19") - - # Deprecated Versions - # https://nvd.nist.gov/vuln/detail/CVE-2023-44487 + 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") + + # https://nvd.nist.gov/vuln/detail/CVE-2024-24790 + # https://nvd.nist.gov/vuln/detail/CVE-2024-24789 version( - "1.21.3", - sha256="186f2b6f8c8b704e696821b09ab2041a5c1ee13dcbc3156a13adcf75931ee488", + "1.22.2", + sha256="374ea82b289ec738e968267cac59c7d5ff180f9492250254784b2044e90df5a9", deprecated=True, ) - # https://nvd.nist.gov/vuln/detail/CVE-2023-39533 version( - "1.20.6", - sha256="62ee5bc6fb55b8bae8f705e0cb8df86d6453626b4ecf93279e2867092e0b7f70", + "1.22.1", + sha256="79c9b91d7f109515a25fc3ecdaad125d67e6bdb54f6d4d98580f46799caea321", deprecated=True, ) - # https://nvd.nist.gov/vuln/detail/CVE-2023-29405 version( - "1.20.4", - sha256="9f34ace128764b7a3a4b238b805856cc1b2184304df9e5690825b0710f4202d6", + "1.22.0", + sha256="4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c", deprecated=True, ) version( - "1.20.3", - sha256="e447b498cde50215c4f7619e5124b0fc4e25fb5d16ea47271c47f278e7aa763a", + "1.21.6", + sha256="124926a62e45f78daabbaedb9c011d97633186a33c238ffc1e25320c02046248", deprecated=True, ) version( - "1.19.11", - sha256="e25c9ab72d811142b7f41ff6da5165fec2d1be5feec3ef2c66bc0bdecb431489", - 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="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:") @@ -117,7 +97,7 @@ def determine_version(cls, exe): 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) @@ -125,13 +105,15 @@ def setup_build_environment(self, env): 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 00000000000000..881e7a75467e2f --- /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 2bcb87bda2f6f1..565a71c6bb48e0 100644 --- a/var/spack/repos/builtin/packages/gobject-introspection/package.py +++ b/var/spack/repos/builtin/packages/gobject-introspection/package.py @@ -24,10 +24,13 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage): 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:"), @@ -44,7 +47,7 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage): depends_on("cairo+gobject") depends_on("glib@2.78:", when="@1.78") depends_on("glib@2.76:", when="@1.76") - depends_on("glib@2.58:", when="@1.72") + 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") @@ -74,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. @@ -86,6 +92,12 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage): when="@:1.63.1", ) + 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) 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 00000000000000..c4d4985d644ab1 --- /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 74865bfcef6915..bad1c82d1c2044 100644 --- a/var/spack/repos/builtin/packages/goblin-hmc-sim/package.py +++ b/var/spack/repos/builtin/packages/goblin-hmc-sim/package.py @@ -15,7 +15,7 @@ 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 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 00000000000000..c9b1dc6f22eab6 --- /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 00000000000000..2c799cfde53ddc --- /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 7d83b65023347e..e698441f3c3741 100644 --- a/var/spack/repos/builtin/packages/goma/package.py +++ b/var/spack/repos/builtin/packages/goma/package.py @@ -18,6 +18,8 @@ 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") @@ -29,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 a40a09e66c6094..18b66dc957c98a 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 @@ def setup_build_environment(self, env): # 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 00000000000000..7a477505cc94ca --- /dev/null +++ b/var/spack/repos/builtin/packages/google-cloud-cpp/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 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.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="11", + values=("11", "14", "17", "20"), + multi=False, + description="Use the specified C++ standard when building.", + ) + + 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", + "-DGOOGLE_CLOUD_CPP_ENABLE:String=__ga_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 0cfd5075bfb5a9..5f73a46e80c0f2 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 4c523fd41b4292..d471cbe2f6c12d 100644 --- a/var/spack/repos/builtin/packages/googletest/package.py +++ b/var/spack/repos/builtin/packages/googletest/package.py @@ -27,6 +27,8 @@ class Googletest(CMakePackage): version("1.7.0", sha256="f73a6546fdf9fce9ff93a5015e0333a8af3062a152a9ad6bcb772c96687016cc") version("1.6.0", sha256="5fbc058e5b662b9c86d93ac76fefb58eec89cbf26144b49669a38ecb62758447") + depends_on("cxx", type="build") # generated + 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)") @@ -47,7 +49,7 @@ def cmake_args(self): 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"))) + 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 +66,7 @@ def install(self, spec, prefix): 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: 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 00000000000000..ba4959d9d9767c --- /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 ab60938f497270..9c49e53458f9c4 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 c148cf55ab8276..a8a75078835c47 100644 --- a/var/spack/repos/builtin/packages/gotcha/package.py +++ b/var/spack/repos/builtin/packages/gotcha/package.py @@ -17,6 +17,7 @@ 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") @@ -24,6 +25,9 @@ class Gotcha(CMakePackage): 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 e410159ff99d76..c957010155fc94 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 37c6eac63c224d..dbc49b8fcb0757 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 dbb1b2c3256aae..d69af609cce5b1 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 144ac5ddc8aa1d..8afbc078392df7 100644 --- a/var/spack/repos/builtin/packages/gperftools/package.py +++ b/var/spack/repos/builtin/packages/gperftools/package.py @@ -22,6 +22,7 @@ class Gperftools(AutotoolsPackage, CMakePackage): 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") @@ -34,6 +35,9 @@ class Gperftools(AutotoolsPackage, CMakePackage): 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", @@ -47,6 +51,8 @@ class Gperftools(AutotoolsPackage, CMakePackage): 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' @@ -68,6 +74,8 @@ def cmake_args(self): ), 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), ] diff --git a/var/spack/repos/builtin/packages/gpgme/package.py b/var/spack/repos/builtin/packages/gpgme/package.py index 6707d1fc3e1b24..444f21dedfa7c4 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 16167b43d01e54..70ca28ff4340ca 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 @@ def old_install(self, spec, prefix): 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 @@ def configure_args(self): 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 166e20c458c6bd..02e24a5052e1a0 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/gprolog/package.py b/var/spack/repos/builtin/packages/gprolog/package.py index 099e9b1af839ba..f8f9e5ec326d11 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 76e89e1e643a1e..70395d99bc55a6 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 @@ def configure_args(self): 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 f7647367b21823..dd047980593048 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 @@ def cmake_args(self): return args examples_src_dir = "examples" - src_dir = "GPTune" nodes = 1 cores = 4 @@ -97,45 +108,14 @@ def cmake_args(self): 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 @@ def test(self): 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 @@ def test(self): + '{\\"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 b673b851a80a30..8cc872ed6867ed 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 index 72fd4e6e8976f0..a4478cb9892e75 100644 --- a/var/spack/repos/builtin/packages/gpuscout/package.py +++ b/var/spack/repos/builtin/packages/gpuscout/package.py @@ -24,5 +24,7 @@ class Gpuscout(CMakePackage, CudaPackage): ) 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 cd47d34469a972..224f45f1ed99c7 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 93b5389646743b..96618a67855595 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 31f6d661eb293b..9d8b996d2aa849 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 5d36086c23874d..3da2aa95c9d100 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 e87b2ef93e1b62..63b0c4b5ce2e22 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 @@ def install(self, spec, prefix): "@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 @@ def install(self, spec, prefix): 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 10b69e7849baeb..243c06ae621674 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 43b7a153dc9a9e..5c004132e87af5 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 with the g2c library.") diff --git a/var/spack/repos/builtin/packages/grafana/package.py b/var/spack/repos/builtin/packages/grafana/package.py index 37f3b730640439..49f1ee7784d2c8 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 46cd8962fa1d03..af22fdce798fe5 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 e1a6131e885d24..c50344ff645edf 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 e67fd0b906a26d..1144bc3b1d406e 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 ae8609d1ea3dfd..e3713d294644db 100644 --- a/var/spack/repos/builtin/packages/graphicsmagick/package.py +++ b/var/spack/repos/builtin/packages/graphicsmagick/package.py @@ -28,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") @@ -39,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 10af88d825de9a..a1b69f5f49e498 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 3f8026b0488ab3..4aef29a5249068 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 0d9ad07e81fc6a..1e572833c88406 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 110746d9110359..ca3552c3fd2906 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -15,12 +15,17 @@ 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 @@ def setup_build_environment(self, env): # 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 @@ def configure_args(self): "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 01adc4587bcddd..d66a88b32937cc 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 @@ def configure_args(self): "--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 5a08cad458257c..1ff968569f99f8 100644 --- a/var/spack/repos/builtin/packages/grep/package.py +++ b/var/spack/repos/builtin/packages/grep/package.py @@ -20,6 +20,8 @@ class Grep(AutotoolsPackage): 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" @@ -30,7 +32,7 @@ class Grep(AutotoolsPackage): 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 70d3d2517d73c7..2f207025a95856 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 @@ def cmake_args(self): 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 @@ def cmake_args(self): 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 5708c29cc93cae..63f027806e849e 100644 --- a/var/spack/repos/builtin/packages/grib-util/package.py +++ b/var/spack/repos/builtin/packages/grib-util/package.py @@ -18,11 +18,15 @@ 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") @@ -33,7 +37,8 @@ class GribUtil(CMakePackage): 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.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") diff --git a/var/spack/repos/builtin/packages/grid/package.py b/var/spack/repos/builtin/packages/grid/package.py index 952d741b683676..9d1b6b3fe0f9c1 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 @@ def configure_args(self): 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 aa3ecdcbd1f102..882b065fb53734 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 ec25d8583128c4..8e96bc06ada787 100644 --- a/var/spack/repos/builtin/packages/groff/package.py +++ b/var/spack/repos/builtin/packages/groff/package.py @@ -21,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: @@ -40,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") @@ -77,7 +82,7 @@ def determine_version(cls, exe): 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 == "libiconv": args.append(f"--with-libiconv-prefix={self.spec['iconv'].prefix}") diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index e95e88c211f937..d273f42299d0f1 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -26,15 +26,18 @@ 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") + maintainers("mabraham", "eirrgang", "junghans") license("GPL-2.0-or-later", when="@:4.5") license("LGPL-2.1-or-later", when="@4.6:") 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") @@ -87,6 +90,10 @@ class Gromacs(CMakePackage, CudaPackage): version("4.6.7", sha256="6afb1837e363192043de34b188ca3cf83db6bd189601f2001a1fc5b0b2a214d9") version("4.5.5", sha256="e0605e4810b0d552a8761fef5540c545beeaf85893f4a6e21df9905a33f871ba") + 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)" ) @@ -109,7 +116,7 @@ class Gromacs(CMakePackage, CudaPackage): description="Enable multi-GPU FFT support with HeFFTe", ) variant("opencl", default=False, description="Enable OpenCL support") - variant("sycl", default=False, when="@2021:", description="Enable SYCL support") + variant("sycl", default=False, when="@2021: %clang", description="Enable SYCL support") variant( "intel-data-center-gpu-max", default=False, @@ -152,6 +159,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( @@ -161,7 +183,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:", ) variant( "sve", default=True, description="Enable SVE on aarch64 if available", when="target=a64fx" @@ -231,15 +253,15 @@ class Gromacs(CMakePackage, CudaPackage): # 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", + "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", @@ -296,6 +318,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( @@ -361,14 +384,14 @@ def patch(self): 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. @@ -404,6 +427,20 @@ def patch(self): 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") @@ -449,7 +486,7 @@ def cmake_args(self): # 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 @@ -505,40 +542,43 @@ def cmake_args(self): else: 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: @@ -548,28 +588,28 @@ def cmake_args(self): 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 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 @@ -645,7 +685,7 @@ def cmake_args(self): ) ) - 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") @@ -654,6 +694,16 @@ def cmake_args(self): 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 @@ -669,7 +719,7 @@ def cmake_args(self): 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]) @@ -677,14 +727,14 @@ def cmake_args(self): 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]) ) @@ -692,8 +742,22 @@ def cmake_args(self): # 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 5c83f6d2add231..0f58af9076078a 100644 --- a/var/spack/repos/builtin/packages/grpc/package.py +++ b/var/spack/repos/builtin/packages/grpc/package.py @@ -8,13 +8,16 @@ 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.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") @@ -44,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", @@ -59,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 1056f36a105c64..29b6288ecc8246 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 f25498a04acfbd..ac183664409ede 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 9cf520c06900fd..94c71553719ef5 100644 --- a/var/spack/repos/builtin/packages/gsibec/package.py +++ b/var/spack/repos/builtin/packages/gsibec/package.py @@ -32,6 +32,8 @@ class Gsibec(CMakePackage): variant("mkl", default=False, description="Use MKL for LAPACK implementation") + 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")) diff --git a/var/spack/repos/builtin/packages/gsl-lite/package.py b/var/spack/repos/builtin/packages/gsl-lite/package.py index cd00e0c38f2c3e..da92c0a27df032 100644 --- a/var/spack/repos/builtin/packages/gsl-lite/package.py +++ b/var/spack/repos/builtin/packages/gsl-lite/package.py @@ -27,6 +27,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 1c4732e1604588..6b17ec9e2e56a5 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 b8658064445fcf..45e3f4e1135d2f 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 @@ def install(self, spec, prefix): 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 @@ def install(self, spec, prefix): 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/gtfsort/package.py b/var/spack/repos/builtin/packages/gtfsort/package.py new file mode 100644 index 00000000000000..e74a3ae772e3d3 --- /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 470836b317ce4c..014cb2780589dd 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 eeddcc70e59e6f..924334c9cb3e45 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 a748baf9b9bef5..2c5363e735514f 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 638202b428e0c3..9b0a5fafaa7d6b 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 0cd813d6e250dd..07095b70de8dc2 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 640479d6d5526a..c805aa0dc3b8e3 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 846ed52df833f7..158d7adfd71f03 100644 --- a/var/spack/repos/builtin/packages/gtkplus/package.py +++ b/var/spack/repos/builtin/packages/gtkplus/package.py @@ -6,7 +6,7 @@ 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 +15,20 @@ 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", @@ -39,21 +50,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:") @@ -67,6 +85,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") @@ -82,20 +101,26 @@ def patch(self): ) # 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 = [] @@ -110,6 +135,13 @@ def meson_args(self): 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 = [ @@ -121,22 +153,10 @@ def configure_args(self): "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 d9607d34a5263d..14d60531a12dc1 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 a5883016d9b5d7..c3598ceb747d69 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 7b1cb8d11cd5f4..1aed681f84ee2f 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 39f0e19bebb84e..0b0805dcc13373 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 2103145fef9362..170b0f92bae96a 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 @@ def configure_args(self): "--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 19813e6d199fb1..bcb9189aac12a8 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 @@ def install(self, spec, prefix): 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/gxsview/package.py b/var/spack/repos/builtin/packages/gxsview/package.py index a0418477527625..d50fe08e3cd2eb 100644 --- a/var/spack/repos/builtin/packages/gxsview/package.py +++ b/var/spack/repos/builtin/packages/gxsview/package.py @@ -24,6 +24,9 @@ class Gxsview(QMakePackage): license("LGPL-3.0-only") + version( + "2024.03.15", sha256="5a6e6384a79fc2f39370846814f049b6c4c32f418cb00363cfb18bc1b6598d3a" + ) version( "2023.05.29", sha256="1e768fd7afd22198b7f73adeb42f4ccf7e0ff68996a3843b1ea138225c4c1da3" ) @@ -40,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" @@ -57,16 +65,19 @@ def qmake_args(self): 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 "^vtk@9:" in self.spec: + if self.spec.satisfies("^vtk@9:"): fic = "vtk9.pri" else: fic = "vtk8.pri" 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 00000000000000..afe6990e451de0 --- /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 // for coloring ++#include + + #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 + #include + #include +-#include ++// #include + #include + #include + #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 11d8f898450531..2a8978907604a3 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 c367bbaf8ebae7..0c1b9568ba4e42 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 9d793f32ebf367..5e299f062a804a 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 35aa847b0f4642..d400a3cef4f941 100644 --- a/var/spack/repos/builtin/packages/h5hut/package.py +++ b/var/spack/repos/builtin/packages/h5hut/package.py @@ -19,6 +19,10 @@ class H5hut(AutotoolsPackage): 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") @@ -39,7 +43,7 @@ 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): @@ -55,10 +59,10 @@ 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", @@ -67,7 +71,7 @@ def configure_args(self): ] ) - 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 93a38c3c8e5659..10e4a2802dee88 100644 --- a/var/spack/repos/builtin/packages/h5utils/package.py +++ b/var/spack/repos/builtin/packages/h5utils/package.py @@ -23,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") @@ -44,17 +47,17 @@ def configure_args(self): spec = self.spec args = [] - if "+vis5d" in spec: + 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 a9c1f86974b19f..f1979dd6ae84f7 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 @@ def make_defs(self): "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 bce59ef2ba663c..df24131f5de97b 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 01bae2a3866593..5f0c02b4cb6d25 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 6a02fa73a262a6..319bcb0c1677ff 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 439301c38ecf87..fe15a4acedec66 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 d3d1212f45a0dd..3dfd038f016cee 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 06461380fb5b73..8fc8ec46039e41 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 fd812e3662fd12..df6832bf914140 100644 --- a/var/spack/repos/builtin/packages/halide/package.py +++ b/var/spack/repos/builtin/packages/halide/package.py @@ -15,13 +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") - version("16.0.0", sha256="a0cccee762681ea697124b8172dd65595856d0fa5bd4d1af7933046b4a085b04") - version("17.0.0", sha256="7e5a526b4074887b528d25b0265ddfa92c0a6d8bfdfbbba536313ecddf352da3") - version("17.0.1", sha256="beb18331d9e4b6f69943bcc75fb9d923a250ae689f09f6940a01636243289727") + depends_on("c", type="build") + depends_on("cxx", type="build") variant( "build_type", default="Release", @@ -65,6 +69,8 @@ class Halide(CMakePackage, PythonExtension): 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) @@ -76,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") @@ -111,7 +118,7 @@ def cmake_args(self): 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("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 620f297cd66185..c9a5635761b077 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 e682b9728f0d64..23ad029ae8c50c 100644 --- a/var/spack/repos/builtin/packages/haproxy/package.py +++ b/var/spack/repos/builtin/packages/haproxy/package.py @@ -19,6 +19,8 @@ class Haproxy(MakefilePackage): 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 66e0cbbf0b3b09..a84b18e9795b2a 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 cb38e0dfcf65f2..47e595c6d88128 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,7 +24,12 @@ class Harfbuzz(MesonPackage, AutotoolsPackage): license("MIT") + 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") @@ -70,6 +79,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", @@ -78,12 +90,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") @@ -116,6 +131,7 @@ 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")) + @when("@:8") def patch(self): change_sed_delimiter("@", ";", "src/Makefile.in") @@ -130,12 +146,14 @@ 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" - meson_args = [ + config_args = [ # disable building of gtk-doc files following #9885 and #9771 "-Ddocs=disabled", + "-Dfreetype=enabled", f"-Dgraphite2={graphite2}", f"-Dcoretext={coretext}", ] + libs = [] pc = which("pkg-config") deps = {"zlib": "~shared", "bzip": "~shared", "libpng": "libs=static", "cairo": "~shared"} @@ -143,10 +161,12 @@ def meson_args(self): if self.spec.satisfies(f"^{dep} {deps[dep]}"): libs.append(pc(dep, "--static", "--libs", output=str).strip()) if libs: - meson_args.append("-Dc_link_args=%s" % " ".join(libs)) - meson_args.append("-Dcpp_link_args=%s" % " ".join(libs)) + config_args.append("-Dc_link_args=%s" % " ".join(libs)) + config_args.append("-Dcpp_link_args=%s" % " ".join(libs)) - return meson_args + if IS_WINDOWS: + config_args.extend(["-Dcairo=disabled", "-Dglib=disabled"]) + return config_args class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder, SetupEnvironment): diff --git a/var/spack/repos/builtin/packages/harminv/package.py b/var/spack/repos/builtin/packages/harminv/package.py index 3bff34a9197da9..dcd2bfa7256efc 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 56d615a9cca9a8..9cb2c3f9b91662 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 5c806639799e9a..8b0c9922a2c60e 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 60eb0b1018463e..29725b6f379f7a 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 5fff62e4c0ee25..2c3aa4fdca898f 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/package.py b/var/spack/repos/builtin/packages/hdf-eos2/package.py index 1b41abbf6509dc..aae0b559cf34f1 100644 --- a/var/spack/repos/builtin/packages/hdf-eos2/package.py +++ b/var/spack/repos/builtin/packages/hdf-eos2/package.py @@ -71,7 +71,7 @@ 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") @@ -151,15 +151,15 @@ def configure_args(self): # Provide config args for dependencies extra_args.append("--with-hdf4={0}".format(self.spec["hdf"].prefix)) - if "jpeg" 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 "szip" in self.spec: + 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 d459ccb0f235e8..2af16da1ca108a 100644 --- a/var/spack/repos/builtin/packages/hdf-eos5/package.py +++ b/var/spack/repos/builtin/packages/hdf-eos5/package.py @@ -107,9 +107,9 @@ def configure_args(self): # 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 8e51dab8169f55..9f1f8967bf6d0b 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,7 +121,7 @@ def libs(self): 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) @@ -130,15 +134,15 @@ def libs(self): 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 == "libtirpc": + 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": @@ -175,12 +179,12 @@ def configure_args(self): 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 == "libtirpc": # We should not specify '--disable-hdf4-xdr' due to a bug in the @@ -227,7 +231,7 @@ def remove_ncgen_ncdump(self): 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 d99e9bbd3aebb5..d7002e66313e29 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 28ab546bd4773c..17da8e1206fa12 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 fd94f588d587d8..1fb1ff16cca642 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 e5f086b88a7f1c..d6882f3d281c92 100644 --- a/var/spack/repos/builtin/packages/hdf5-vol-cache/package.py +++ b/var/spack/repos/builtin/packages/hdf5-vol-cache/package.py @@ -19,6 +19,9 @@ 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") 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 6fe945bb024187..284ac473e865a9 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 e7892a705d37fa..9e97f6e58defd7 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 3864e6ec3c5a5f..0f5a7dbb639488 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 00000000000000..73b65e826d598e --- /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/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 1249424c972c65..213de9d0bad189 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") @@ -38,7 +38,8 @@ class Hdf5(CMakePackage): # 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-1.17", branch="develop") + version("develop-1.16", branch="hdf5_1_16") version("develop-1.14", branch="hdf5_1_14") version("develop-1.12", branch="hdf5_1_12") version("develop-1.10", branch="hdf5_1_10") @@ -46,14 +47,37 @@ 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", + 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", + 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", + url="https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_0/downloads/hdf5-1.14.0.tar.gz", ) - version("1.14.2", sha256="1c342e634008284a8c2794c8e7608e2eaf26d01d445fb3dfd7f33cb2fb51ac53") - version("1.14.1-2", sha256="cbe93f275d5231df28ced9549253793e40cd2b555e3d288df09d7b89a9967b07") - version("1.14.0", sha256="a571cc83efda62e1a51a0a912dd916d01895801c5025af91669484a1575a6ef4") version("1.12.3", sha256="c15adf34647918dd48150ea1bd9dffd3b32a3aec5298991d56048cc3d39b4f6f") version("1.12.2", sha256="2a89af03d56ce7502dcae18232c241281ad1773561ec00c0f0e8ee2463910f14") version("1.12.1", sha256="79c66ff67e666665369396e9c90b32e238e501f345afd2234186bfb8331081ca") @@ -86,6 +110,10 @@ class Hdf5(CMakePackage): version("1.8.12", sha256="b5cccea850096962b5fd9e96f22c4f47d2379224bb41130d9bc038bb6c37dfcb") version("1.8.10", sha256="4813b79c5fb8701a625b9924b8203bc7154a77f9b826ad4e034144b4056a160a") + 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("hl", default=False, description="Enable the high-level library") @@ -118,11 +146,17 @@ class Hdf5(CMakePackage): 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") # https://github.com/spack/spack/issues/37955 @@ -162,6 +196,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. @@ -279,22 +319,14 @@ def patch(self): # 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): @@ -302,7 +334,12 @@ def flag_handler(self, name, flags): 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") @@ -313,13 +350,9 @@ def flag_handler(self, name, flags): cmake_flags.append(self.compiler.cc_pic_flag) if spec.satisfies("@1.8.21 %oneapi@2023.0.0"): cmake_flags.append("-Wno-error=int-conversion") - if spec.satisfies("%apple-clang@15:"): - cmake_flags.append("-Wl,-ld_classic") elif name == "cxxflags": if spec.satisfies("@:1.8.12+cxx~shared"): cmake_flags.append(self.compiler.cxx_pic_flag) - if spec.satisfies("%apple-clang@15:"): - cmake_flags.append("-Wl,-ld_classic") elif name == "fflags": if spec.satisfies("%cce+fortran"): # Cray compiler generates module files with uppercase names by @@ -330,7 +363,7 @@ def flag_handler(self, name, flags): 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) @@ -348,7 +381,7 @@ def libs(self): """ 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 @@ -489,7 +522,7 @@ def setup_run_environment(self, env): @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) @@ -536,7 +569,7 @@ def cmake_args(self): # 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, @@ -546,7 +579,7 @@ def cmake_args(self): ] ) - if "+fortran" in spec: + if spec.satisfies("+fortran"): args.extend(["-DMPI_Fortran_COMPILER:PATH=%s" % spec["mpi"].mpifc]) args.extend(["-DCMAKE_Fortran_COMPILER:PATH=%s" % spec["mpi"].mpifc]) @@ -554,6 +587,10 @@ def cmake_args(self): 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") @@ -625,13 +662,25 @@ def fix_package_config(self): 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) + @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 e24689594327d1..305bd289772fbe 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 76073a2e3b03f4..72db8410e61944 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 @@ def patch(self): 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 @@ def configure_args(self): 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 d106f92bc937eb..fd6d9ed5b41023 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") @@ -96,7 +101,7 @@ def cmake_args(self): 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,7 +112,7 @@ def cmake_args(self): 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 @@ -125,7 +130,7 @@ def setup_smoke_test(self): 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 @@ def test_make_test(self): 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 00000000000000..dce08369e461b9 --- /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 040b828cca7686..5129bd1bc3dfbe 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 02dd3ed58831dd..072e746c861705 100644 --- a/var/spack/repos/builtin/packages/helics/package.py +++ b/var/spack/repos/builtin/packages/helics/package.py @@ -23,6 +23,7 @@ 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") @@ -49,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") @@ -138,7 +142,9 @@ def cmake_args(self): # 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")) @@ -146,13 +152,17 @@ def cmake_args(self): 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")) @@ -174,5 +184,5 @@ def cmake_args(self): 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 f5b41627f9b510..3688260cb15318 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 d1be8ba2cd234e..4b7eb9bb63a950 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") diff --git a/var/spack/repos/builtin/packages/hepmc/package.py b/var/spack/repos/builtin/packages/hepmc/package.py index a1194a79381fc0..161220d85476f4 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 a3f96d95c5c51b..52759ac037d66d 100644 --- a/var/spack/repos/builtin/packages/hepmc3/package.py +++ b/var/spack/repos/builtin/packages/hepmc3/package.py @@ -16,10 +16,11 @@ 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") @@ -31,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 @@ -44,7 +49,9 @@ 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") @@ -55,14 +62,14 @@ 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( [ @@ -71,7 +78,13 @@ def cmake_args(self): ] ) - 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 2b66581b9c5883..e23a30323bba36 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 5f066f44d3ddb6..fe7164905f6eed 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 00000000000000..f93300553af0a0 --- /dev/null +++ b/var/spack/repos/builtin/packages/hermes-shm/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 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("pkgconfig", 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 ef33ea207b2bec..fa04336fc6cb2d 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 960656ee6b59f6..bac7b7c4e4c3fc 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 b1d2cd12eb4e61..85c42af5c4c56a 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 b29903e95e5f3a..9e4dcfa2ecc2d5 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 index 25dd1851faecc2..a76e4b6a761555 100644 --- a/var/spack/repos/builtin/packages/heyoka/package.py +++ b/var/spack/repos/builtin/packages/heyoka/package.py @@ -18,6 +18,14 @@ class Heyoka(CMakePackage): # 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") @@ -29,6 +37,8 @@ class Heyoka(CMakePackage): 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") @@ -47,9 +57,12 @@ class Heyoka(CMakePackage): depends_on("cmake@3.18:", type="build") # Required dependencies - depends_on("llvm@13:17") + 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") + depends_on("fmt@9:10", when="@:5") + depends_on("fmt@9:11", when="@6") depends_on("spdlog") depends_on("intel-tbb@2021.4.0:") diff --git a/var/spack/repos/builtin/packages/hh-suite/package.py b/var/spack/repos/builtin/packages/hh-suite/package.py index 1283c8472b0b41..66496a89811bb2 100644 --- a/var/spack/repos/builtin/packages/hh-suite/package.py +++ b/var/spack/repos/builtin/packages/hh-suite/package.py @@ -21,6 +21,9 @@ 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") @@ -34,7 +37,7 @@ class HhSuite(CMakePackage): 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 7cfd6c36728344..c599dbec39946c 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 00000000000000..daf3f5da39a478 --- /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 e1af063055ee36..34266ca7d9c34a 100644 --- a/var/spack/repos/builtin/packages/highfive/package.py +++ b/var/spack/repos/builtin/packages/highfive/package.py @@ -19,6 +19,7 @@ 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") @@ -41,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") @@ -55,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 3c7fd5ff578790..d36d9b6080b4ee 100644 --- a/var/spack/repos/builtin/packages/highway/package.py +++ b/var/spack/repos/builtin/packages/highway/package.py @@ -14,6 +14,7 @@ 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") @@ -24,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 8dad7acc99c662..e86c65a62c3270 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 4364d0eeb303f8..1b29d8b3acdcbb 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 * @@ -24,6 +22,9 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") # 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 ) @@ -72,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( @@ -124,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") @@ -134,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") @@ -149,8 +160,10 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage): # 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") @@ -168,7 +181,7 @@ def cmake_args(self): 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( @@ -198,7 +211,7 @@ def cmake_args(self): 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"), ] ) @@ -208,7 +221,7 @@ def cmake_args(self): # 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), @@ -227,7 +240,7 @@ def cmake_args(self): # 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)) @@ -240,7 +253,7 @@ def cmake_args(self): # 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 @@ -248,7 +261,7 @@ def cmake_args(self): 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 @@ -256,7 +269,7 @@ def cmake_args(self): # 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 @@ -266,37 +279,35 @@ def cmake_args(self): # # 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 22f5705389649a..279ecb4ddde96f 100644 --- a/var/spack/repos/builtin/packages/hip-examples/package.py +++ b/var/spack/repos/builtin/packages/hip-examples/package.py @@ -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/package.py b/var/spack/repos/builtin/packages/hip-rocclr/package.py index cd9f409da9e400..420e3954becf88 100644 --- a/var/spack/repos/builtin/packages/hip-rocclr/package.py +++ b/var/spack/repos/builtin/packages/hip-rocclr/package.py @@ -28,37 +28,24 @@ 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") 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("numactl", type="link") - 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", - "master", - ]: + 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}") @@ -73,11 +60,6 @@ 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"), ]: resource( name="opencl-on-vdi", diff --git a/var/spack/repos/builtin/packages/hip-tensor/package.py b/var/spack/repos/builtin/packages/hip-tensor/package.py index 03a3315d1e26a9..697a73f78f075c 100644 --- a/var/spack/repos/builtin/packages/hip-tensor/package.py +++ b/var/spack/repos/builtin/packages/hip-tensor/package.py @@ -11,25 +11,41 @@ class HipTensor(CMakePackage, ROCmPackage): homepage = "https://github.com/ROCm/hipTensor" git = "https://github.com/ROCm/hipTensor.git" - url = "https://github.com/ROCm/hipTensor/archive/refs/tags/rocm-6.0.2.tar.gz" + 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.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") - variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") + depends_on("cxx", type="build") # generated - for ver in ["5.7.0", "5.7.1", "6.0.0", "6.0.2", "6.1.0", "master"]: + 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", + "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"]: + for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: depends_on(f"hipcc@{ver}", when=f"@{ver}") def setup_build_environment(self, env): 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 9308e8635c534d..00000000000000 --- 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 3c44a29bbd7298..00000000000000 --- 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 -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 e332f90ee4e6d0..00000000000000 --- 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 -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/package.py b/var/spack/repos/builtin/packages/hip/package.py index 8beeb5cbe5ebf9..91dc94d33c9008 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -18,7 +18,7 @@ class Hip(CMakePackage): homepage = "https://github.com/ROCm/HIP" git = "https://github.com/ROCm/HIP.git" - url = "https://github.com/ROCm/HIP/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/HIP/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath", "haampie") @@ -27,6 +27,10 @@ class Hip(CMakePackage): license("MIT") version("master", branch="master") + 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") @@ -36,21 +40,22 @@ class Hip(CMakePackage): 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") with default_args(deprecated=True): - 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.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("cuda", when="+cuda") @@ -63,12 +68,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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -82,6 +84,10 @@ class Hip(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") @@ -102,6 +108,10 @@ class Hip(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on(f"hipify-clang@{ver}", when=f"@{ver}") @@ -115,14 +125,22 @@ class Hip(CMakePackage): "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"@{ver}") + # hipcc likes to add `-lnuma` by default :( # 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"]: - depends_on(f"hipcc@{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"]: + depends_on(f"hipcc@{ver}", when=f"@{ver}") + + for ver in ["6.2.0", "6.2.1"]: + depends_on(f"rocprofiler-register@{ver}", when=f"@{ver}") # roc-obj-ls requirements depends_on("perl-file-which") @@ -136,11 +154,6 @@ 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"), ]: resource( name="hipamd", @@ -159,11 +172,6 @@ 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"), ]: resource( name="opencl", @@ -181,11 +189,6 @@ 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"), ]: resource( name="rocclr", @@ -198,6 +201,10 @@ class Hip(CMakePackage): ) # Add hip-clr sources thru the below for d_version, d_shasum in [ + ("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"), @@ -247,8 +254,32 @@ class Hip(CMakePackage): placement="hipcc", when=f"@{d_version}", ) + # Add hipother sources thru the below + for d_version, d_shasum in [ + ("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.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"), @@ -266,27 +297,11 @@ class Hip(CMakePackage): placement="hip-tests", when=f"@{d_version}", ) - 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") - 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") @@ -357,13 +372,14 @@ def get_paths(self): "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, @@ -373,14 +389,9 @@ def get_paths(self): "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 @@ -406,6 +417,8 @@ def set_variables(self, env): 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 @@ -462,6 +475,19 @@ def set_variables(self, env): 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) @@ -546,25 +572,46 @@ def cmake_args(self): ) 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")) args.append(self.define("HIP_COMMON_DIR", self.stage.source_path)) args.append(self.define("HIP_CATCH_TEST", "OFF")) - if "@:5.5" in self.spec: + 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("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 "@5.6:5.7" in self.spec: + if self.spec.satisfies("@5.6:5.7"): args.append(self.define("HIPCC_BIN_DIR", self.stage.source_path + "/hipcc/bin")), - if "@6.0:" in self.spec: + if self.spec.satisfies("@6.0:"): args.append(self.define("HIPCC_BIN_DIR", self.spec["hipcc"].prefix.bin)), return args @@ -580,29 +627,18 @@ def install_samples(self): 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 70ca72c6215a9c..8b805fd47485db 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/package.py b/var/spack/repos/builtin/packages/hipblas/package.py index 619c1fc1affd5f..1e928b27d5f5c2 100644 --- a/var/spack/repos/builtin/packages/hipblas/package.py +++ b/var/spack/repos/builtin/packages/hipblas/package.py @@ -24,6 +24,10 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") + 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") @@ -33,16 +37,15 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage): 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") with default_args(deprecated=True): - 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.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 @@ -67,23 +70,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("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:5.7") depends_on("rocm-cmake@4.5.0:", type="build") - for ver in ["6.0.0", "6.0.2", "6.1.0"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0"]: 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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -97,6 +97,10 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", "develop", ]: @@ -130,22 +134,18 @@ def cmake_args(self): # 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: - args.append( - self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip) - ) - + 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): - exe = Executable(join_path(self.build_directory, "clients", "staging", "hipblas-test")) + def check(self): + exe = Executable( + join_path(self.builder.build_directory, "clients", "staging", "hipblas-test") + ) exe("--gtest_filter=-*known_bug*") 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 00000000000000..33b2e797872c83 --- /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 +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 + $ + $ # may be blank if not used + $ ++ $ + ) + 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/package.py b/var/spack/repos/builtin/packages/hipblaslt/package.py index 36df9a0ca8ad49..c70d6a001bbfe6 100644 --- a/var/spack/repos/builtin/packages/hipblaslt/package.py +++ b/var/spack/repos/builtin/packages/hipblaslt/package.py @@ -11,16 +11,22 @@ class Hipblaslt(CMakePackage): 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.0.2.tar.gz" + 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.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( @@ -31,7 +37,7 @@ class Hipblaslt(CMakePackage): ) variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") - for ver in ["6.0.0", "6.0.2"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: 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}") @@ -44,14 +50,17 @@ class Hipblaslt(CMakePackage): # 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") + 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", "V3"), + 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), 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 00000000000000..22b386136b97c5 --- /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 +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 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 index e49f0552041d1f..74b90fafe03745 100644 --- 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 @@ -1,25 +1,24 @@ diff --git a/bin/hipcc.pl b/bin/hipcc.pl -index 513a427..cd2d6ac 100755 +index 513a427..780dc5c 100755 --- a/bin/hipcc.pl +++ b/bin/hipcc.pl -@@ -160,11 +160,14 @@ if ($HIP_PLATFORM eq "amd") { +@@ -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 -+ $LLVM_PATH= $ENV{'LLVM_PATH'}; -+ $HIPCC="${LLVM_PATH}/bin/clang++" . $execExtension; ++ $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); -+ $LLVM_PATH= $ENV{'LLVM_PATH'}; -+ $HIPCC="${LLVM_PATH}/bin/clang" . $execExtension; ++ $HIPCC="${HIP_CLANG_PATH}/clang" . $execExtension; $HIPLDFLAGS = "--driver-mode=g++"; } # to avoid using dk linker or MSVC linker -@@ -484,7 +487,8 @@ if($HIP_PLATFORM eq "amd"){ +@@ -484,7 +486,8 @@ if($HIP_PLATFORM eq "amd"){ $targetsStr = $ENV{HCC_AMDGPU_TARGET}; } elsif (not $isWindows) { # Else try using rocm_agent_enumerator 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 index 3b9c3aa22841c1..5bd44f33b88958 100644 --- 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 @@ -1,26 +1,24 @@ diff --git a/amd/hipcc/bin/hipcc.pl b/amd/hipcc/bin/hipcc.pl -index 513a427..ffeafaa 100755 +index 513a427..780dc5c 100755 --- a/amd/hipcc/bin/hipcc.pl +++ b/amd/hipcc/bin/hipcc.pl -@@ -160,11 +160,15 @@ if ($HIP_PLATFORM eq "amd") { +@@ -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 -+ $LLVM_PATH= $ENV{'LLVM_PATH'}; -+ $HIPCC="${LLVM_PATH}/bin/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); -+ $LLVM_PATH= $ENV{'LLVM_PATH'}; -+ $HIPCC="${LLVM_PATH}/bin/clang" . $execExtension; ++ $HIPCC="${HIP_CLANG_PATH}/clang" . $execExtension; $HIPLDFLAGS = "--driver-mode=g++"; } # to avoid using dk linker or MSVC linker -@@ -484,7 +488,8 @@ if($HIP_PLATFORM eq "amd"){ +@@ -484,7 +486,8 @@ if($HIP_PLATFORM eq "amd"){ $targetsStr = $ENV{HCC_AMDGPU_TARGET}; } elsif (not $isWindows) { # Else try using rocm_agent_enumerator diff --git a/var/spack/repos/builtin/packages/hipcc/package.py b/var/spack/repos/builtin/packages/hipcc/package.py index 95e35efefc0445..d793d39af6a413 100644 --- a/var/spack/repos/builtin/packages/hipcc/package.py +++ b/var/spack/repos/builtin/packages/hipcc/package.py @@ -24,17 +24,25 @@ def url_for_version(self, version): maintainers("srekolam", "renjithravindrankannath", "afzpatel") license("MIT") - + 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("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): 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 eacfcc645d9edf..00000000000000 --- 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 88d345b0a7b62e..5a85b8eb581387 100644 --- a/var/spack/repos/builtin/packages/hipcub/package.py +++ b/var/spack/repos/builtin/packages/hipcub/package.py @@ -11,12 +11,16 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/ROCm/hipCUB" git = "https://github.com/ROCm/hipCUB.git" - url = "https://github.com/ROCm/hipCUB/archive/rocm-6.0.2.tar.gz" + 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.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") @@ -26,16 +30,13 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage): 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") with default_args(deprecated=True): - 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.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 @@ -60,11 +61,6 @@ class Hipcub(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", @@ -78,13 +74,16 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: 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): @@ -101,13 +100,7 @@ def cmake_args(self): # 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: - args.append( - self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip) - ) - + 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/package.py b/var/spack/repos/builtin/packages/hipfft/package.py index 4b803386cbeb06..e70b3112032c79 100644 --- a/var/spack/repos/builtin/packages/hipfft/package.py +++ b/var/spack/repos/builtin/packages/hipfft/package.py @@ -16,7 +16,7 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/ROCm/hipFFT" git = "https://github.com/ROCm/hipFFT.git" - url = "https://github.com/ROCm/hipfft/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/hipfft/archive/rocm-6.1.0.tar.gz" tags = ["rocm"] maintainers("renjithravindrankannath", "srekolam") @@ -24,6 +24,10 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage): license("MIT") version("master", branch="master") + 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") @@ -33,16 +37,13 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage): 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") with default_args(deprecated=True): - 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.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 @@ -67,11 +68,6 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage): depends_on("hip +cuda", when="+cuda") 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", @@ -84,6 +80,12 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage): "5.7.1", "6.0.0", "6.0.2", + "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", + "master", ]: depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}") depends_on(f"rocfft@{ver}", when=f"+rocm @{ver}") @@ -106,9 +108,7 @@ def cmake_args(self): 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 41b61b4ec2fb21..5158908b35e731 100644 --- a/var/spack/repos/builtin/packages/hipfort/package.py +++ b/var/spack/repos/builtin/packages/hipfort/package.py @@ -11,12 +11,16 @@ class Hipfort(CMakePackage): homepage = "https://github.com/ROCm/hipfort" git = "https://github.com/ROCm/hipfort.git" - url = "https://github.com/ROCm/hipfort/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/hipfort/archive/rocm-6.1.1.tar.gz" tags = ["rocm"] license("MIT") maintainers("cgmb", "srekolam", "renjithravindrankannath") + 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") @@ -26,16 +30,14 @@ class Hipfort(CMakePackage): 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") with default_args(deprecated=True): - 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.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") @@ -44,11 +46,6 @@ class Hipfort(CMakePackage): depends_on("binutils", when="%cce") 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", @@ -62,6 +59,10 @@ class Hipfort(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on(f"hip@{ver}", type="build", when=f"@{ver}") @@ -81,5 +82,8 @@ def cmake_args(self): "-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 00000000000000..8d9290e40c8205 --- /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/package.py b/var/spack/repos/builtin/packages/hipify-clang/package.py index 2c03dcdde5e2df..44c593938cbbbf 100644 --- a/var/spack/repos/builtin/packages/hipify-clang/package.py +++ b/var/spack/repos/builtin/packages/hipify-clang/package.py @@ -12,7 +12,7 @@ class HipifyClang(CMakePackage): homepage = "https://github.com/ROCm/HIPIFY" git = "https://github.com/ROCm/HIPIFY.git" - url = "https://github.com/ROCm/HIPIFY/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/HIPIFY/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") @@ -20,6 +20,10 @@ class HipifyClang(CMakePackage): license("MIT") version("master", branch="master") + 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") @@ -29,16 +33,13 @@ class HipifyClang(CMakePackage): 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") with default_args(deprecated=True): - 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.4.3", sha256="79e27bd6c0a28e6a62b02dccc0b5d88a81f69fe58487e83f3b7ab47d6b64341b") + version("5.4.0", sha256="9f51eb280671ae7f7e14eb593ee3ef099899221c4bdccfbdb7a78681ad17f37f") + version("5.3.3", sha256="9d08e2896e52c10a0a189a5407567043f2510adc7bf618591c97a22a23699691") + version("5.3.0", sha256="7674900d2b9319d91fa8f469252c5acb5bedf339142417cdcb64f33ee8482e00") + + depends_on("cxx", type="build") # generated variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") @@ -47,15 +48,11 @@ class HipifyClang(CMakePackage): 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:6.0") - patch("0003-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch", when="@6.1:") + 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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -69,11 +66,29 @@ class HipifyClang(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", ]: 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"]: + 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"@{ver}") def setup_run_environment(self, env): diff --git a/var/spack/repos/builtin/packages/hiprand/package.py b/var/spack/repos/builtin/packages/hiprand/package.py index 5d6a9ade54341c..61b1702680ece5 100644 --- a/var/spack/repos/builtin/packages/hiprand/package.py +++ b/var/spack/repos/builtin/packages/hiprand/package.py @@ -14,7 +14,7 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/ROCm/hipRAND" git = "https://github.com/ROCm/hipRAND.git" - url = "https://github.com/ROCm/hipRAND/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/hipRAND/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath") @@ -24,6 +24,10 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") + 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") @@ -33,16 +37,14 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage): 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") with default_args(deprecated=True): - 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") + 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 @@ -78,11 +80,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", @@ -96,6 +93,10 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", "develop", ]: 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 00000000000000..79f1713a0475b1 --- /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 +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 index b7caa3d15be663..5a33b969e792eb 100644 --- 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 @@ -1,7 +1,7 @@ -From 9adfbf77cff336a0fa01b15e74e4c812302698e8 Mon Sep 17 00:00:00 2001 +From 90c1913a29f6ee097aea18a66deb0a4fb0bc0066 Mon Sep 17 00:00:00 2001 From: Renjith Ravindran -Date: Mon, 6 May 2024 18:39:02 +0000 -Subject: [PATCH] suite-sparse include and library path +Date: Sat, 8 Jun 2024 00:46:22 +0000 +Subject: [PATCH] add SUITE_SPARSE_PATH to the CMakeLists.txt --- CMakeLists.txt | 1 + @@ -9,19 +9,19 @@ Subject: [PATCH] suite-sparse include and library path 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 95a2393..5dd88bb 100644 +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) ++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..a0f877d 100644 +index ab448f4..f3d759e 100644 --- a/library/src/CMakeLists.txt +++ b/library/src/CMakeLists.txt @@ -135,7 +135,7 @@ if( NOT USE_CUDA ) @@ -29,10 +29,10 @@ index ab448f4..a0f877d 100644 endif( ) - target_link_libraries( hipsolver PRIVATE roc::rocsparse suitesparseconfig cholmod ) -+ target_link_libraries( hipsolver PRIVATE roc::rocsparse ${SUITE_SPARSE_PATH}/lib64/libsuitesparseconfig.so ${SUITE_SPARSE_PATH}/lib64/libcholmod.so ) ++ target_link_libraries( hipsolver PRIVATE roc::rocsparse ${SUITE_SPARSE_LIBDIR}/libsuitesparseconfig.so ${SUITE_SPARSE_LIBDIR}/libcholmod.so ) target_include_directories( hipsolver SYSTEM PRIVATE $ -- -2.31.1 +2.27.0 diff --git a/var/spack/repos/builtin/packages/hipsolver/package.py b/var/spack/repos/builtin/packages/hipsolver/package.py index ad6a5092e5d5ea..9769f44ebb1ceb 100644 --- a/var/spack/repos/builtin/packages/hipsolver/package.py +++ b/var/spack/repos/builtin/packages/hipsolver/package.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os import re from spack.package import * @@ -18,7 +19,7 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/ROCm/hipSOLVER" git = "https://github.com/ROCm/hipSOLVER.git" - url = "https://github.com/ROCm/hipSOLVER/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/hipSOLVER/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath") @@ -28,6 +29,10 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") + 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") @@ -37,16 +42,15 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): 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") with default_args(deprecated=True): - 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.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 @@ -82,11 +86,6 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): depends_on("hip +cuda", when="+cuda") 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", @@ -100,6 +99,10 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", "develop", ]: @@ -112,11 +115,13 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): 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") + 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 = join_path(self.builder.build_directory, "clients", "staging", "hipsolver-test") + exe = which(exe) + exe(["--gtest_filter=-*known_bug*"]) @classmethod def determine_version(cls, lib): @@ -136,6 +141,7 @@ def setup_build_environment(self, 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), @@ -145,9 +151,7 @@ def cmake_args(self): # 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) ) @@ -156,5 +160,8 @@ def cmake_args(self): 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/package.py b/var/spack/repos/builtin/packages/hipsparse/package.py index 2b1a5f59a38a36..65a9a9a18f192e 100644 --- a/var/spack/repos/builtin/packages/hipsparse/package.py +++ b/var/spack/repos/builtin/packages/hipsparse/package.py @@ -14,13 +14,17 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/ROCm/hipSPARSE" git = "https://github.com/ROCm/hipSPARSE.git" - url = "https://github.com/ROCm/hipSPARSE/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/hipSPARSE/archive/rocm-6.1.1.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie") libraries = ["libhipsparse"] license("MIT") + 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") @@ -30,16 +34,14 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage): 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") with default_args(deprecated=True): - 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.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 @@ -65,11 +67,6 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage): depends_on("git", 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", @@ -83,6 +80,10 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage): "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-cmake@{ver}:", type="build", when=f"@{ver}") depends_on(f"rocsparse@{ver}", when=f"+rocm @{ver}") @@ -118,13 +119,7 @@ def cmake_args(self): # 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: - args.append( - self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip) - ) - + 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 00000000000000..bd07d5af37cd06 --- /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 + $ + $ # may be blank if not used + $ ++ $ + ) + 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} ) + $ + ) + ++ target_include_directories( ${exe} ++ SYSTEM PRIVATE ++ $ ++ ) ++ + 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 00000000000000..143b0e592610ef --- /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 + $ + $ # may be blank if not used + $ ++ $ + ) + 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} ) + $ + ) + ++ target_include_directories( ${exe} ++ SYSTEM PRIVATE ++ $ ++ ) ++ + 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/package.py b/var/spack/repos/builtin/packages/hipsparselt/package.py index cd051555416b30..e96305ba2cb74a 100644 --- a/var/spack/repos/builtin/packages/hipsparselt/package.py +++ b/var/spack/repos/builtin/packages/hipsparselt/package.py @@ -15,16 +15,22 @@ class Hipsparselt(CMakePackage, ROCmPackage): 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.0.0.tar.gz" + 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.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", @@ -39,7 +45,7 @@ class Hipsparselt(CMakePackage, ROCmPackage): ) variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") - for ver in ["6.0.0", "6.0.2"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: 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") @@ -53,15 +59,21 @@ class Hipsparselt(CMakePackage, ROCmPackage): 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", "V3"), + 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), diff --git a/var/spack/repos/builtin/packages/hipsycl/package.py b/var/spack/repos/builtin/packages/hipsycl/package.py index 98a2b8cb19af33..0a60f5f18922d8 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 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,13 @@ 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) @@ -36,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") @@ -46,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:") @@ -71,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", @@ -116,8 +121,13 @@ def cmake_args(self): ) 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") @@ -156,31 +166,32 @@ def adjust_core_config(config): # 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) + if self.spec.satisfies("~rocm"): + so_paths = filesystem.find_libraries( + "libc++", self.spec["llvm"].prefix, shared=True, recursive=True ) - 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 + 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 ) - return config - - edit_config(configfiles["cuda"], adjust_cuda_config) + 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 2e3c4704c27384..69d02a1ee3b0a1 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 c54f214367f8d0..39eb4aaa5b81f4 100644 --- a/var/spack/repos/builtin/packages/hiredis/package.py +++ b/var/spack/repos/builtin/packages/hiredis/package.py @@ -26,6 +26,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 +46,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 +67,9 @@ def darwin_fix(self): 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 f4f2886fc7ea33..ca96899314f9dc 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 @@ def install(self, spec, prefix): 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 @@ def install(self, spec, prefix): 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 ff08e1d90cc03d..5fc33ae1a7f938 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 da071c8bb7c89c..89dc7de044ed0d 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 9a231f270eae46..c44d5a509d3bb7 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 0df0c49501a8fa..8e12b522873802 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 d5bd80bf16b8e5..15af8fb92611c2 100644 --- a/var/spack/repos/builtin/packages/hohqmesh/package.py +++ b/var/spack/repos/builtin/packages/hohqmesh/package.py @@ -17,12 +17,19 @@ class Hohqmesh(CMakePackage): license("MIT") + 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 7ee7b7fbdc7b34..17a3b7e13e645f 100644 --- a/var/spack/repos/builtin/packages/homer/package.py +++ b/var/spack/repos/builtin/packages/homer/package.py @@ -50,5 +50,5 @@ def install(self, spec, prefix): 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 54afb419c15888..b58222cb1cd524 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") @@ -68,14 +71,14 @@ def cmake_args(self): 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") @@ -92,7 +95,7 @@ def cmake_args(self): 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 e2cade0a732c69..54b663d15af2d5 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 2d9d0a0cf6465b..f7eae01e183148 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 6e89f61b8b23ab..e8a9acb6dea99b 100644 --- a/var/spack/repos/builtin/packages/hpcc/package.py +++ b/var/spack/repos/builtin/packages/hpcc/package.py @@ -7,6 +7,7 @@ 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", @@ -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 ", "#include ", "FFT/wrapfftw.h") filter_file( @@ -159,7 +162,7 @@ def edit(self, spec, prefix): if spec.satisfies("%intel"): # with intel-parallel-studio+mpi the '-march' arguments # are not passed to icc - arch_opt = spec.architecture.target.optimization_flags(spec.compiler) + 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) diff --git a/var/spack/repos/builtin/packages/hpccg/package.py b/var/spack/repos/builtin/packages/hpccg/package.py index eca4f30b26ae6b..86244d74aa4299 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 @@ def build_targets(self): 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 17e45f5cf258be..9e0affb3b804b7 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( @@ -74,7 +76,7 @@ def configure(self, spec, prefix): 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 00000000000000..3d9a73db2fd628 --- /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/define-hip-platform-as-amd.patch b/var/spack/repos/builtin/packages/hpctoolkit/define-hip-platform-as-amd.patch deleted file mode 100644 index e5ca24136ee4bf..00000000000000 --- a/var/spack/repos/builtin/packages/hpctoolkit/define-hip-platform-as-amd.patch +++ /dev/null @@ -1,13 +0,0 @@ -t a/src/tool/hpcrun/Makefile.in b/src/tool/hpcrun/Makefile.in -index e273fe67d..380ba3ceb 100644 ---- a/src/tool/hpcrun/Makefile.in -+++ b/src/tool/hpcrun/Makefile.in -@@ -1998,7 +1998,7 @@ UNW_MIPS_INCLUDE_DIRS = \ - - UNW_MIPS_LD_FLAGS = - MY_CPP_DEFINES = -D_GNU_SOURCE -DINLINE_FN=1 -DLOCAL_BUILD=1 \ -- -D__HIP_PLATFORM_HCC__=1 $(am__append_11) $(am__append_16) \ -+ -D__HIP_PLATFORM_HCC__=1 -D__HIP_PLATFORM_AMD__=1 $(am__append_11) $(am__append_16) \ - $(am__append_22) $(am__append_106) $(am__append_110) \ - $(am__append_112) $(am__append_114) $(am__append_118) \ - $(am__append_135) $(am__append_139) $(am__append_143) diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py index f57afcbaf875e7..548bfad92ccc45 100644 --- a/var/spack/repos/builtin/packages/hpctoolkit/package.py +++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py @@ -20,7 +20,7 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): 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") @@ -38,11 +38,11 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): 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) @@ -50,8 +50,9 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): 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 @@ -151,8 +152,8 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): " +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") @@ -178,6 +179,7 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): 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") @@ -188,7 +190,6 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): 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:2023.08") depends_on("papi", when="+papi") depends_on("libpfm4", when="~papi") @@ -198,6 +199,10 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): depends_on("hpcviewer", type="run", when="+viewer") depends_on("python@3.10:", type=("build", "run"), when="+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. depends_on("hip@4.5:", type=("build", "run"), when="+rocm") @@ -213,6 +218,12 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): 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") @@ -220,6 +231,8 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): "^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:") @@ -229,11 +242,12 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): depends_on("python@3.4:", type="build", when="@2020.03:2020.08") patch("python3.patch", when="@2020.03:2020.08") - # HIP header files require HIP_PLATFORM_AMD to be set for AMD GPUs - patch("define-hip-platform-as-amd.patch", when="^hip@6:") + # 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): @@ -250,7 +264,7 @@ def setup_run_environment(self, env): 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: + if spec.satisfies("+viewer"): env.prepend_path("PATH", spec["hpcviewer"].prefix.bin) env.prepend_path("MANPATH", spec["hpcviewer"].prefix.share.man) @@ -316,18 +330,18 @@ def configure_args(self): 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"): @@ -386,17 +400,20 @@ def meson_args(self): spec = self.spec args = [ - "-Dhpcprof_mpi=" + ("enabled" if "+mpi" in spec else "disabled"), - "-Dpython=" + ("enabled" if "+python" in spec else "disabled"), - "-Dpapi=" + ("enabled" if "+papi" in spec else "disabled"), - "-Dopencl=" + ("enabled" if "+opencl" in spec else "disabled"), - "-Dcuda=" + ("enabled" if "+cuda" in spec else "disabled"), - "-Drocm=" + ("enabled" if "+rocm" in spec else "disabled"), - "-Dlevel0=" + ("enabled" if "+level_zero" in spec else "disabled"), - "-Dgtpin=" + ("enabled" if "+gtpin" in spec else "disabled"), + "-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 "@:2024.01" in spec: + 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 @@ -431,29 +448,29 @@ def gen_prefix_file(self): cfg["properties"]["prefix_yaml_cpp"] = f"'''{spec['yaml-cpp'].prefix}'''" - if "+cuda" in spec: + if spec.satisfies("+cuda"): cfg["properties"]["prefix_cuda"] = f"'''{spec['cuda'].prefix}'''" - if "+level_zero" in spec: + if spec.satisfies("+level_zero"): cfg["properties"]["prefix_level0"] = f"'''{spec['oneapi-level-zero'].prefix}'''" - if "+gtpin" in spec: + if spec.satisfies("+gtpin"): cfg["properties"]["prefix_gtpin"] = f"'''{spec['intel-gtpin'].prefix}'''" cfg["properties"]["prefix_igc"] = f"'''{spec['oneapi-igc'].prefix}'''" - if "+opencl" in spec: + if spec.satisfies("+opencl"): cfg["properties"]["prefix_opencl"] = f"'''{spec['opencl-c-headers'].prefix}'''" - if "+rocm" in spec: + 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 "+python" in spec: + if spec.satisfies("+python"): cfg["binaries"]["python"] = f"'''{spec['python'].command}'''" - if "+mpi" in spec: + if spec.satisfies("+mpi"): cfg["binaries"]["mpicxx"] = f"'''{spec['mpi'].mpicxx}'''" native_fd, native_path = tempfile.mkstemp( diff --git a/var/spack/repos/builtin/packages/hpcviewer/package.py b/var/spack/repos/builtin/packages/hpcviewer/package.py index 5995dafc789098..e5aae93bdbda97 100644 --- a/var/spack/repos/builtin/packages/hpcviewer/package.py +++ b/var/spack/repos/builtin/packages/hpcviewer/package.py @@ -10,29 +10,6 @@ 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,12 +20,14 @@ 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", @@ -73,6 +52,9 @@ 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", @@ -129,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 = { @@ -165,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() @@ -195,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 @@ -246,11 +194,6 @@ def install(self, spec, prefix): 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 95b575d1675be3..54becb1539d1d4 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 df75297679ea6b..f34f6496cf2671 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 75a79367c9bc42..cd37b5a70289ba 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 187c5630c6bb54..3aa211ce089ac2 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 b0e4dff85542e3..b57692b0504721 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 @@ def configure(self, spec, prefix): config = [] # OpenMP support - if "+openmp" in spec: + if spec.satisfies("+openmp"): config.append("OMP_DEFS = {0}".format(self.compiler.openmp_flag)) config.extend( @@ -104,7 +106,7 @@ def configure_args(self): filter_file(r"^libs10=.*", "libs10=%s" % self.spec["blas"].libs.ld_flags, "configure") cflags, ldflags = ["-O3"], [] - if "+openmp" in self.spec: + if self.spec.satisfies("+openmp"): cflags.append(self.compiler.openmp_flag) if ( @@ -114,10 +116,10 @@ def configure_args(self): ): ldflags.append(self.spec["blas"].libs.ld_flags) - if "%aocc" in self.spec: - if "%aocc@3:" in self.spec: + if self.spec.satisfies("%aocc"): + if self.spec.satisfies("%aocc@3:"): ldflags.extend(["-lamdlibm", "-lm"]) - if "%aocc@4:" in self.spec: + if self.spec.satisfies("%aocc@4:"): ldflags.append("-lamdalloc") if self.spec["blas"].name == "fujitsu-ssl2" and ( diff --git a/var/spack/repos/builtin/packages/hpx-kokkos/package.py b/var/spack/repos/builtin/packages/hpx-kokkos/package.py index 83e13413ed4f54..c01af6c03f95f5 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 @@ def cmake_args(self): 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 5e8e3b45367a76..b40de24c0eed2e 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), @@ -224,6 +227,9 @@ def instrumentation_args(self): 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"), @@ -235,9 +241,12 @@ def cmake_args(self): 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), @@ -251,7 +260,7 @@ def cmake_args(self): 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)] @@ -259,7 +268,13 @@ def cmake_args(self): # 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 147101cc2039d3..eccb045c21e4ec 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 @@ def configure_args(self): # '--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 @@ def configure_args(self): # 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/package.py b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py index 3c62d9d0d17ff1..579a7b01ba3262 100644 --- a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py +++ b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py @@ -17,13 +17,17 @@ class HsaRocrDev(CMakePackage): 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.0.2.tar.gz" + url = "https://github.com/ROCm/ROCR-Runtime/archive/rocm-6.2.1.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath", "haampie") libraries = ["libhsa-runtime64"] version("master", branch="master") + 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") @@ -33,37 +37,29 @@ class HsaRocrDev(CMakePackage): 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") with default_args(deprecated=True): - 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.4.3", sha256="a600eed848d47a7578c60da7e64eb92f29bbce2ec67932b251eafd4c2974cb67") + version("5.4.0", sha256="476cd18500cc227d01f6b44c00c7adc8574eb8234b6b4daefc219650183fa090") + version("5.3.3", sha256="aca88d90f169f35bd65ce3366b8670c7cdbe3abc0a2056eab805d0192cfd7130") + version("5.3.0", sha256="b51dbedbe73390e0be748b92158839c82d7fa0e514fede60aa7696dc498facf0") + + depends_on("cxx", type="build") # generated 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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -77,6 +73,10 @@ class HsaRocrDev(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", ]: depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") @@ -84,7 +84,21 @@ class HsaRocrDev(CMakePackage): # allow standalone rocm-device-libs (useful for aomp) 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"]: + 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"@{ver}") patch("0002-Remove-explicit-RPATH-again.patch", when="@3.7.0:5.6") 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 b0a04e3e84278f..00000000000000 --- 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 -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 b71b571977c337..75ca27d1f6b7b0 100644 --- a/var/spack/repos/builtin/packages/hsakmt-roct/package.py +++ b/var/spack/repos/builtin/packages/hsakmt-roct/package.py @@ -16,12 +16,16 @@ class HsakmtRoct(CMakePackage): 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.0.2.tar.gz" + url = "https://github.com/ROCm/ROCT-Thunk-Interface/archive/rocm-6.1.0.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") version("master", branch="master") + 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") @@ -31,35 +35,46 @@ class HsakmtRoct(CMakePackage): 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") with default_args(deprecated=True): - 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.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(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"]: + 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"@{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") def cmake_args(self): @@ -78,12 +93,9 @@ def cmake_args(self): @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, @@ -101,9 +113,12 @@ def check_install(self): "-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 2a88f1fd486404..d26dc9a8495087 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 151644e4e84706..f32f34a6d88fc9 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 8ad7f1c9734e68..28400a7ddd3908 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 921af275c6be08..4a8d6571d8272f 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 d3d2e9b1cdfd39..23c8a6034ead28 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 3da320625bb495..9e43771b2f62db 100644 --- a/var/spack/repos/builtin/packages/htslib/package.py +++ b/var/spack/repos/builtin/packages/htslib/package.py @@ -16,6 +16,7 @@ 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") @@ -37,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") @@ -60,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) @@ -73,6 +84,11 @@ def url_for_version(self, version): 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 = [] @@ -80,6 +96,11 @@ def configure_args(self): 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 380522ab4a18d1..7300665b04130b 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 736c7988a400f8..2c6739a6095ec6 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 61af488281cb54..03bb080b6fd867 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 5e403a91b2fab3..765dea676d9503 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 6429398c6ab3ed..a244a44277fe53 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 ae7a78d0c7eb64..99954782549fba 100644 --- a/var/spack/repos/builtin/packages/httpd/package.py +++ b/var/spack/repos/builtin/packages/httpd/package.py @@ -13,33 +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.59", sha256="ec51501ec480284ff52f637258135d333230a7d229c3afa6f6c2f9040e321323") - 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") diff --git a/var/spack/repos/builtin/packages/httperf/package.py b/var/spack/repos/builtin/packages/httperf/package.py index e6a9fc2aa63473..8f4e0b5102cce4 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 0e636a072e2030..646b1a13c1d328 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 5bac21e23a466c..887146409a4fa4 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 2bb87852b1ebaa..ef9c4f3838836a 100644 --- a/var/spack/repos/builtin/packages/hugo/package.py +++ b/var/spack/repos/builtin/packages/hugo/package.py @@ -8,7 +8,7 @@ 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 @@ def determine_version(cls, exe): 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 5b471af7a323da..5916ea1dc1a5dc 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 bbbff9af15c1b2..5a740bedc94103 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 94a146fc90126e..4ef81adee39f7c 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") @@ -174,7 +178,7 @@ def configure_args(self): 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 @@ def configure_args(self): 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 db890c6f73b4b0..d1b6e1a96b9bde 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 dcd5b6893b8bcb..4b31318b1fe477 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 3d1d0a8e020def..c1ed72491bccfa 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 87bf987b12412a..6df93d1f7ea671 100644 --- a/var/spack/repos/builtin/packages/hydra/package.py +++ b/var/spack/repos/builtin/packages/hydra/package.py @@ -23,3 +23,5 @@ class Hydra(AutotoolsPackage): 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/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index 2847431ef9df4b..b4116df1c4fd13 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.") @@ -136,7 +139,7 @@ class Hydrogen(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("libHydrogen", root=self.prefix, shared=shared, recursive=True) def cmake_args(self): @@ -172,7 +175,7 @@ def initconfig_compiler_entries(self): # 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)) @@ -197,7 +200,7 @@ def initconfig_hardware_entries(self): 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"): @@ -212,7 +215,7 @@ def initconfig_hardware_entries(self): 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"): @@ -230,30 +233,36 @@ def initconfig_package_entries(self): 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( @@ -270,7 +279,7 @@ def initconfig_package_entries(self): % ";".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 f8c69c30d6a613..6236b1b1bac65a 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 e862d07392c561..ce795592319b99 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 622601384f0ad9..6c7ae9306903a7 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 607f4e5beacd37..d1f5b97a86f29d 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 c63e67b50f3ed5..a6e2f74ac3ee2f 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 8d6ad9bed8d5cf..df5be36f64b4df 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 @@ def cmake_args(self): 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 @@ def setup_build_environment(self, env): 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 @@ def libs(self): """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 00000000000000..d40b705820b5f0 --- /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 60eaa2bbb1c502..8d3c262c672576 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -26,6 +26,7 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage): 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") @@ -55,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 @@ -85,6 +90,14 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage): 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") @@ -100,6 +113,10 @@ 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' @@ -123,17 +140,11 @@ def patch(self): # fix sequential compilation in 'src/seq_mv' 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") @@ -177,11 +188,13 @@ def patch(self): # fix sequential compilation in 'src/seq_mv' 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 @@ -204,8 +217,8 @@ def configure_args(self): 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") @@ -220,6 +233,11 @@ def configure_args(self): configure_args.extend(self.enable_or_disable("complex")) + 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") @@ -257,15 +275,15 @@ def configure_args(self): 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 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"): - conigure_args.append("--enable-cublas") + configure_args.append("--enable-cublas") else: configure_args.extend(["--without-cuda", "--disable-curand", "--disable-cusparse"]) if spec.satisfies("@:2.20.99"): @@ -283,14 +301,14 @@ def configure_args(self): "--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: @@ -312,7 +330,7 @@ def configure_args(self): configure_args.append("--with-magma-lib=%s" % spec["magma"].libs) configure_args.append("--with-magma") - if "+gpu-aware-mpi" in spec: + if spec.satisfies("+gpu-aware-mpi"): configure_args.append("--enable-gpu-aware-mpi") configure_args.extend(self.enable_or_disable("fortran")) @@ -331,7 +349,7 @@ def setup_build_environment(self, env): 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 spec.satisfies("+rocm"): # As of 2022/04/05, the following are set by 'llvm-amdgpu' and @@ -357,8 +375,8 @@ def install(self, spec, prefix): make("install") 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") @@ -366,36 +384,34 @@ def install(self, spec, prefix): 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): @@ -411,6 +427,6 @@ def libs(self): """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 60e2a60f3e645f..39276be305ac07 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 53d0ad53eb47af..2224ad4a8f272a 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 745240354b00ee..8f3b4ed990ac8f 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 97d63d65c8a8d0..376233effde382 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 @@ def install(self, spec, prefix): # 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 bb21460e04c43f..7a4b3ec9e01aa6 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 b652f7a6dabbee..1cc72168e1aedc 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 051e9527eb5495..6b5bcfce51c07f 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 58ed2aa202e7c6..9499abc5bfb6e7 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", @@ -155,9 +158,9 @@ def configure_args(self): 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 72efff0787738c..6d6b145fc31936 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 4afb834fadd619..a057f41252a893 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 index 8d424a7dfb4b0f..229e3942866839 100644 --- a/var/spack/repos/builtin/packages/icon/package.py +++ b/var/spack/repos/builtin/packages/icon/package.py @@ -20,8 +20,15 @@ class Icon(AutotoolsPackage): 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") @@ -139,13 +146,13 @@ def configure_args(self): ]: args += self.enable_or_disable(x) - if "+art" in self.spec: + if self.spec.satisfies("+art"): args.append("--enable-art") libs += self.spec["libxml2"].libs else: args.append("--disable-art") - if "+coupling" in self.spec: + if self.spec.satisfies("+coupling"): args.append("--enable-coupling") libs += self.spec["libfyaml"].libs else: @@ -163,7 +170,7 @@ def configure_args(self): ) libs += self.spec["serialbox:fortran"].libs - if "+grib2" in self.spec: + if self.spec.satisfies("+grib2"): args.append("--enable-grib2") libs += self.spec["eccodes:c"].libs else: @@ -174,7 +181,7 @@ def configure_args(self): libs += self.spec["netcdf-fortran"].libs libs += self.spec["netcdf-c"].libs - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): args.extend( [ "--enable-mpi", @@ -209,7 +216,7 @@ def configure_args(self): flags["ICON_BUNDLED_CFLAGS"].append("-O2") flags["FCFLAGS"].append("-g") flags["ICON_FCFLAGS"].append("-O2") - if "+ocean" in self.spec: + 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"] @@ -234,10 +241,10 @@ def configure_args(self): ] ) - if "%oneapi+coupling" in self.spec: + if self.spec.satisfies("%oneapi+coupling"): flags["ICON_YAC_CFLAGS"].extend(["-O2", "-fp-model precise"]) - if "+ocean" in self.spec: + if self.spec.satisfies("+ocean"): flags["ICON_OCEAN_FCFLAGS"].extend( ["-O3", "-assume norealloc_lhs", "-reentrancy threaded"] ) @@ -245,10 +252,10 @@ def configure_args(self): ["--enable-fcgroup-OCEAN", "ICON_OCEAN_PATH=src/hamocc:src/ocean:src/sea_ice"] ) - if "+openmp" in self.spec: + if self.spec.satisfies("+openmp"): flags["ICON_OCEAN_FCFLAGS"].extend(["-DOCE_SOLVE_OMP"]) - if "+ecrad" in self.spec: + if self.spec.satisfies("+ecrad"): flags["ICON_ECRAD_FCFLAGS"].extend(["-qno-opt-dynamic-align", "-no-fma", "-fpe0"]) elif self.compiler.name == "nvhpc": @@ -262,7 +269,7 @@ def configure_args(self): ["-acc=gpu", "-gpu=cc{0}".format(self.nvidia_targets[gpu])] ) - if "%nvhpc@:23.9+coupling" in self.spec: + if self.spec.satisfies("%nvhpc@:23.9+coupling"): args.append("yac_cv_fc_is_contiguous_works=yes") else: diff --git a/var/spack/repos/builtin/packages/icu4c/package.py b/var/spack/repos/builtin/packages/icu4c/package.py index fc5dbb21011ba2..97f89cfc29c891 100644 --- a/var/spack/repos/builtin/packages/icu4c/package.py +++ b/var/spack/repos/builtin/packages/icu4c/package.py @@ -3,10 +3,12 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import pathlib + 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 +18,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 +30,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 +64,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 +72,15 @@ def flag_handler(self, name, flags): 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 +88,49 @@ def setup_build_environment(self, env): 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 660897260ca1a0..77561832914b99 100644 --- a/var/spack/repos/builtin/packages/id3lib/package.py +++ b/var/spack/repos/builtin/packages/id3lib/package.py @@ -9,13 +9,16 @@ 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 3213d2838f400d..ae200693416203 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 42621b4ca9f7d0..74e6b0637bbd8d 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 97e80795d1b959..eb4d92ca3da278 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 ec5051d0540c78..c741f316f1c00e 100644 --- a/var/spack/repos/builtin/packages/igraph/package.py +++ b/var/spack/repos/builtin/packages/igraph/package.py @@ -14,9 +14,14 @@ class Igraph(CMakePackage, AutotoolsPackage): license("GPL-2.0-or-later") + 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 +51,7 @@ def cmake_args(self): "-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 62c4817c9cae9d..ca3d1bc8431485 100644 --- a/var/spack/repos/builtin/packages/igv/package.py +++ b/var/spack/repos/builtin/packages/igv/package.py @@ -34,7 +34,7 @@ def install(self, spec, prefix): 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 b6aef8a42d6c3f..fa2aa4c30b18cd 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 e3d47d3e30a126..7ee9bfc2fea58b 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 11728627b91094..1bb470496adb90 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 f1e7a3ad8a84cc..cae37bc79bab30 100644 --- a/var/spack/repos/builtin/packages/imagemagick/package.py +++ b/var/spack/repos/builtin/packages/imagemagick/package.py @@ -15,24 +15,46 @@ 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.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") + 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("libtool", when="@:7.1.0-60", type="build") - depends_on("libtool", when="@7.0.8:7.1.0-60", type=("build", "link")) depends_on("fontconfig@2.1:") depends_on("freetype@2.8:") @@ -45,7 +67,6 @@ class Imagemagick(AutotoolsPackage): depends_on("ghostscript-fonts", when="+ghostscript") depends_on("libsm", when="@:7.1.0-60 platform=linux") - depends_on("libtool", when="platform=linux") def configure_args(self): args = [] diff --git a/var/spack/repos/builtin/packages/imake/package.py b/var/spack/repos/builtin/packages/imake/package.py index 13a8437a50fade..7749f3efa8d913 100644 --- a/var/spack/repos/builtin/packages/imake/package.py +++ b/var/spack/repos/builtin/packages/imake/package.py @@ -9,7 +9,7 @@ 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") @@ -18,7 +18,9 @@ class Imake(AutotoolsPackage, XorgPackage): 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") diff --git a/var/spack/repos/builtin/packages/imath/package.py b/var/spack/repos/builtin/packages/imath/package.py index 1937e754fa8f95..b61a2db6814b74 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 c233e4abe90332..4824937cdd8fff 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 d77907c81bdecd..60530a35aa3e47 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 e8af0247af5401..9a78845cc67d6e 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 ad823160d10577..fb2bcf2852fdce 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 @@ def cmake_args(self): 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 3f78946a2435e0..1adef52b675ecd 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 @@ def install(self, spec, prefix): 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 a69ca987b20e11..d5dda6d05eeb36 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 ba99ed31bcca17..b5be9e4e681682 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 30e8af51413084..00000000000000 --- 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 afef3bc25f1b67..efb78e156342af 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 71c22ca4799eb5..d082e4fb1781bf 100644 --- a/var/spack/repos/builtin/packages/intel-gtpin/package.py +++ b/var/spack/repos/builtin/packages/intel-gtpin/package.py @@ -90,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 d06afa06961e70..00000000000000 --- 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 ea9dd946504c8d..c87b61c5e6ea43 100644 --- a/var/spack/repos/builtin/packages/intel-llvm/package.py +++ b/var/spack/repos/builtin/packages/intel-llvm/package.py @@ -18,6 +18,10 @@ class IntelLlvm(CMakePackage): 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 @@ -28,7 +32,7 @@ def setup_build_environment(self, env): 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-mpi-benchmarks/package.py b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py index 764394ea1f9bb7..1ed9b1ce1517ba 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 @@ def parallel(self): 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 @@ def install(self, spec, prefix): 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-oneapi-advisor/package.py b/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py index 1db84c38a71a83..354c01f17d174c 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py @@ -24,6 +24,30 @@ class IntelOneapiAdvisor(IntelOneApiLibraryPackageWithSdk): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/advisor.html" ) + 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", 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 85136434908fd8..78f939f16ff47f 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py @@ -27,6 +27,24 @@ 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", 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 f23b716b21054b..3fc63be6522921 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -4,11 +4,53 @@ # 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.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", + }, + }, + { + "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", + }, + }, + { + "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", + }, + }, { "version": "2024.1.0", "cpp": { @@ -223,7 +265,8 @@ @IntelOneApiPackage.update_description class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage): - """Intel oneAPI Compilers. Includes: icc, icpc, ifort, icx, icpx, and ifx.""" + """Intel oneAPI Compilers. Includes: icx, icpx, ifx, and ifort. + Releases before 2024.0 include icc/icpc""" maintainers("rscohn2") @@ -239,8 +282,10 @@ class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage): ) # See https://github.com/spack/spack/issues/39252 - depends_on("patchelf@:0.17", type="build") - + 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") # 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. @@ -256,6 +301,14 @@ class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage): 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"], + ) @property def v2_layout_versions(self): @@ -315,6 +368,18 @@ def install(self, spec, prefix): # 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") + # Installer writes files in ~/intel set HOME so it goes to prefix + bash.add_default_env("HOME", prefix) + # Installer checks $XDG_RUNTIME_DIR/.bootstrapper_lock_file as well + bash.add_default_env("XDG_RUNTIME_DIR", join_path(self.stage.path, "runtime")) + # For NVIDIA plugin installer + bash(nvidia_script[0], "-y", "--install-dir", self.prefix) @run_after("install") def inject_rpaths(self): @@ -327,6 +392,12 @@ def inject_rpaths(self): # 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) @@ -386,7 +457,11 @@ def extend_config_flags(self): 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"]) 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 c01db24dffea98..afebb68a8e0637 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py @@ -26,6 +26,30 @@ class IntelOneapiDal(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onedal.html" ) + 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", 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 dba06d17ed34d0..8d682d268d40d0 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py @@ -26,6 +26,24 @@ class IntelOneapiDnn(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onednn.html" ) + 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", 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 c34e64ec716046..1db00291522532 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py @@ -19,6 +19,24 @@ class IntelOneapiDpct(IntelOneApiPackage): homepage = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compatibility-tool.html#gs.2p8km6" + 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", 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 58877ce0642d62..5f0877cf0f68df 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py @@ -22,6 +22,24 @@ class IntelOneapiDpl(IntelOneApiLibraryPackage): homepage = "https://github.com/oneapi-src/oneDPL" + 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", 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 c9647c6658ce15..99b2fea2d05a47 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py @@ -27,6 +27,24 @@ class IntelOneapiIpp(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/ipp.html" ) + 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", 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 98b676e16f4a3a..ed40dbac3521a4 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py @@ -28,6 +28,24 @@ class IntelOneapiIppcp(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/ipp.html" ) + 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", 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 eafb9986dc73e1..c233490408170f 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py @@ -25,6 +25,31 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html" ) + 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", @@ -36,7 +61,6 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): 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", expand=False, - preferred=True, ) version( "2023.2.0", @@ -111,6 +135,8 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): 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( @@ -146,6 +172,18 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): # 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") @@ -200,10 +238,16 @@ def _find_mkl_libs(self, shared): if self.spec.satisfies("+cluster"): libs.extend([self._xlp64_lib("libmkl_scalapack"), "libmkl_cdft_core"]) - if self.spec.satisfies("%oneapi") or self.spec.satisfies("%intel"): - libs.append(self._xlp64_lib("libmkl_intel")) - else: + # 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") @@ -218,29 +262,10 @@ def _find_mkl_libs(self, shared): 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 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 9f9f9ce2edff88..a20a1ac41cef4f 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py @@ -21,6 +21,24 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage): homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/mpi-library.html" + 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", @@ -116,7 +134,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" @@ -124,6 +147,7 @@ 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): @@ -139,22 +163,29 @@ def component_dir(self): @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): dependent_module = dependent_spec.package.module @@ -165,32 +196,26 @@ def setup_dependent_build_environment(self, env, dependent_spec): 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 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 index de2b5d39faafc3..961a8e301cff28 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-runtime/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-runtime/package.py @@ -29,6 +29,7 @@ class IntelOneapiRuntime(Package): LIBRARIES = [ "imf", "intlc", + "irc", "irng", "svml", "ifcore", # Fortran @@ -46,7 +47,6 @@ class IntelOneapiRuntime(Package): conflicts("platform=darwin", msg="IntelOneAPI can only be installed on Linux, and FreeBSD") depends_on("libc", type="link", when="platform=linux") - depends_on("libc", type="link", when="platform=cray") def install(self, spec, prefix): libraries = get_elf_libraries(compiler=self.compiler, libraries=self.LIBRARIES) 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 f00f2a19b52192..ae07f734bdb0c4 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py @@ -22,6 +22,24 @@ class IntelOneapiTbb(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onetbb.html" ) + 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", 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 a222eb8e1f6725..008dee29121d52 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py @@ -25,6 +25,30 @@ class IntelOneapiVtune(IntelOneApiLibraryPackageWithSdk): homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/vtune-profiler.html" + 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", diff --git a/var/spack/repos/builtin/packages/intel-pin/package.py b/var/spack/repos/builtin/packages/intel-pin/package.py index 6cf07b72579dca..b1acaf43de84f2 100644 --- a/var/spack/repos/builtin/packages/intel-pin/package.py +++ b/var/spack/repos/builtin/packages/intel-pin/package.py @@ -18,6 +18,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", @@ -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 deda008f6b70f2..4598ce164351b3 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 @@ def url_for_version(self, version): @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 @@ def cmake_args(self): 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 @@ def install(self, pkg, spec, prefix): 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 3e21a6e28dc9dc..1d1a547d5d984b 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 @@ def install(self, spec, prefix): 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 /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/interproscan/package.py b/var/spack/repos/builtin/packages/interproscan/package.py index 2af5c6e4016191..6088b12c38dff9 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 fcc640734ecfd0..2f7398075afc46 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 66fbd5701b515e..72e4a62c81ef33 100644 --- a/var/spack/repos/builtin/packages/ior/package.py +++ b/var/spack/repos/builtin/packages/ior/package.py @@ -25,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") @@ -64,18 +66,18 @@ def configure_args(self): 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 86b31db056a584..25b557095fc850 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 b0b9c844ff3f6a..5a55f37b81fedc 100644 --- a/var/spack/repos/builtin/packages/ip/package.py +++ b/var/spack/repos/builtin/packages/ip/package.py @@ -18,6 +18,7 @@ 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") @@ -32,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:") @@ -65,6 +69,7 @@ class Ip(CMakePackage): 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:") def cmake_args(self): args = [ @@ -88,6 +93,16 @@ def cmake_args(self): 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): diff --git a/var/spack/repos/builtin/packages/ip2/package.py b/var/spack/repos/builtin/packages/ip2/package.py index 92640926706500..ed228022d4b20d 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 06fa24b10abc9f..0e8fbadd3052a7 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 81970527e4dbfc..15896021a464b1 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 aaaf24f5456296..a1f8991ca57458 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 1c8a18ea59293b..9eb248ff526f40 100644 --- a/var/spack/repos/builtin/packages/ipm/package.py +++ b/var/spack/repos/builtin/packages/ipm/package.py @@ -23,6 +23,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 +79,25 @@ def autoreconf(self, spec, prefix): 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 00000000000000..44c15cfbf47f8a --- /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 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_ptr_); ++ ++#ifndef IPOPT_MUMPS_NOMUTEX ++ const std::lock_guard lock(mumps_call_mutex); ++#endif ++ ++ Index mpi_comm; ++ options.GetIntegerValue("mumps_mpi_communicator", mpi_comm, prefix); ++ mumps_->comm_fortran = static_cast(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_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 b5fc7b0cc7ef8d..e4912b437da775 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 @@ def configure_args(self): 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 @@ def configure_args(self): "--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 @@ def configure_args(self): "--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 @@ def configure_args(self): ] ) + 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 98430a131aef8e..967cdaebfdae55 100644 --- a/var/spack/repos/builtin/packages/iproute2/package.py +++ b/var/spack/repos/builtin/packages/iproute2/package.py @@ -9,8 +9,8 @@ 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 4f1bb59cb0b7db..c3288c02ac79dd 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 981393d4a03729..25bc11cf593066 100644 --- a/var/spack/repos/builtin/packages/iq-tree/package.py +++ b/var/spack/repos/builtin/packages/iq-tree/package.py @@ -36,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.") @@ -54,13 +57,13 @@ def cmake_args(self): 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/irep/package.py b/var/spack/repos/builtin/packages/irep/package.py index 2210f7bac5cdec..357eb3009d953f 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 f6aa7e762d8eae..e02d07cfa25cac 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 2d56fbcebb3cbd..3acf9c98798fca 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 16fc1c6b547f1c..8dcc67b2546d89 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 36e13abbe36843..8bc42c1e9401c9 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 23e223acb560d2..9cfe0c22ac60a0 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 ea130c0e591772..d598c24b6f916e 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 22ee03755cfcab..53862f40adf5a4 100644 --- a/var/spack/repos/builtin/packages/isl/package.py +++ b/var/spack/repos/builtin/packages/isl/package.py @@ -25,6 +25,9 @@ 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): diff --git a/var/spack/repos/builtin/packages/iso-codes/package.py b/var/spack/repos/builtin/packages/iso-codes/package.py index 7cc06fcc2f913b..baba46db33acdb 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 00000000000000..7655204ec5050b --- /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 b2a51bed81ab7c..f892540c6780d4 100644 --- a/var/spack/repos/builtin/packages/ispc/package.py +++ b/var/spack/repos/builtin/packages/ispc/package.py @@ -27,6 +27,7 @@ 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") @@ -43,6 +44,9 @@ 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") @@ -53,6 +57,7 @@ class Ispc(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/istio/package.py b/var/spack/repos/builtin/packages/istio/package.py index 76161511121f4b..fd824e7234c50d 100644 --- a/var/spack/repos/builtin/packages/istio/package.py +++ b/var/spack/repos/builtin/packages/istio/package.py @@ -8,21 +8,31 @@ 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 c60ec4c98ea6ed..12ba468096a722 100644 --- a/var/spack/repos/builtin/packages/itensor/package.py +++ b/var/spack/repos/builtin/packages/itensor/package.py @@ -34,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.") @@ -90,12 +92,12 @@ def edit(self, spec, prefix): filter_file(r"^BLAS_LAPACK_LIBFLAGS.+", vlib, mf) # 3.HDF5 - if "+hdf5" in spec: + 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) @@ -103,7 +105,7 @@ def edit(self, spec, prefix): 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): diff --git a/var/spack/repos/builtin/packages/itk/package.py b/var/spack/repos/builtin/packages/itk/package.py index f5f46daa7fa853..dd3ac52049ef96 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") diff --git a/var/spack/repos/builtin/packages/itstool/package.py b/var/spack/repos/builtin/packages/itstool/package.py index 1847302407d53c..69c45b6d88bdb1 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 1c28fb9e805d70..b455810bfea3b9 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 72d92fdebca616..eb271cb1a05136 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 8a10604d8d3963..e73dfe8c8697a3 100644 --- a/var/spack/repos/builtin/packages/jags/package.py +++ b/var/spack/repos/builtin/packages/jags/package.py @@ -13,7 +13,7 @@ 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") @@ -22,6 +22,10 @@ class Jags(AutotoolsPackage): 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 ce7b62ac54f09e..56e9d14a55f1b2 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 26903db65248e9..b57e73df86f4cd 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 034040dcadba11..96ecf3588bb700 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 a90cffe4c12d27..2a60a476685448 100644 --- a/var/spack/repos/builtin/packages/jasper/package.py +++ b/var/spack/repos/builtin/packages/jasper/package.py @@ -3,35 +3,45 @@ # # 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.25", sha256="f5bc48e2884bcabd2aca1737baff4ca962ec665b6eb673966ced1f7adea07edb") 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") @@ -43,70 +53,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") + +class CMakeBuilder(cmake.CMakeBuilder): def cmake_args(self): - spec = self.spec - args = std_cmake_args - args.append("-DJAS_ENABLE_DOC=false") - args.append("-DCMAKE_C_FLAGS=-std=c99") - - 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") + 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/jbigkit/package.py b/var/spack/repos/builtin/packages/jbigkit/package.py index 6a95bd304be4bf..9551d7b046ef43 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 c6a991b33dd9ac..dcbf609af95de1 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/jellyfish/package.py b/var/spack/repos/builtin/packages/jellyfish/package.py index d6c62be341bd01..f20643fa8d020e 100644 --- a/var/spack/repos/builtin/packages/jellyfish/package.py +++ b/var/spack/repos/builtin/packages/jellyfish/package.py @@ -28,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 938e506b2ac610..e2bbecd2afac1d 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 5f266d1936a883..5a63d2264403e5 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 35fc0ed7d09acc..b764fe7e129cd4 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 a3eba1e202394c..317627f4de8807 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 0e03ff63194461..011fc980f4eca2 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 3f997647f9e7bd..c2d2df46064417 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 070889c15ea9ad..802cdce85879d4 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 e0465cbb1c0c52..69886aa9b26068 100644 --- a/var/spack/repos/builtin/packages/jq/package.py +++ b/var/spack/repos/builtin/packages/jq/package.py @@ -21,6 +21,8 @@ class Jq(AutotoolsPackage): 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 c5ebb20a458fce..59da279e5e79fc 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 @@ def patch(self): 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 b0b0091c9e903b..0ad82764b49c4f 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 334cd6093ec69b..722fd2256b8a95 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 8c5050761f5590..747aa8b205588a 100644 --- a/var/spack/repos/builtin/packages/jsoncpp/package.py +++ b/var/spack/repos/builtin/packages/jsoncpp/package.py @@ -35,6 +35,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 e5db816c56a13d..24d5465b40947e 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 @@ def install_targets(self): @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 ccd759d9667908..554e98c06949b1 100644 --- a/var/spack/repos/builtin/packages/jube/package.py +++ b/var/spack/repos/builtin/packages/jube/package.py @@ -16,6 +16,21 @@ 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", diff --git a/var/spack/repos/builtin/packages/judy/package.py b/var/spack/repos/builtin/packages/judy/package.py index 7dec30271082b5..9353721974d083 100644 --- a/var/spack/repos/builtin/packages/judy/package.py +++ b/var/spack/repos/builtin/packages/judy/package.py @@ -9,11 +9,13 @@ 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 4d1f336fd77fa9..7c22aa696bcc8a 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/package.py b/var/spack/repos/builtin/packages/julia/package.py index 00011c3c12e0d9..0508410e896f9f 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -26,10 +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") @@ -47,6 +53,9 @@ class Julia(MakefilePackage): version("1.6.5", sha256="b70ae299ff6b63a9e9cbf697147a48a31b4639476d1947cb52e4201e444f23cb") version("1.6.4", sha256="a4aa921030250f58015201e28204bff604a007defc5a379a608723e6bb1808d4") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + variant("precompile", default=True, description="Improve julia startup time") variant("openlibm", default=True, description="Use openlibm instead of libm") @@ -61,9 +70,24 @@ 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:1.9") - depends_on("libuv-julia@1.44.3", when="@1.10.0:") + 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, @@ -169,6 +193,14 @@ class Julia(MakefilePackage): 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( @@ -274,7 +306,7 @@ def patch(self): 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 00000000000000..f6c4c3a8f0fe4a --- /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 ed0e80b2298563..18c4939dd26651 100644 --- a/var/spack/repos/builtin/packages/justbuild/package.py +++ b/var/spack/repos/builtin/packages/justbuild/package.py @@ -24,6 +24,9 @@ class Justbuild(Package): license("Apache-2.0") version("master", branch="master") + 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") @@ -34,6 +37,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 8b32ea1a372598..e0cc0a39713ee0 100644 --- a/var/spack/repos/builtin/packages/jwt-cpp/package.py +++ b/var/spack/repos/builtin/packages/jwt-cpp/package.py @@ -23,6 +23,8 @@ class JwtCpp(CMakePackage): 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 diff --git a/var/spack/repos/builtin/packages/jxrlib-debian/package.py b/var/spack/repos/builtin/packages/jxrlib-debian/package.py index b1c239aa37beff..9728efb5493ae7 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 14452606a6a38d..0448f21240fe92 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 ec6ac84b9a861e..b77b4113b2132f 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 2c46dfc2d4cb66..85f4ec7e3745dd 100644 --- a/var/spack/repos/builtin/packages/kafka/package.py +++ b/var/spack/repos/builtin/packages/kafka/package.py @@ -21,7 +21,15 @@ class Kafka(Package): license("EPL-2.0") version( - "2.13-3.7.0", sha256="65f26e5937bbb76dfe78dfb416730dfa7e3378b27e13fd1e204f1a1099bfaf9c" + "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" 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 00000000000000..01831e824e5da7 --- /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 ++#include + #include + #include + #include diff --git a/var/spack/repos/builtin/packages/kahip/package.py b/var/spack/repos/builtin/packages/kahip/package.py index a623635468ffa4..314e37296c697d 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/package.py b/var/spack/repos/builtin/packages/kakoune/package.py index 345a69f3ae887e..a55761fcb6470d 100644 --- a/var/spack/repos/builtin/packages/kakoune/package.py +++ b/var/spack/repos/builtin/packages/kakoune/package.py @@ -14,10 +14,16 @@ 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" ) @@ -25,6 +31,8 @@ class Kakoune(MakefilePackage): "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 c82f20469c2ecf..ceb29bc7a078bf 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 576c0850da5d4f..7411a8e257e327 100644 --- a/var/spack/repos/builtin/packages/kaldi/package.py +++ b/var/spack/repos/builtin/packages/kaldi/package.py @@ -7,6 +7,8 @@ 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 @@ def install(self, spec, prefix): 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 @@ def install(self, spec, prefix): 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 a4c0632c083198..f9b0895dc15ca0 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 a0cba6850c066f..21fbdbe7c2db3d 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 @@ def autoreconf(self): # 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 17adf4970f587b..75f2b63c8f8bdf 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 @@ def patch(self): ) 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 561f5ae57bc35e..991bdad6d80be5 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 f0cfb30ec95ef1..4bf45f3f9883af 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 @@ def cmake_args(self): # 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 3dc83d23b0c05d..f49d74176fd5f5 100644 --- a/var/spack/repos/builtin/packages/kdiff3/package.py +++ b/var/spack/repos/builtin/packages/kdiff3/package.py @@ -9,13 +9,15 @@ 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 58d7e5e5fa868e..1adaa997a5481b 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 f7691cfc83848e..2939c85d73bced 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 e7f2333d1d7de8..58042c927d9359 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 e22aeaa1a4ce0d..455bf1841b69f1 100644 --- a/var/spack/repos/builtin/packages/keepassxc/package.py +++ b/var/spack/repos/builtin/packages/keepassxc/package.py @@ -25,6 +25,9 @@ class Keepassxc(CMakePackage): 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") 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 00000000000000..f0a799d3060f85 --- /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 00000000000000..10a460d7810ebc --- /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 7757320c72d62c..d2838c9da62de9 100644 --- a/var/spack/repos/builtin/packages/kentutils/package.py +++ b/var/spack/repos/builtin/packages/kentutils/package.py @@ -3,39 +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" - version("459", sha256="0b6e89a183e6385c713cf010a7aeead9da6626d8d2f78c363a4f1bc56ccccebb") - # The above archive only goes back to v305. v302 is left for now but deprecated. Suggest - # this is dropped on next update (v302 is from 2014!) and the `requires()` removed. + 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( - "302.1", - commit="d8376c5d52a161f2267346ed3dc94b5dce74c2f9", - git="https://github.com/ENCODE-DCC/kentUtils.git", + "459", + sha256="0b6e89a183e6385c713cf010a7aeead9da6626d8d2f78c363a4f1bc56ccccebb", deprecated=True, ) - depends_on("libpng") - depends_on("openssl") - depends_on("libuuid") - depends_on("mariadb") - depends_on("zlib-api") - depends_on("freetype") - depends_on("libiconv") + 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") - requires("%gcc", when="@302.1") + # 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 == "ldflags": + 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) + + 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 + + src_prefix = "kent/src" + + 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) + + install_kent("inc", tree=True) + if spec.satisfies("+builtin_htslib"): + install_kent("htslib/htslib", tree=True) + + 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 45fbb4de5beeb6..6278778e2e4c09 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 index c93b4fbacd5cc6..7c5dd928330a3f 100644 --- a/var/spack/repos/builtin/packages/khmer/package.py +++ b/var/spack/repos/builtin/packages/khmer/package.py @@ -17,6 +17,9 @@ class Khmer(PythonPackage): 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:") diff --git a/var/spack/repos/builtin/packages/kibana/package.py b/var/spack/repos/builtin/packages/kibana/package.py index 266a79685432d5..bbf8146ec2fb01 100644 --- a/var/spack/repos/builtin/packages/kibana/package.py +++ b/var/spack/repos/builtin/packages/kibana/package.py @@ -15,6 +15,8 @@ class Kibana(Package): version("6.4.0", sha256="df2056105a08c206a1adf9caed09a152a53429a0f1efc1ba3ccd616092d78aee") + depends_on("cxx", type="build") # generated + depends_on("java", type="run") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/kicad/package.py b/var/spack/repos/builtin/packages/kicad/package.py index 81db728ecc0400..04ce3b555fcd55 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 @@ def install_libraries(self): 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 812b4f39e46729..bbe6f3a8cd2532 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") diff --git a/var/spack/repos/builtin/packages/kineto/package.py b/var/spack/repos/builtin/packages/kineto/package.py index 4c174114003c6a..5aa1c15faa347e 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 8ff092a50ba22e..b9e65e5bb0c351 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 962042f5a8904f..f1eae61f16816e 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 3c0d1a2c15d876..b017ff986b0317 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 ae6713cd3d1709..e3db858ff5b7cd 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 c0582f19560fa9..9ade1c168a083f 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 590bfffccad6ce..f8dc26ad8969e3 100644 --- a/var/spack/repos/builtin/packages/kokkos-kernels/package.py +++ b/var/spack/repos/builtin/packages/kokkos-kernels/package.py @@ -25,6 +25,8 @@ class KokkosKernels(CMakePackage, CudaPackage): # openssl sha256 kokkos-kernels-x.y.z.tar.gz version("develop", branch="develop") version("master", branch="master") + version("4.4.01", sha256="9f741449f5ace5a7d8a5a81194ff2108e5525d16f08fcd9bb6c9bb4853d7720d") + version("4.4.00", sha256="6559871c091eb5bcff53bae5a0f04f2298971d1aa1b2c135bd5a2dae3f9376a2") version("4.3.01", sha256="749553a6ea715ba1e56fa0b13b42866bb9880dba7a94e343eadf40d08c68fab8") version("4.3.00", sha256="03c3226ee97dbca4fa56fe69bc4eefa0673e23c37f2741943d9362424a63950e") version("4.2.01", sha256="058052b3a40f5d4e447b7ded5c480f1b0d4aa78373b0bc7e43804d0447c34ca8") @@ -46,9 +48,13 @@ class KokkosKernels(CMakePackage, CudaPackage): version("3.1.00", sha256="27fea241ae92f41bd5b070b1a590ba3a56a06aca750207a98bea2f64a4a40c89") version("3.0.00", sha256="e4b832aed3f8e785de24298f312af71217a26067aea2de51531e8c1e597ef0e6") + 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.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") @@ -161,11 +167,15 @@ class KokkosKernels(CMakePackage, CudaPackage): 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") diff --git a/var/spack/repos/builtin/packages/kokkos-legacy/package.py b/var/spack/repos/builtin/packages/kokkos-legacy/package.py index fb1a005a70016f..c0eebf980c7ecd 100644 --- a/var/spack/repos/builtin/packages/kokkos-legacy/package.py +++ b/var/spack/repos/builtin/packages/kokkos-legacy/package.py @@ -87,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)") @@ -243,7 +246,7 @@ def install(self, spec, prefix): cuda_options_args = [] # PIC - if "+pic" in spec: + if spec.satisfies("+pic"): g_args.append("--cxxflags=-fPIC") # C++ standard @@ -252,19 +255,19 @@ def install(self, spec, prefix): 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: + if spec.satisfies("+qthreads"): g_args.append(f"--with-qthreads={spec['qthreads'].prefix}") - if "+cuda" in spec: + if spec.satisfies("+cuda"): g_args.append(f"--with-cuda={spec['cuda'].prefix}") # Host architectures host_arch = spec.variants["host_arch"].value @@ -279,31 +282,31 @@ def install(self, spec, prefix): 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(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(f"--with-options={','.join(kokkos_options_args)}") 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 2f2d5a14ec8a60..ae8aca3945b592 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,8 @@ 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") @@ -46,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 00000000000000..c35e8dbe8d983e --- /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 e55746b7bf0e8b..65e6b0adb8ba11 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os.path -from llnl.util import lang, tty +import llnl.util.lang as lang from spack.package import * @@ -27,6 +27,8 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): version("master", branch="master") version("develop", branch="develop") + 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") @@ -50,7 +52,10 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): version("3.1.00", sha256="b935c9b780e7330bcb80809992caa2b66fd387e3a1c261c955d622dae857d878") version("3.0.00", sha256="c00613d0194a4fbd0726719bbed8b0404ed06275f310189b3493f5739042a92b") + 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"], @@ -64,6 +69,10 @@ 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="%oneapi@2022:") @@ -197,6 +206,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): 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)) @@ -206,10 +216,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") @@ -221,6 +238,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( @@ -259,6 +280,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).""" @@ -279,7 +307,7 @@ def append_args(self, cmake_prefix, cmake_options, spack_options): 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: @@ -296,18 +324,21 @@ def cmake_args(self): 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: @@ -323,7 +354,7 @@ def cmake_args(self): 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: @@ -347,46 +378,40 @@ def cmake_args(self): 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")) - # Kokkos 4.2.00+ changed the default to Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC=on - # which breaks GPU-aware with Cray-MPICH - # See https://github.com/kokkos/kokkos/pull/6402 - # TODO: disable this once Cray-MPICH is fixed - if ( - self.spec.satisfies("@4.2.00:") - and "mpi" in self.spec - and self.spec["mpi"].name == "cray-mpich" - ): - options.append(self.define("Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC", False)) + 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 @@ -399,47 +424,29 @@ def setup_build_tests(self): 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 6bfaef69c93f60..806e3d29da4d4b 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 efe7513656cdc3..5a41bff18ccd80 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 c4610dac2f2bf5..848dc0b9b4adb4 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 d53fdab882ab04..0485a999005c8b 100644 --- a/var/spack/repos/builtin/packages/krb5/package.py +++ b/var/spack/repos/builtin/packages/krb5/package.py @@ -16,21 +16,49 @@ class Krb5(AutotoolsPackage): list_url = "https://kerberos.org/dist/krb5/" list_depth = 1 - license("MIT") - - 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") + 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") @@ -39,7 +67,7 @@ class Krb5(AutotoolsPackage): 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" diff --git a/var/spack/repos/builtin/packages/krims/package.py b/var/spack/repos/builtin/packages/krims/package.py index 3d07b1a5b6e5f2..2670d5d0b8f81e 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 @@ def cmake_args(self): 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 00000000000000..9e54cedc6abc3e --- /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 +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 87a31c896c06c8..2cfabaed50fc1e 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -21,6 +21,15 @@ class Kripke(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") 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" ) @@ -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.") @@ -55,10 +68,26 @@ class Kripke(CMakePackage, CudaPackage, ROCmPackage): 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 = [] @@ -74,17 +103,18 @@ def cmake_args(self): ] ) - 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))) @@ -93,7 +123,7 @@ def cmake_args(self): # 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"): @@ -113,4 +143,7 @@ def install(self, spec, prefix): # 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 786a948c816529..f5d03af3fa3646 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 84ba7935c4da99..02be4abf8d01aa 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 2ccd22dbbb9e36..45825157ac9452 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 d1627d064c87b0..bd73a3be8fc505 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 042c5a75912932..865c712c14ca3c 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,8 @@ class Kvtree(CMakePackage): version("1.0.3", sha256="c742cdb1241ef4cb13767019204d5350a3c4383384bed9fb66680b93ff44b0d4") version("1.0.2", sha256="56fb5b747758c24a907a8380e8748d296900d94de9547bc15f6b427ac4ae2ec4") + depends_on("c", type="build") # generated + depends_on("zlib-api", type="link") variant("mpi", default=True, description="Build with MPI message packing") @@ -53,15 +56,12 @@ def cmake_args(self): 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 623b23273e0e6c..4d4e3df591e387 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 409fbc1532209e..684cbbd2d4fd30 100644 --- a/var/spack/repos/builtin/packages/kyotocabinet/package.py +++ b/var/spack/repos/builtin/packages/kyotocabinet/package.py @@ -18,6 +18,9 @@ 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")) diff --git a/var/spack/repos/builtin/packages/laghos/package.py b/var/spack/repos/builtin/packages/laghos/package.py index 270c78c831ea89..0c3b59cc40ce47 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") @@ -61,7 +63,7 @@ def build_targets(self): 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 3f0625c9737624..5c6a4115dd4bc5 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 00000000000000..4233b0da2b3c0f --- /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 7d007d559f8c04..6b8287b49ce2d4 100644 --- a/var/spack/repos/builtin/packages/lammps/package.py +++ b/var/spack/repos/builtin/packages/lammps/package.py @@ -5,6 +5,8 @@ import datetime as dt import os +from spack.build_environment import optimization_flags +from spack.build_systems.python import PythonPipBuilder from spack.package import * @@ -30,18 +32,47 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension): # * patch releases older than a stable release should be marked deprecated=True version("develop", branch="develop") version( - "20240207.1", sha256="3ba62c2a1ed463fceedf313a1c3ea2997994aa102379a8d35b525ea424f56776" + "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") + version( + "20231121", + sha256="704d8a990874a425bcdfe0245faf13d712231ba23f014a3ebc27bc14398856f1", + deprecated=True, + ) + version( + "20230802.4", sha256="6eed007cc24cda80b5dd43372b2ad4268b3982bb612669742c8c336b79137b5b" + ) version( "20230802.3", sha256="6666e28cb90d3ff01cbbda6c81bdb85cf436bbb41604a87f2ab2fa559caa8510", - preferred=True, + deprecated=True, ) version( "20230802.2", @@ -367,7 +398,20 @@ 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", @@ -461,6 +505,7 @@ def url_for_version(self, version): "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}, @@ -482,6 +527,7 @@ def url_for_version(self, version): "reaction": {"when": "@20210702:"}, "reax": {"when": "@:20181212"}, "reaxff": {"when": "@20210702:"}, + "rheo": {"when": "@20240829:"}, "replica": {}, "rigid": {"default": True}, "shock": {}, @@ -556,6 +602,7 @@ def url_for_version(self, version): 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( @@ -587,6 +634,29 @@ def url_for_version(self, version): values=("single", "double"), 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", @@ -595,13 +665,20 @@ def url_for_version(self, version): 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") @@ -625,11 +702,14 @@ def url_for_version(self, version): 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") @@ -653,6 +733,7 @@ def url_for_version(self, version): depends_on("hipcub", when="~kokkos +rocm") 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: @@ -671,7 +752,6 @@ def url_for_version(self, version): 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") @@ -721,6 +801,12 @@ def url_for_version(self, version): 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( @@ -771,15 +857,16 @@ def cmake_args(self): 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")) @@ -787,19 +874,23 @@ def cmake_args(self): 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)) @@ -807,20 +898,30 @@ def cmake_args(self): 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 = spec.architecture.target.optimization_flags(spec.compiler) + 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")) @@ -828,21 +929,17 @@ def cmake_args(self): 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]) @@ -852,29 +949,27 @@ def cmake_args(self): # 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 "@:20231121" in spec: - if "^hip@:5.4" in spec: + if spec.satisfies("@:20231121"): + if spec.satisfies("^hip@:5.4"): args.append(self.define("HIP_PATH", f"{spec['hip'].prefix}/hip")) - elif "^hip@5.5:" in spec: + elif spec.satisfies("^hip@5.5:"): args.append(self.define("HIP_PATH", spec["hip"].prefix)) return args @@ -885,13 +980,21 @@ def setup_build_environment(self, env): 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): @@ -901,5 +1004,4 @@ def install_python(self): 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 26bac1ecf27e92..9027d4eeda7437 100644 --- a/var/spack/repos/builtin/packages/landsfcutil/package.py +++ b/var/spack/repos/builtin/packages/landsfcutil/package.py @@ -19,11 +19,14 @@ 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") - variant("pfunit", default=False, description="Enable pFunit testing") + depends_on("fortran", type="build") - depends_on("pfunit", when="+pfunit") + 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)] diff --git a/var/spack/repos/builtin/packages/lapackpp/package.py b/var/spack/repos/builtin/packages/lapackpp/package.py index fcea2cc87574a8..db32de97e15430 100644 --- a/var/spack/repos/builtin/packages/lapackpp/package.py +++ b/var/spack/repos/builtin/packages/lapackpp/package.py @@ -11,6 +11,7 @@ _versions = [ # LAPACK++, BLAS++ ["master", "master"], + ["2024.05.31", "2024.05.31"], ["2023.11.05", "2023.11.05"], ["2023.08.25", "2023.08.25"], ["2023.06.00", "2023.06.00"], @@ -36,6 +37,9 @@ class Lapackpp(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") version("master", branch="master") + version( + "2024.05.31", sha256="093646d492a4c2c6b4d7001effb559c80da7fa31fd5ba517a6d686ca8c78cd99" + ) version( "2023.11.05", sha256="9a505ef4e76504b6714cc19eb1b58939694f9ab51427a5bb915b016d615570ca" ) @@ -64,6 +68,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") @@ -98,15 +104,15 @@ def cmake_args(self): 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, diff --git a/var/spack/repos/builtin/packages/last/package.py b/var/spack/repos/builtin/packages/last/package.py index bbc2e87a22df0e..a5419d8193c575 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 6f366e74b75762..d570d32c247a8d 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 b6d5d763c3fb8f..30a2a58bbbb69d 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 cc9346e4faa044..a37e7a964c3b05 100644 --- a/var/spack/repos/builtin/packages/latex2html/package.py +++ b/var/spack/repos/builtin/packages/latex2html/package.py @@ -119,7 +119,7 @@ def configure_args(self): 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 ca5605f7248134..19a9a4927511b9 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 4ca7b03b1f8ae3..45f35f0eb30742 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 00000000000000..54332bd2edc367 --- /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 e8feffcf2251f7..7ef76106b866a9 100644 --- a/var/spack/repos/builtin/packages/lazygit/package.py +++ b/var/spack/repos/builtin/packages/lazygit/package.py @@ -17,5 +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 b155958a882450..9b426725591e74 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 @@ def cmake_args(self): 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 @@ def cmake_args(self): ] ) - 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 e875832b928703..0686530d21c5a1 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 @@ def _get_sys_type(self, spec): @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 @@ def initconfig_compiler_entries(self): 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 @@ def initconfig_compiler_entries(self): 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 @@ def initconfig_compiler_entries(self): ) # 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 @@ def initconfig_hardware_entries(self): 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 @@ def initconfig_hardware_entries(self): 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,7 +393,9 @@ def initconfig_package_entries(self): 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)) diff --git a/var/spack/repos/builtin/packages/lbfgspp/package.py b/var/spack/repos/builtin/packages/lbfgspp/package.py index 688ceeb5b17788..cdf3082dac43b5 100644 --- a/var/spack/repos/builtin/packages/lbfgspp/package.py +++ b/var/spack/repos/builtin/packages/lbfgspp/package.py @@ -17,4 +17,6 @@ class Lbfgspp(CMakePackage): 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 4e6765a9c6c691..122ddbc0c84575 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 00000000000000..60ff03576b29a8 --- /dev/null +++ b/var/spack/repos/builtin/packages/lc-framework/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 * + + +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(self.builder.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 4ed9f48ee2c477..4fe7b4462f67d2 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 00000000000000..4a30ea36c9cdde --- /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 f38550f748fe1a..c768ee39be1f1c 100644 --- a/var/spack/repos/builtin/packages/lcio/package.py +++ b/var/spack/repos/builtin/packages/lcio/package.py @@ -21,6 +21,9 @@ 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") @@ -43,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", @@ -63,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 5fcf28bf7f9722..ce452131b2f394 100644 --- a/var/spack/repos/builtin/packages/lcms/package.py +++ b/var/spack/repos/builtin/packages/lcms/package.py @@ -3,32 +3,61 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import pathlib + 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 9794fb69e533ba..54ab5955e36bc8 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 9dd4638c30045e..c4855de475343e 100644 --- a/var/spack/repos/builtin/packages/ldak/package.py +++ b/var/spack/repos/builtin/packages/ldak/package.py @@ -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 7c9730c03d011a..c51e3016170151 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 a297edf5b7f126..d44db2b064247f 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 @@ def cmake_args(self): 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 index aa3defd512d9a9..00f7bc60607063 100644 --- a/var/spack/repos/builtin/packages/ldsc/package.py +++ b/var/spack/repos/builtin/packages/ldsc/package.py @@ -10,7 +10,7 @@ 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 = "http://github.com/bulik/ldsc" + homepage = "https://github.com/bulik/ldsc" pypi = "ldsc/ldsc-2.0.1.tar.gz" license("GPL-3.0-only", checked_by="A-N-Other") diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py index 7e429f038e9369..74f46d380ae1f3 100644 --- a/var/spack/repos/builtin/packages/legion/package.py +++ b/var/spack/repos/builtin/packages/legion/package.py @@ -29,6 +29,8 @@ class Legion(CMakePackage, ROCmPackage): 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") @@ -50,6 +52,10 @@ class Legion(CMakePackage, ROCmPackage): 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 # layer. At present the MPI layer is still experimental and we discourge its @@ -87,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}", @@ -120,6 +128,9 @@ def patch(self): 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") @@ -127,8 +138,8 @@ def patch(self): # 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 @@ -265,6 +276,12 @@ def validate_gasnet_root(value): 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", @@ -288,13 +305,17 @@ def validate_gasnet_root(value): 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 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 @@ -313,109 +334,114 @@ def cmake_args(self): 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")) - if "@23.03.0:23.12.0" in spec: + 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??? @@ -446,6 +472,13 @@ def cmake_args(self): # 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): @@ -465,20 +498,17 @@ def install(self, spec, prefix): 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 = [ f"-DCMAKE_C_COMPILER={self.compiler.cc}", @@ -486,16 +516,12 @@ def run_local_function_tasks_test(self): f"-DLegion_DIR={join_path(self.prefix, 'share', 'Legion', 'cmake')}", ] - self.run_test( - "cmake", - options=cmake_args, - purpose=f"test: generate makefile for {exe} example", - work_dir=test_dir, - ) - - self.run_test("make", purpose=f"test: build {exe} example", work_dir=test_dir) + with working_dir(test_dir): + cmake = self.spec["cmake"].command + cmake(*cmake_args) - self.run_test(exe, purpose=f"test: run {exe} example", 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 21effe4636ef64..8c770a3c230e94 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 14e8e144f32365..25cfd3f3730ddc 100644 --- a/var/spack/repos/builtin/packages/leptonica/package.py +++ b/var/spack/repos/builtin/packages/leptonica/package.py @@ -22,6 +22,9 @@ class Leptonica(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/lerc/package.py b/var/spack/repos/builtin/packages/lerc/package.py index 0e7137118099cc..3ce249af434b64 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 3e4b402deec5b0..8e974da266dcbc 100644 --- a/var/spack/repos/builtin/packages/less/package.py +++ b/var/spack/repos/builtin/packages/less/package.py @@ -17,9 +17,13 @@ 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") + 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 8c936d91566274..f8966c74efa83c 100644 --- a/var/spack/repos/builtin/packages/lesstif/package.py +++ b/var/spack/repos/builtin/packages/lesstif/package.py @@ -9,13 +9,15 @@ 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 @@ def configure_args(self): "--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 1eaadf2058daa6..6c153c8f4302de 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 @@ def install(self, spec, prefix): 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 50f157e1be8e15..a2d3bec19b7147 100644 --- a/var/spack/repos/builtin/packages/lfortran/package.py +++ b/var/spack/repos/builtin/packages/lfortran/package.py @@ -21,6 +21,10 @@ class Lfortran(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/lftp/package.py b/var/spack/repos/builtin/packages/lftp/package.py index abf613e12b3387..f5bce1fc233802 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") diff --git a/var/spack/repos/builtin/packages/lhapdf/package.py b/var/spack/repos/builtin/packages/lhapdf/package.py index 2a9bc2583cd4fd..9a86639a458bcb 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 @@ def setup_build_environment(self, env): # 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 94fa2b369c2dc0..952a42a4a09aed 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 deb654c067332f..2dbe00a9a9251c 100644 --- a/var/spack/repos/builtin/packages/lhapdfsets/package.py +++ b/var/spack/repos/builtin/packages/lhapdfsets/package.py @@ -74,8 +74,8 @@ def setup_run_environment(self, env): @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 1d5cf3071f3de6..ecc8c645b05c39 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 5c2a21a5c6671f..f0498b3fd0dec5 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 diff --git a/var/spack/repos/builtin/packages/libaio/package.py b/var/spack/repos/builtin/packages/libaio/package.py index 9e01952ff898c7..46f15792648072 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 d93e765e2ff9f8..1326940964b4d5 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 d3d4d579ffebf3..203ac436796632 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 39bad41c7b1147..4eda5032cf3103 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 79911083259d09..124b8a25f0188e 100644 --- a/var/spack/repos/builtin/packages/libarchive/package.py +++ b/var/spack/repos/builtin/packages/libarchive/package.py @@ -17,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", @@ -64,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", @@ -130,7 +164,7 @@ def configure_args(self): args += self.with_or_without("xar") args += self.enable_or_disable("programs") - if "+iconv" in spec: + if spec.satisfies("+iconv"): if spec["iconv"].name == "libiconv": args.append(f"--with-libiconv-prefix={spec['iconv'].prefix}") else: diff --git a/var/spack/repos/builtin/packages/libasr/package.py b/var/spack/repos/builtin/packages/libasr/package.py index f4bd5bde80deab..b01cd9c0536fd2 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 c58c6d9d19093a..ccd55d3e18b2bf 100644 --- a/var/spack/repos/builtin/packages/libassuan/package.py +++ b/var/spack/repos/builtin/packages/libassuan/package.py @@ -15,6 +15,8 @@ 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") @@ -23,8 +25,12 @@ 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", diff --git a/var/spack/repos/builtin/packages/libatasmart/package.py b/var/spack/repos/builtin/packages/libatasmart/package.py index ee2dd4dfeaa94a..966cabfea87cd7 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 824ab870a96e1b..da7561ebe2c30a 100644 --- a/var/spack/repos/builtin/packages/libatomic-ops/package.py +++ b/var/spack/repos/builtin/packages/libatomic-ops/package.py @@ -22,5 +22,7 @@ class LibatomicOps(AutotoolsPackage): 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 00000000000000..5889f39d407059 --- /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 7c258776272afd..a2379f591dded2 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 4fff19fe9c09dc..312c98ebf89063 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 @@ def configure_args(self): "--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 2179a6de315987..5ff0acb1a19fa6 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 430c6d5593c899..8a6cde1b8ddef7 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 3d086a555020d5..0206ca9b15fce1 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 c7c498e97d70c0..f10e7089ce995c 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 5d7ad3ab715902..a3718c82172566 100644 --- a/var/spack/repos/builtin/packages/libbsd/package.py +++ b/var/spack/repos/builtin/packages/libbsd/package.py @@ -21,6 +21,7 @@ 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") @@ -35,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 f394f6684110b8..1584f5bd29eb86 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 9c36c2d8aa9b04..7a0102b8f9e5b5 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/libcanberra/package.py b/var/spack/repos/builtin/packages/libcanberra/package.py index ba94f92309136b..7e09b89f094d4c 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 8256fc16a5fec2..064fd9b5d0f57b 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") diff --git a/var/spack/repos/builtin/packages/libcap/package.py b/var/spack/repos/builtin/packages/libcap/package.py index 6dedb75748f140..8793f4bd6d63e0 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 @@ def makeflags(self, prefix): "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 c4f5579e645007..bf10c56b430ecf 100644 --- a/var/spack/repos/builtin/packages/libcatalyst/package.py +++ b/var/spack/repos/builtin/packages/libcatalyst/package.py @@ -24,6 +24,11 @@ class Libcatalyst(CMakePackage): version("master", branch="master") 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") @@ -32,6 +37,8 @@ class Libcatalyst(CMakePackage): 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.""" diff --git a/var/spack/repos/builtin/packages/libceed/package.py b/var/spack/repos/builtin/packages/libceed/package.py index 5ca941bd0613eb..5900047a790623 100644 --- a/var/spack/repos/builtin/packages/libceed/package.py +++ b/var/spack/repos/builtin/packages/libceed/package.py @@ -31,6 +31,10 @@ 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:") @@ -72,12 +76,12 @@ def common_make_opts(self): # 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" @@ -110,7 +114,7 @@ def common_make_opts(self): 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"): @@ -124,17 +128,17 @@ def common_make_opts(self): # 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 fb84326608de62..a00b140f9e9aaa 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 8c564733515b56..67cd8e8ec24899 100644 --- a/var/spack/repos/builtin/packages/libcgroup/package.py +++ b/var/spack/repos/builtin/packages/libcgroup/package.py @@ -9,14 +9,20 @@ 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 8273d63b3804c0..cb9ec5aec28a7e 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 115164fd99ad0f..a07cf2bb347e38 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 a798afa49ceaed..2b2430577824ac 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 e04391ba89c842..cdb5cc66dbdabf 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 851b364f8de8cc..ebb68789434e4e 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 d1ac1b924429bc..86332a99e96938 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 f3b56e93b470d5..b3fc85919d354f 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 7d2b27346c311d..5173eb1b590dd5 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 eaf7fab4559460..a7ae12acb2e3ba 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 9cdcfea1f8ed6d..e5ecdfe8fa53bd 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 c1d79006978bc2..098ea2af6e554c 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 a73e9947c0a7c0..92c127ee5447df 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 bff324e0c174a9..5e17fad7006296 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") diff --git a/var/spack/repos/builtin/packages/libdatrie/package.py b/var/spack/repos/builtin/packages/libdatrie/package.py index f2534674bd3174..0437fe86218ead 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 b8151a70d9df88..f84ff749d2fd8e 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 7e6db94a658944..175c52c3a687a3 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 f140cb57a3f487..a79d5c8beaf70d 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 index 4ee90bfebf974b..ab55e4c220e93f 100644 --- a/var/spack/repos/builtin/packages/libdicom/package.py +++ b/var/spack/repos/builtin/packages/libdicom/package.py @@ -14,8 +14,11 @@ class Libdicom(MesonPackage): 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") diff --git a/var/spack/repos/builtin/packages/libdistributed/package.py b/var/spack/repos/builtin/packages/libdistributed/package.py index 83d5aab986237a..42566c109ce593 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 @@ def cmake_args(self): @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 bebbc0c57b19c2..4b6a56e19f39c2 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 80122777e866d9..177623e25f820f 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 7d1c88285dd73b..5a6aa91b2710fe 100644 --- a/var/spack/repos/builtin/packages/libdrm/package.py +++ b/var/spack/repos/builtin/packages/libdrm/package.py @@ -6,18 +6,22 @@ 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") @@ -39,16 +43,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@0.53:", type="build", when="@2.4.101:") - depends_on("meson@0.59:", type="build", when="@2.4.117:") + # 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"): @@ -66,24 +78,8 @@ def url_for_version(self, version): 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") @@ -99,12 +95,10 @@ def configure_args(self): 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 f935a7ca79147f..e62211790b774b 100644 --- a/var/spack/repos/builtin/packages/libdwarf/package.py +++ b/var/spack/repos/builtin/packages/libdwarf/package.py @@ -12,7 +12,7 @@ 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 +25,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 02c69137c38b0b..d749d9e9bf29ac 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 dc6c9af0624466..34bab8e69cd132 100644 --- a/var/spack/repos/builtin/packages/libecpint/package.py +++ b/var/spack/repos/builtin/packages/libecpint/package.py @@ -26,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 0353765a68882b..98ecb9251b8ce2 100644 --- a/var/spack/repos/builtin/packages/libedit/package.py +++ b/var/spack/repos/builtin/packages/libedit/package.py @@ -12,8 +12,14 @@ 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" ) @@ -33,6 +39,8 @@ class Libedit(AutotoolsPackage): "3.1-20150325", sha256="c88a5e4af83c5f40dda8455886ac98923a9c33125699742603a88a0253fcc8c5" ) + depends_on("c", type="build") + depends_on("pkgconfig", type="build") depends_on("ncurses") @@ -43,7 +51,7 @@ def url_for_version(self, version): 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 a0178ed080925e..70902fb8876219 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 dfce6aac727a07..e7ec4e4253efa2 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 on aarch64 @@ -56,7 +58,7 @@ def install(self, spec, prefix): 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 1736ae80d75a11..800dbc7303b2b3 100644 --- a/var/spack/repos/builtin/packages/libepoxy/package.py +++ b/var/spack/repos/builtin/packages/libepoxy/package.py @@ -6,24 +6,61 @@ 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 +70,7 @@ def configure_args(self): # --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 1f8a2cf0d004b1..140ac55962803c 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 4a9836ead6b540..e436d4d81ed6b9 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 3bd9774d30ab89..4742be67360770 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 22fe9966700b52..2fff5bc04f1b16 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." ) @@ -59,7 +61,7 @@ def libs(self): 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 0b88d6c597c977..2bf9681b800323 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 185be43a3669dd..5c22c9f8f8e415 100644 --- a/var/spack/repos/builtin/packages/libexif/package.py +++ b/var/spack/repos/builtin/packages/libexif/package.py @@ -8,12 +8,21 @@ 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 862595623a1e3f..7aaa7dd73f2b0a 100644 --- a/var/spack/repos/builtin/packages/libfabric/package.py +++ b/var/spack/repos/builtin/packages/libfabric/package.py @@ -10,7 +10,7 @@ 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,9 +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") @@ -62,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", @@ -193,7 +199,7 @@ def configure_args(self): 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") @@ -207,6 +213,9 @@ def configure_args(self): 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 b66f8a3b73fc16..cf3612f0e214c7 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 445f7a3604eb4e..69878f99669065 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 926feb396dddc3..c2b8b12a6e8d5b 100644 --- a/var/spack/repos/builtin/packages/libffi/package.py +++ b/var/spack/repos/builtin/packages/libffi/package.py @@ -33,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") @@ -58,7 +61,7 @@ def flag_handler(self, name, flags): 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 0623e1637bb733..ad3a2d1de1d81c 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 40ef846e163233..c6b41864e724fb 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 71935c8128e1b2..04d2036b6e1b97 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 f92c306aba207a..765e588ee4cc32 100644 --- a/var/spack/repos/builtin/packages/libflame/package.py +++ b/var/spack/repos/builtin/packages/libflame/package.py @@ -72,22 +72,22 @@ def configure_args(self): # 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 a7e30c70dbe1ef..c32b15b764c48c 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 @@ def libs(self): """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 eb0daf794e34e9..8d9a1d93e62481 100644 --- a/var/spack/repos/builtin/packages/libfontenc/package.py +++ b/var/spack/repos/builtin/packages/libfontenc/package.py @@ -9,7 +9,7 @@ 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") @@ -18,8 +18,10 @@ class Libfontenc(AutotoolsPackage, XorgPackage): 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 index aeabbd233e2fbf..6a09762f3e8162 100644 --- a/var/spack/repos/builtin/packages/libfort/package.py +++ b/var/spack/repos/builtin/packages/libfort/package.py @@ -16,6 +16,9 @@ class Libfort(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/libfs/package.py b/var/spack/repos/builtin/packages/libfs/package.py index 05a557246dd06e..d468a495f7fdb0 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 6aabffb453b89d..57d62e0bf69aea 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 @@ def determine_version(cls, exe): 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 @@ def meson(self, spec, prefix): ] 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 9f19520e3ee037..7b2d4ac0d2a26e 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 dfe0bdc2924756..3df08f4a24d696 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 00000000000000..9bd196ff607390 --- /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 +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 +--- + 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 9066892a96332e..44080a58b763e5 100644 --- a/var/spack/repos/builtin/packages/libgcrypt/package.py +++ b/var/spack/repos/builtin/packages/libgcrypt/package.py @@ -16,15 +16,19 @@ 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") + # End of life: 2024-03-31 - version("1.9.4", sha256="ea849c83a72454e3ed4267697e8ca03390aee972ab421e7df69dfe42b65caaf7") - version("1.9.3", sha256="97ebe4f94e2f7e35b752194ce15a0f3c66324e0ff6af26659bbfb5ff2ec328fd") - version("1.9.2", sha256="b2c10d091513b271e47177274607b1ffba3d95b188bbfa8797f948aec9053c5a") - version("1.9.1", sha256="c5a67a8b9b2bd370fb415ed1ee31c7172e5683076493cf4a3678a0fbdf0265d9") + 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") @@ -32,19 +36,15 @@ class Libgcrypt(AutotoolsPackage): version("1.8.5", sha256="3b4a2a94cb637eff5bdebbcaf46f4d95c4f25206f459809339cdada0eb577ac3") version("1.8.4", sha256="f638143a0672628fde0cad745e9b14deb85dffb175709cacc1f4fe24b93f2227") version("1.8.1", sha256="7a2875f8b1ae0301732e878c0cca2c9664ff09ef71408f085c50e332656a78b3") - # End of life: 2019-06-30 - version( - "1.7.6", - sha256="626aafee84af9d2ce253d2c143dc1c0902dda045780cc241f39970fc60be05bc", - deprecated=True, - ) - version( - "1.6.2", - sha256="de084492a6b38cdb27b67eaf749ceba76bf7029f63a9c0c3c1b05c88c9885c4c", - deprecated=True, - ) + + 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 @@ -56,6 +56,9 @@ def flag_handler(self, name, flags): # 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 aba8e8045d13a9..8beb6e83d54050 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") diff --git a/var/spack/repos/builtin/packages/libgdsii/package.py b/var/spack/repos/builtin/packages/libgdsii/package.py index 660ad7e479b07f..2681d3919e7afa 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 1b35c5eb98cbfa..873dba1354f8be 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 @@ def configure_args(self): 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 bfced2214727bd..074a58c675e8c3 100644 --- a/var/spack/repos/builtin/packages/libgff/package.py +++ b/var/spack/repos/builtin/packages/libgff/package.py @@ -17,3 +17,5 @@ class Libgff(CMakePackage): maintainers("ajxander12") version("2.0.0", sha256="7656b19459a7ca7d2fd0fcec4f2e0fd0deec1b4f39c703a114e8f4c22d82a99c") + + depends_on("cxx", type="build") # generated diff --git a/var/spack/repos/builtin/packages/libgit2/package.py b/var/spack/repos/builtin/packages/libgit2/package.py index cb721c99838891..2ba56471b64fcc 100644 --- a/var/spack/repos/builtin/packages/libgit2/package.py +++ b/var/spack/repos/builtin/packages/libgit2/package.py @@ -16,6 +16,7 @@ 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") @@ -65,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", @@ -89,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:") @@ -103,16 +105,16 @@ def flag_handler(self, name, flags): 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") @@ -120,7 +122,7 @@ def cmake_args(self): 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: + if self.spec.satisfies("@:0.27 +curl"): args.append(f"-DCURL={'ON' if '+curl' in self.spec else 'OFF'}") # Control tests diff --git a/var/spack/repos/builtin/packages/libgpg-error/package.py b/var/spack/repos/builtin/packages/libgpg-error/package.py index 0091ec310a3cd1..6b78a254237257 100644 --- a/var/spack/repos/builtin/packages/libgpg-error/package.py +++ b/var/spack/repos/builtin/packages/libgpg-error/package.py @@ -16,6 +16,7 @@ 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") @@ -32,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 fb989c250406f6..3b990e3bd945dd 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 90473c0b0b9abe..85006947773b23 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 a3accd3280b4a3..f838f4d0bab544 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 022be5a31d9abe..629408f62bc035 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 c10e53bcb29666..4092d64ac39124 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 00000000000000..4486d691922edd --- /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 00000000000000..fa2642319299ef --- /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 d0706935ae284e..e3cad31663f64b 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")) diff --git a/var/spack/repos/builtin/packages/libhbaapi/package.py b/var/spack/repos/builtin/packages/libhbaapi/package.py index b61bcf2d7952cd..7749ecbc406e0e 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 fd45ec6bba262d..d33799e21045af 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 e978ede51507e0..fbabcb9d45dde2 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 @@ def configure_args(self): 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 ba0bd486808f0d..a6eeb114566136 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 41f2f3ac691ce5..a76d140078ac73 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 @@ def flag_handler(self, name, flags): 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 2601b3ffbe49e2..19a3fbd7a62881 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 12000ad6307b17..452dbabd65198c 100644 --- a/var/spack/repos/builtin/packages/libical/package.py +++ b/var/spack/repos/builtin/packages/libical/package.py @@ -19,6 +19,9 @@ class Libical(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/libicd/package.py b/var/spack/repos/builtin/packages/libicd/package.py index a8c7521e4495b4..307e372772ded3 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 5a7565b5e7f594..e8807b88817c15 100644 --- a/var/spack/repos/builtin/packages/libice/package.py +++ b/var/spack/repos/builtin/packages/libice/package.py @@ -9,7 +9,7 @@ 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") @@ -21,12 +21,13 @@ class Libice(AutotoolsPackage, XorgPackage): version("1.0.10", sha256="1116bc64c772fd127a0d0c0ffa2833479905e3d3d8197740b3abd5f292f22d2d") version("1.0.9", sha256="7812a824a66dd654c830d21982749b3b563d9c2dfe0b88b203cefc14a891edc0") + 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("libbsd", when="platform=cray") - depends_on("xproto") + 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 91b0b04bd6e0a8..f77b843cb17f91 100644 --- a/var/spack/repos/builtin/packages/libiconv/package.py +++ b/var/spack/repos/builtin/packages/libiconv/package.py @@ -21,6 +21,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", @@ -78,5 +80,5 @@ def configure_args(self): @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 2d28ded9c643d4..1fa9721b6a4bd0 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 5074329b40c405..5dc471aebdb63c 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 index c46f2078bd0153..275ecd5f4f124c 100644 --- a/var/spack/repos/builtin/packages/libidn/package.py +++ b/var/spack/repos/builtin/packages/libidn/package.py @@ -22,3 +22,5 @@ class Libidn(AutotoolsPackage, GNUMirrorPackage): 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 09de5033232f87..6e9d1fd6092e39 100644 --- a/var/spack/repos/builtin/packages/libidn2/package.py +++ b/var/spack/repos/builtin/packages/libidn2/package.py @@ -28,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 e4f22875f3b0cb..9c6a50553c335f 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 8ed231a4cce81b..95f8333219fbc7 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 2dd4cd97a8601f..cc09df56457e24 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 @@ def autoreconf(self, spec, prefix): 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" @@ -122,7 +128,7 @@ def setup_build_environment(self, env): # 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): @@ -152,7 +158,7 @@ def configure_args(self): 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") @@ -198,7 +204,7 @@ def configure_args(self): @property def build_targets(self): - if "@2.6.0:" in self.spec: + if self.spec.satisfies("@2.6.0:"): return ["export"] return [] @@ -212,43 +218,63 @@ def build(self, spec, prefix): """ # upstream says that using configure/make for the generated code - # is deprecated and one should use CMake, but with the currently - # recent 2.7.0.b1 it still doesn't work - # 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") - if "+fortran" in self.spec: - mkdirp(prefix.include) - install(join_path("fortran", "*.mod"), prefix.include) + @when("@:2.6.0") def patch(self): # Use Fortran compiler to link the Fortran example, not the C++ # compiler - if "+fortran" in self.spec: + if self.spec.satisfies("+fortran"): if not self.spec.satisfies("%fj"): filter_file( "$(CXX) $(CXXFLAGS)", @@ -256,3 +282,7 @@ def patch(self): "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 1c978931a310c5..4da1110d88ac5c 100644 --- a/var/spack/repos/builtin/packages/libisal/package.py +++ b/var/spack/repos/builtin/packages/libisal/package.py @@ -18,6 +18,8 @@ class Libisal(AutotoolsPackage): 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 9fe50b24b9befe..e6c366d248d346 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 a288a6451d2976..46c51853682f96 100644 --- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py +++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import sys + from spack.package import * @@ -22,6 +24,9 @@ class LibjpegTurbo(CMakePackage, AutotoolsPackage): 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") @@ -52,6 +57,9 @@ class LibjpegTurbo(CMakePackage, AutotoolsPackage): deprecated=True, ) + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + provides("jpeg") build_system( @@ -106,7 +114,8 @@ class LibjpegTurbo(CMakePackage, AutotoolsPackage): @property def libs(self): shared = self.spec.satisfies("libs=shared") - return find_libraries("libjpeg*", root=self.prefix, shared=shared, recursive=True) + 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): @@ -123,5 +132,5 @@ def cmake_args(self): @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 473d07437a1305..93f89b7149e245 100644 --- a/var/spack/repos/builtin/packages/libjpeg/package.py +++ b/var/spack/repos/builtin/packages/libjpeg/package.py @@ -23,6 +23,8 @@ class Libjpeg(AutotoolsPackage): 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 e2f393bab09895..d7cd514f7e2805 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 ae372d3c4de5cc..9037fa72cf2093 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 e4828c90a09333..5117fc3c92b73a 100644 --- a/var/spack/repos/builtin/packages/libjxl/package.py +++ b/var/spack/repos/builtin/packages/libjxl/package.py @@ -16,6 +16,9 @@ class Libjxl(CMakePackage): license("Apache-2.0") 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 ) @@ -23,7 +26,11 @@ class Libjxl(CMakePackage): "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 @@ def cmake_args(self): 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 282c8395415ab6..5f9dfd29d5018c 100644 --- a/var/spack/repos/builtin/packages/libkcapi/package.py +++ b/var/spack/repos/builtin/packages/libkcapi/package.py @@ -19,6 +19,8 @@ class Libkcapi(AutotoolsPackage): 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 69f98eea8219c5..2c0fde6cfcbcbd 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 @@ def cmake_args(self): 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 1543167d398573..65bc644241d25c 100644 --- a/var/spack/repos/builtin/packages/libksba/package.py +++ b/var/spack/repos/builtin/packages/libksba/package.py @@ -17,10 +17,14 @@ 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") + + depends_on("c", type="build") # generated + # Versions before 1.6.3 were deprecated over CVE-2022-3515 # (https://gnupg.org/blog/20221017-pepe-left-the-ksba.html) diff --git a/var/spack/repos/builtin/packages/liblas/package.py b/var/spack/repos/builtin/packages/liblas/package.py index de77219900dca2..3fa42839764155 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 8a8e47cbbb131c..3717532752113a 100644 --- a/var/spack/repos/builtin/packages/liblbxutil/package.py +++ b/var/spack/repos/builtin/packages/liblbxutil/package.py @@ -9,15 +9,17 @@ 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 91a9f04209b47d..9dce85e240df3f 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 1512db8232adda..d8ff0853022904 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 d8428ca73aad52..730ea4ed6072f0 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 88d61036bd226e..3f64589c2d5f45 100644 --- a/var/spack/repos/builtin/packages/libluv/package.py +++ b/var/spack/repos/builtin/packages/libluv/package.py @@ -25,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 91c60937e09d07..2e93bca660b62b 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 37d433f852b9c2..4278f575d2323b 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 3d221d03ed3922..c064efd796306a 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 abdd74882c28b9..d41a1ccda67422 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 fe4c0528f83b99..49f143c7578fb5 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 6564f340724e44..eb36bf98c3cd50 100644 --- a/var/spack/repos/builtin/packages/libmaxminddb/package.py +++ b/var/spack/repos/builtin/packages/libmaxminddb/package.py @@ -20,6 +20,8 @@ class Libmaxminddb(AutotoolsPackage): 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 6f86673daf61c8..5cae06c702e273 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 013c2a55ea7c75..771195a5c061be 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 6d813bfed4f897..c5de7e7c149731 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 6f262646144c67..0cd0ba6dac3363 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 @@ def configure_args(self): 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 @@ def configure_args(self): 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 @@ def configure_args(self): 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 @@ def configure_args(self): 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 b4465b86aa694c..fb7cca52c1f49c 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 6a48c55266e4d1..cde841d6fbd4e5 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 fc9b25ba00554d..e39b9acf719cc2 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 5109f7623bd649..66b172b9ef3c25 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 db1b8c35474bdd..d3b59562f47c25 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 \)", "#include\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 f3bda9932706e3..eb6d71490d4dd9 100644 --- a/var/spack/repos/builtin/packages/libmnl/package.py +++ b/var/spack/repos/builtin/packages/libmnl/package.py @@ -8,19 +8,35 @@ 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 6f7daacbe7d64a..0e89865830b4c8 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 e27e0aafa276ee..142e47ebca6270 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 86bb4e7e0db606..a8e423f8c6dbb3 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") diff --git a/var/spack/repos/builtin/packages/libmonitor/package.py b/var/spack/repos/builtin/packages/libmonitor/package.py index 3eb4ca6060bcf5..e72d9bc122f81e 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 @@ def flag_handler(self, name, flags): 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 6182050e945f31..8e550c5de77646 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 4714394c715a48..2726201553fa6f 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 7507ff362e7762..4174487e4989ff 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 242f447b3fb253..1012974f20b8f4 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 6d2699197bfa4c..44df3a759b2e1f 100644 --- a/var/spack/repos/builtin/packages/libnet/package.py +++ b/var/spack/repos/builtin/packages/libnet/package.py @@ -19,6 +19,8 @@ class Libnet(AutotoolsPackage): 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 fcbc19b9029614..128ca79246fd82 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 cd99be3b0d0e15..fbc4efb592df4d 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 @@ 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 b16dddd76c6bca..8b3d0a46ecb069 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 @@ 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 e1ab35dab31f62..9ce03a057e37fb 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 @@ 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 2ef31c7413fa72..5c3cd1a1a5bde8 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 041a15e1ca2906..fd36bb4679eab5 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 bfbced8b343cd7..e98c70902754fc 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 5643540c9511d7..0895b3c1c6623e 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 35494bc2830995..b646512f23b14b 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 9d8d2968bc26ef..da9cc25e3ac98c 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 7212ff3f08fb1e..656a2cd3612484 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 4fab7677f669ab..eb96b1dda8c2b4 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 471be31eff65e3..875a968d64a311 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 2b91d482d14193..f714173323954a 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 9eb4e8489fbb97..5f9fd1c8f60a37 100644 --- a/var/spack/repos/builtin/packages/libnsl/package.py +++ b/var/spack/repos/builtin/packages/libnsl/package.py @@ -25,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 d711e9548389bd..4e62a81e9833a3 100644 --- a/var/spack/repos/builtin/packages/libogg/package.py +++ b/var/spack/repos/builtin/packages/libogg/package.py @@ -22,6 +22,8 @@ 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", diff --git a/var/spack/repos/builtin/packages/liboldx/package.py b/var/spack/repos/builtin/packages/liboldx/package.py index b65a99ae1678eb..2f7b9d7d7b5b7d 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 78f48985a6da71..5c85ba65d51bdd 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 69463c1669786c..addef7cc533a39 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 85d888b07a367c..670df0cce10d6e 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 5723a25ea1260b..d4f0ef68bd836a 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 19276cfd3de0b2..a4920fed1116c9 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 90c9b543cab616..6cab9031dd779d 100644 --- a/var/spack/repos/builtin/packages/libpciaccess/package.py +++ b/var/spack/repos/builtin/packages/libpciaccess/package.py @@ -19,7 +19,8 @@ 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") diff --git a/var/spack/repos/builtin/packages/libpfm4/package.py b/var/spack/repos/builtin/packages/libpfm4/package.py index 9ce27303269ab8..2c642657e45c15 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 b35c34559959fc..32d9e01d881e27 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 d92235b13f96e5..d58de2c8916959 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 6703c08e8682e6..8d2af867d056c7 100644 --- a/var/spack/repos/builtin/packages/libpmemobj-cpp/package.py +++ b/var/spack/repos/builtin/packages/libpmemobj-cpp/package.py @@ -25,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 395f2694c57cad..7f3a85c2aebe88 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 e594a00b689581..3bace0d7ae3644 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 00000000000000..f7a5f560b3653a --- /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 d4aefcbb8566b9..778e780f50040c 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 00000000000000..a7041bcdc9062c --- /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 8ed53ad6704f83..05ad253ef83234 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 00000000000000..8d9fe66bdb01e8 --- /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 d496bff18dd710..1b45443d086325 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 07c4f3b03deba8..37c291e92ee821 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 @@ def cmake_args(self): @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 00000000000000..6eeb7bc37d5e09 --- /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 a024871bae6813..01feff140f8fe6 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 @@ def cmake_args(self): @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 193ac867375fe9..adf79898aa16ec 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 a72f1b4c8b29d9..b4f518e0f8245d 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 @@ 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 c37bcb8ededb9e..d66cf2894d14dd 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 @@ def cmake_args(self): @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 f1828bcf51c886..095a4018838d0f 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,110 +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") - 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") @@ -366,36 +407,36 @@ def build_test(self): @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 70158c0bf90e8b..612f6d01ee6f5a 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 @@ def cmake_args(self): 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 f6ea835e9a5df8..fe8c8210d05294 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 @@ def url_for_version(self, version): 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 8ce2995bfdd1ae..6772a10a395144 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 @@ def setup_run_environment(self, env): 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 b6fb93a282a009..77ac9840eb5f62 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/builtin/packages/libpspio/package.py b/var/spack/repos/builtin/packages/libpspio/package.py index 97744468e17310..b462c5c58c21c1 100644 --- a/var/spack/repos/builtin/packages/libpspio/package.py +++ b/var/spack/repos/builtin/packages/libpspio/package.py @@ -18,6 +18,9 @@ class Libpspio(AutotoolsPackage): 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/libpulsar/package.py b/var/spack/repos/builtin/packages/libpulsar/package.py index cb24450f499b1c..cbff8e93203287 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 d3db70755e1e59..3079c383347b9f 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 1c838d9c4a5097..099dcf0ec55580 100644 --- a/var/spack/repos/builtin/packages/libquo/package.py +++ b/var/spack/repos/builtin/packages/libquo/package.py @@ -27,6 +27,9 @@ class Libquo(AutotoolsPackage): 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") @@ -44,7 +47,7 @@ def configure_args(self): "CC={0}".format(self.spec["mpi"].mpicc), "FC={0}".format(self.spec["mpi"].mpifc), ] - if "%pgi" in self.spec: + if self.spec.satisfies("%pgi"): 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 diff --git a/var/spack/repos/builtin/packages/libraqm/package.py b/var/spack/repos/builtin/packages/libraqm/package.py index 745dc9f1a9002e..547931a621017a 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 89a9262f34a377..589bb96e8f65be 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 53cb81e2f8d717..9d1a506dc19762 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,8 @@ 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") diff --git a/var/spack/repos/builtin/packages/librelp/package.py b/var/spack/repos/builtin/packages/librelp/package.py index 3113da14f317e9..a3d0a468e73854 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 353819c54d4831..2c98bcdea8451d 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 fbdf8a956d8f90..4e060e3395b09b 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 0563824e0573f3..bf884b47ffd74d 100644 --- a/var/spack/repos/builtin/packages/libristra/package.py +++ b/var/spack/repos/builtin/packages/libristra/package.py @@ -20,6 +20,8 @@ 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") diff --git a/var/spack/repos/builtin/packages/librmm/package.py b/var/spack/repos/builtin/packages/librmm/package.py index e7804ae2b40656..3adab29f30de7d 100644 --- a/var/spack/repos/builtin/packages/librmm/package.py +++ b/var/spack/repos/builtin/packages/librmm/package.py @@ -19,4 +19,6 @@ class Librmm(CMakePackage): 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 b46c9e0976bb40..1a95b3116fb10a 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 18cccd064f30ec..d78349824a0ef6 100644 --- a/var/spack/repos/builtin/packages/librsb/package.py +++ b/var/spack/repos/builtin/packages/librsb/package.py @@ -10,8 +10,8 @@ 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") @@ -24,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") @@ -40,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") @@ -52,25 +56,25 @@ def configure_args(self): 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 29b6193392cba8..843d4bd759dcab 100644 --- a/var/spack/repos/builtin/packages/librsvg/package.py +++ b/var/spack/repos/builtin/packages/librsvg/package.py @@ -22,6 +22,8 @@ class Librsvg(AutotoolsPackage): 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") @@ -35,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:") @@ -50,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/" @@ -72,7 +75,7 @@ def setup_run_environment(self, env): 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 0eaed4a6d0954d..5a8258fb408845 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 082ca655c3c23d..79ef2f6236b38e 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 788327f3fa9529..42ed11da53592a 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 35fc19520b2080..095f94f80f9f23 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 8b87dbff48f165..abe8f14a746f26 100644 --- a/var/spack/repos/builtin/packages/libseccomp/package.py +++ b/var/spack/repos/builtin/packages/libseccomp/package.py @@ -18,6 +18,8 @@ class Libseccomp(AutotoolsPackage): version("2.5.3", sha256="59065c8733364725e9721ba48c3a99bbc52af921daf48df4b1e012fbc7b10a76") version("2.3.3", sha256="7fc28f4294cc72e61c529bedf97e705c3acf9c479a8f1a3028d4cd2ca9f3b155") + depends_on("c", type="build") # generated + variant("python", default=True, description="Build Python bindings") depends_on("gperf", type="build", when="@2.5:") @@ -25,6 +27,6 @@ class Libseccomp(AutotoolsPackage): def configure_args(self): args = [] - if "+python" in self.spec: + if self.spec.satisfies("+python"): args.append("--enable-python") return args diff --git a/var/spack/repos/builtin/packages/libsecret/package.py b/var/spack/repos/builtin/packages/libsecret/package.py index ba7c8aa26584c1..91c79ed634f1c2 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 482439306a8845..b8c75ab3bacf3f 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 @@ def configure_args(self): 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 6bbe6cd94e602e..c55fce1cc67723 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 318851ac097d88..f8e047a285d6ce 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 1b3bd1c1b4ffd3..da46db56796d6e 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 similarity index 100% rename from var/spack/repos/builtin/packages/libsigsegv/patch.new_config_guess rename to 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 f2dc840891898b..66e78612fec0a9 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 @@ def configure_args(self): 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 index c69628f3ff3c63..2d73c9fc7d0068 100644 --- a/var/spack/repos/builtin/packages/libsixel/package.py +++ b/var/spack/repos/builtin/packages/libsixel/package.py @@ -19,6 +19,9 @@ class Libsixel(MesonPackage): 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") diff --git a/var/spack/repos/builtin/packages/libslirp/package.py b/var/spack/repos/builtin/packages/libslirp/package.py index cb75c8bcf87710..da3dc9c424d147 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 6f89ff6d3dfc9c..103b16aa0a727f 100644 --- a/var/spack/repos/builtin/packages/libsm/package.py +++ b/var/spack/repos/builtin/packages/libsm/package.py @@ -9,7 +9,7 @@ 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") @@ -20,12 +20,14 @@ class Libsm(AutotoolsPackage, XorgPackage): 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 031517c7552fca..a9ba1d2b48f5d8 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 b8fef47458f9b7..2b29d2db829a7d 100644 --- a/var/spack/repos/builtin/packages/libsodium/package.py +++ b/var/spack/repos/builtin/packages/libsodium/package.py @@ -22,8 +22,9 @@ class Libsodium(AutotoolsPackage): version("master", branch="master") version("stable", branch="stable") - version("next", branch="next") + 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") @@ -36,6 +37,11 @@ class Libsodium(AutotoolsPackage): version("1.0.0", sha256="ced1fe3d2066953fea94f307a92f8ae41bf0643739a44309cbe43aa881dbc9a5") version("0.7.1", sha256="ef46bbb5bac263ef6d3fc00ccc11d4690aea83643412919fe15369b9870280a7") + 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 # to check if they work (see lib/spack/spack/build_systems/autotools.py). diff --git a/var/spack/repos/builtin/packages/libsolv/package.py b/var/spack/repos/builtin/packages/libsolv/package.py index c75731358ea458..585287801082fa 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 0f59f80bcb5fb8..3504012bfe9a23 100644 --- a/var/spack/repos/builtin/packages/libspatialindex/package.py +++ b/var/spack/repos/builtin/packages/libspatialindex/package.py @@ -17,6 +17,8 @@ class Libspatialindex(CMakePackage): version("1.9.3", sha256="7b44340a3edc55c11abfc453bb60f148b29f569cef9e1148583e76132e9c7379") version("1.8.5", sha256="93cce77269612f45287b521d5afdfb245be2b93b8b6438d92f8b9e0bdb37059d") + depends_on("cxx", type="build") # generated + 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 81d68e3746e197..b6643e4ade52cc 100644 --- a/var/spack/repos/builtin/packages/libspatialite/package.py +++ b/var/spack/repos/builtin/packages/libspatialite/package.py @@ -34,6 +34,8 @@ class Libspatialite(AutotoolsPackage): deprecated=True, ) + depends_on("c", type="build") # generated + depends_on("pkgconfig", type="build") depends_on("freexl") depends_on("freexl@2:", when="@5.1:") diff --git a/var/spack/repos/builtin/packages/libspiro/package.py b/var/spack/repos/builtin/packages/libspiro/package.py index 99dc733c5eded9..119839ab547292 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 b431a80f357fc9..3ece876675a9c2 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 feb58288b94b89..b22165f58fcab4 100644 --- a/var/spack/repos/builtin/packages/libspng/package.py +++ b/var/spack/repos/builtin/packages/libspng/package.py @@ -14,7 +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 8bd652d384dd03..5371b0c99debee 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 3a66e97f180f18..23dc57ce2deaff 100644 --- a/var/spack/repos/builtin/packages/libssh2/package.py +++ b/var/spack/repos/builtin/packages/libssh2/package.py @@ -23,6 +23,9 @@ class Libssh2(AutotoolsPackage, CMakePackage): "1.4.3", sha256="eac6f85f9df9db2e6386906a6227eb2cd7b3245739561cad7d6dc1d5d021b96d" ) # CentOS7 + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + build_system("autotools", "cmake", default="autotools") variant( diff --git a/var/spack/repos/builtin/packages/libstdcompat/package.py b/var/spack/repos/builtin/packages/libstdcompat/package.py index 279cd3367a38be..3a5321fb4cb478 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 @@ def cmake_args(self): 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 @@ def cmake_args(self): 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 8d1089337fe870..bc3506f206b64c 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 2aa2974fc40943..107c821272a567 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 diff --git a/var/spack/repos/builtin/packages/libtar/package.py b/var/spack/repos/builtin/packages/libtar/package.py index bf5757ab7242c0..ada56da6ac5cb9 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 07abb9199d97e6..3d7719b11f8954 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 817438a516c64d..253826b6200fa4 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 5ae2db3dbd9fa0..ff0233a466502d 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 f12f67c4607921..b3da2e71034cea 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 @@ def configure_args(self): 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 9380bee14bd5c0..0eef8232091398 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") @@ -120,6 +137,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")] @@ -139,6 +157,7 @@ def configure_args(self): 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 245bea4136262a..87837484c6dded 100644 --- a/var/spack/repos/builtin/packages/libtirpc/package.py +++ b/var/spack/repos/builtin/packages/libtirpc/package.py @@ -20,6 +20,8 @@ class Libtirpc(AutotoolsPackage): variant("gssapi", default=True, description="Enable GSS-API") + 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 8c852a11c2919d..5a4e64f6c2b63e 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 c1cef890bd37a6..5f3ed20bc79420 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 6573ce7b80bf43..0eb2dae2999dc8 100644 --- a/var/spack/repos/builtin/packages/libtommath/package.py +++ b/var/spack/repos/builtin/packages/libtommath/package.py @@ -14,9 +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(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 d5926669e4fe17..1547aa6764d96d 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -32,6 +32,8 @@ 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 diff --git a/var/spack/repos/builtin/packages/libtorrent/package.py b/var/spack/repos/builtin/packages/libtorrent/package.py index 900cdf59c6a5bb..4160c7febb5465 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 00000000000000..1948a40f62bb04 --- /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 85eff7b2c8a3b1..3e956cec52c366 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 8f916905bae261..8191b3bba0ce46 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 92d9bf1519881b..2cef8b81010255 100644 --- a/var/spack/repos/builtin/packages/libunistring/package.py +++ b/var/spack/repos/builtin/packages/libunistring/package.py @@ -27,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") @@ -50,6 +52,11 @@ def patch(self): # 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 c389cbda7b15e0..23b2b497c9dbeb 100644 --- a/var/spack/repos/builtin/packages/libunwind/package.py +++ b/var/spack/repos/builtin/packages/libunwind/package.py @@ -31,6 +31,9 @@ class Libunwind(AutotoolsPackage): deprecated=True, ) + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + variant("docs", default=True, description="Build man page") variant( "libs", @@ -105,7 +108,7 @@ def flag_handler(self, name, flags): ): 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 00000000000000..31206595f3ca00 --- /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 7e2d433a6f6941..24b53ae1a85b9f 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 f51e9690167de9..36fb87fcc8aad7 100644 --- a/var/spack/repos/builtin/packages/libusb/package.py +++ b/var/spack/repos/builtin/packages/libusb/package.py @@ -21,6 +21,9 @@ class Libusb(AutotoolsPackage): 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 5edc7db485b766..f8bc34807a4818 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 6fa16449cc8dae..1a0a2ebfcdc2ae 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 8e668ca22f8fc2..00a62915871198 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 9b6d31c9a1bbf8..5b578d419e90e0 100644 --- a/var/spack/repos/builtin/packages/libuv/package.py +++ b/var/spack/repos/builtin/packages/libuv/package.py @@ -2,25 +2,63 @@ # 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 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.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") + 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") @@ -32,18 +70,36 @@ 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 self.spec.satisfies("@:1.43"): + 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", @@ -61,9 +117,17 @@ def url_for_version(self, version): 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/libvdwxc/fftw-detection.patch b/var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch new file mode 100644 index 00000000000000..f009188f52c03f --- /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 f83ccd52ee8b76..f9d6a0d8452635 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 @@ def configure_args(self): 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 0698c553e1163d..73bbf393ca2041 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 f5e64f6a9b44ba..cd16fd69ea5ce5 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 922e9c57e9bb01..ccaf5fff0b7f7b 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 47fb3be91a4b59..ecfd87922b0355 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 063c76c9bc1083..e47170935a8736 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 2c7481fb959a34..6d6ff9e4446965 100644 --- a/var/spack/repos/builtin/packages/libvterm/package.py +++ b/var/spack/repos/builtin/packages/libvterm/package.py @@ -11,24 +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 f74efe9a11b14b..4e118a47e9e241 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 @@ def configure_args(self): # 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 59fae25a809f4d..5347f241dfb5f5 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 37ec3fc115ed3f..d9430ee12b6e1a 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 dd533742c1bcf2..ceca358af77fbf 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 63d32c1b20f531..b29215418d719e 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 00000000000000..40f139cb6e9693 --- /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 d1d59561c27bc8..41d64789db0830 100644 --- a/var/spack/repos/builtin/packages/libx11/package.py +++ b/var/spack/repos/builtin/packages/libx11/package.py @@ -11,11 +11,15 @@ 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") @@ -35,15 +39,17 @@ class Libx11(AutotoolsPackage, XorgPackage): 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 491a67c1aa91dd..1d3ecde7c62073 100644 --- a/var/spack/repos/builtin/packages/libxau/package.py +++ b/var/spack/repos/builtin/packages/libxau/package.py @@ -11,7 +11,7 @@ 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") @@ -23,7 +23,9 @@ class Libxau(AutotoolsPackage, XorgPackage): 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 4d5c54e5881f24..e2633f11d6f9f2 100644 --- a/var/spack/repos/builtin/packages/libxaw/package.py +++ b/var/spack/repos/builtin/packages/libxaw/package.py @@ -10,25 +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 cf70c53b255e5d..f332772e430eef 100644 --- a/var/spack/repos/builtin/packages/libxaw3d/package.py +++ b/var/spack/repos/builtin/packages/libxaw3d/package.py @@ -10,21 +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 47e8f2213bd6b9..00000000000000 --- 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 18d6b0e1fef89c..00000000000000 --- 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 -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 9c1c6897d850f0..84e6878512970c 100644 --- a/var/spack/repos/builtin/packages/libxc/package.py +++ b/var/spack/repos/builtin/packages/libxc/package.py @@ -15,24 +15,27 @@ class Libxc(AutotoolsPackage, CudaPackage): 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("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 +44,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 +59,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 +95,14 @@ def setup_build_environment(self, env): # 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 +116,16 @@ def configure_args(self): 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 1f11a79ef9abb4..2d5959cc8c0901 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -6,46 +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.15:", when="@1.15") - 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 = [] @@ -57,3 +60,13 @@ def configure_args(self): 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 8b4dd5d551e56b..489ef94150c5e1 100644 --- a/var/spack/repos/builtin/packages/libxcomposite/package.py +++ b/var/spack/repos/builtin/packages/libxcomposite/package.py @@ -10,7 +10,7 @@ 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") @@ -20,10 +20,12 @@ class Libxcomposite(AutotoolsPackage, XorgPackage): 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("xproto@7.0.22:", when="@0.4.6") + 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 fe641d3d3e40de..dccd34f7b984c9 100644 --- a/var/spack/repos/builtin/packages/libxcrypt/package.py +++ b/var/spack/repos/builtin/packages/libxcrypt/package.py @@ -33,6 +33,8 @@ def url_for_version(self, version): 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 9f6471a1090a34..103ed5862e2e45 100644 --- a/var/spack/repos/builtin/packages/libxcursor/package.py +++ b/var/spack/repos/builtin/packages/libxcursor/package.py @@ -9,20 +9,23 @@ 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 00000000000000..6a73ef3d859db8 --- /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 0090ce624b8415..e3da4a50060ac7 100644 --- a/var/spack/repos/builtin/packages/libxdamage/package.py +++ b/var/spack/repos/builtin/packages/libxdamage/package.py @@ -9,7 +9,7 @@ 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") @@ -20,11 +20,13 @@ class Libxdamage(AutotoolsPackage, XorgPackage): 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 d72a1ac61e5280..6a66f62984f7ae 100644 --- a/var/spack/repos/builtin/packages/libxdmcp/package.py +++ b/var/spack/repos/builtin/packages/libxdmcp/package.py @@ -9,19 +9,21 @@ 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 2dd724510c0273..b56191d0bb8343 100644 --- a/var/spack/repos/builtin/packages/libxevie/package.py +++ b/var/spack/repos/builtin/packages/libxevie/package.py @@ -9,18 +9,20 @@ 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 b167d90d3bc921..c107e9305bf43c 100644 --- a/var/spack/repos/builtin/packages/libxext/package.py +++ b/var/spack/repos/builtin/packages/libxext/package.py @@ -9,21 +9,24 @@ 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 00000000000000..0ac4b5500dc8d0 --- /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 00000000000000..705720ff72c71f --- /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 26f4a1204b6487..7b30f07026287b 100644 --- a/var/spack/repos/builtin/packages/libxfixes/package.py +++ b/var/spack/repos/builtin/packages/libxfixes/package.py @@ -10,7 +10,7 @@ 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") @@ -23,11 +23,13 @@ class Libxfixes(AutotoolsPackage, XorgPackage): 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:", when="@5") - # depends_on("fixesproto@6.0:", when="@6") - 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 321208dc7b16db..f48b8971ffa5f9 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 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 417dfd23239e3d..b8ca4cfa1bc7da 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 ea1d7486708891..f8139113783f0b 100644 --- a/var/spack/repos/builtin/packages/libxfontcache/package.py +++ b/var/spack/repos/builtin/packages/libxfontcache/package.py @@ -9,17 +9,19 @@ 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 d4ff5a4461e060..7833041afd4bbd 100644 --- a/var/spack/repos/builtin/packages/libxft/package.py +++ b/var/spack/repos/builtin/packages/libxft/package.py @@ -13,7 +13,7 @@ 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") @@ -28,6 +28,8 @@ class Libxft(AutotoolsPackage, XorgPackage): 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 c2e4f1b37c0854..3f7cf05dc82295 100644 --- a/var/spack/repos/builtin/packages/libxi/package.py +++ b/var/spack/repos/builtin/packages/libxi/package.py @@ -9,7 +9,7 @@ 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") @@ -25,15 +25,17 @@ class Libxi(AutotoolsPackage, XorgPackage): 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:", when="@1.7:") - # depends_on("inputproto@2.3.99.1:", when="@1.8:") + 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 ac6fad3a23f283..3156091c5a0269 100644 --- a/var/spack/repos/builtin/packages/libxinerama/package.py +++ b/var/spack/repos/builtin/packages/libxinerama/package.py @@ -9,7 +9,7 @@ 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") @@ -20,11 +20,13 @@ class Libxinerama(AutotoolsPackage, XorgPackage): 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 2da7b2e9cc75a4..b6de0611fbb457 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") @@ -65,6 +70,9 @@ def meson_args(self): "-Denable-wayland=" + str(self.spec.satisfies("+wayland")), ] + if self.spec.satisfies("@1.6:"): + args.append("-Denable-bash-completion=false") + return args def setup_build_environment(self, env): @@ -78,9 +86,7 @@ def setup_build_environment(self, env): class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): def configure_args(self): """Configure arguments are passed using meson_args functions""" - args = [ + return [ "--with-xkb-config-root={0}".format(self.spec["xkbdata"].prefix), "--disable-docs", ] + self.enable_or_disable("wayland") - - return args diff --git a/var/spack/repos/builtin/packages/libxkbfile/package.py b/var/spack/repos/builtin/packages/libxkbfile/package.py index 2b8f39215a5dd2..a9cb63402352aa 100644 --- a/var/spack/repos/builtin/packages/libxkbfile/package.py +++ b/var/spack/repos/builtin/packages/libxkbfile/package.py @@ -9,20 +9,23 @@ 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 4167ed1629e851..cb8a9cf6021145 100644 --- a/var/spack/repos/builtin/packages/libxkbui/package.py +++ b/var/spack/repos/builtin/packages/libxkbui/package.py @@ -9,11 +9,13 @@ 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 122e57e006f9b7..8fdf5f6264ff98 100644 --- a/var/spack/repos/builtin/packages/libxml2/package.py +++ b/var/spack/repos/builtin/packages/libxml2/package.py @@ -4,6 +4,8 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os +import llnl.util.filesystem as fs + import spack.builder from spack.build_systems import autotools, nmake from spack.package import * @@ -14,7 +16,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" @@ -42,6 +44,8 @@ def url_for_version(self, version): version("2.9.2", sha256="5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc") version("2.7.8", sha256="cda23bc9ebd26474ca8f3d67e7d1c4a1f1e7106364b690d822e009fdc3c417ec") + depends_on("c", type="build") # generated + variant("python", default=False, description="Enable Python support") variant("shared", default=True, description="Build shared library") variant("pic", default=True, description="Enable position-independent code (PIC)") @@ -227,7 +231,7 @@ class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta): @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") @@ -241,7 +245,7 @@ def configure_args(self): "--with-iconv={0}".format(spec["iconv"].prefix), ] - if "+python" in spec: + if spec.satisfies("+python"): args.extend( [ "--with-python={0}".format(spec["python"].home), @@ -267,20 +271,31 @@ def makefile_name(self): @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 723f326fee1977..2d740fd1bde045 100644 --- a/var/spack/repos/builtin/packages/libxmu/package.py +++ b/var/spack/repos/builtin/packages/libxmu/package.py @@ -12,20 +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 03513df5ecb48c..38f97cc0a5a394 100644 --- a/var/spack/repos/builtin/packages/libxp/package.py +++ b/var/spack/repos/builtin/packages/libxp/package.py @@ -9,7 +9,7 @@ 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") @@ -17,11 +17,13 @@ class Libxp(AutotoolsPackage, XorgPackage): 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 2943749de8f8ef..09c774f44ec4c0 100644 --- a/var/spack/repos/builtin/packages/libxpm/package.py +++ b/var/spack/repos/builtin/packages/libxpm/package.py @@ -9,7 +9,7 @@ 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") @@ -28,10 +28,12 @@ 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 e17ca584f9bb89..e8cf21f0afc459 100644 --- a/var/spack/repos/builtin/packages/libxpresent/package.py +++ b/var/spack/repos/builtin/packages/libxpresent/package.py @@ -10,7 +10,7 @@ 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") @@ -20,15 +20,17 @@ class Libxpresent(AutotoolsPackage, XorgPackage): 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 990e29e18f8046..582106f9d388d2 100644 --- a/var/spack/repos/builtin/packages/libxprintapputil/package.py +++ b/var/spack/repos/builtin/packages/libxprintapputil/package.py @@ -9,16 +9,18 @@ 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 c23f59de90922b..d2c671183d84bc 100644 --- a/var/spack/repos/builtin/packages/libxprintutil/package.py +++ b/var/spack/repos/builtin/packages/libxprintutil/package.py @@ -9,16 +9,18 @@ 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 3f476394825ab2..01e28d012d2a62 100644 --- a/var/spack/repos/builtin/packages/libxrandr/package.py +++ b/var/spack/repos/builtin/packages/libxrandr/package.py @@ -9,7 +9,7 @@ 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") @@ -20,13 +20,15 @@ class Libxrandr(AutotoolsPackage, XorgPackage): 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 ee72890dd4b1fe..a01b8e86775ee5 100644 --- a/var/spack/repos/builtin/packages/libxrender/package.py +++ b/var/spack/repos/builtin/packages/libxrender/package.py @@ -9,7 +9,7 @@ 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") @@ -20,9 +20,11 @@ class Libxrender(AutotoolsPackage, XorgPackage): 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 1b3c88f3adff79..946c900c139ab2 100644 --- a/var/spack/repos/builtin/packages/libxres/package.py +++ b/var/spack/repos/builtin/packages/libxres/package.py @@ -9,7 +9,7 @@ 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") @@ -21,12 +21,14 @@ class Libxres(AutotoolsPackage, XorgPackage): 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:", when="@1.0") - depends_on("resourceproto@1.2:", when="@1.2") + 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 9fbf54120b79b5..df5823230c6bc4 100644 --- a/var/spack/repos/builtin/packages/libxscrnsaver/package.py +++ b/var/spack/repos/builtin/packages/libxscrnsaver/package.py @@ -9,7 +9,7 @@ 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") @@ -20,10 +20,12 @@ class Libxscrnsaver(AutotoolsPackage, XorgPackage): 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 fa05f7ee5965b3..11005334f13e13 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 102d5d2d34b620..9c24949814907f 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 @@ def configure_args(self): @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 71e60f77032ff0..14e287a918547a 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 @@ def build(self, spec, prefix): "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 @@ def build(self, spec, prefix): 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 @@ def install(self, spec, prefix): # 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 6cf99d43907078..8002a7ace6abd1 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 74f1614b751135..96693ebecd729b 100644 --- a/var/spack/repos/builtin/packages/libxt/package.py +++ b/var/spack/repos/builtin/packages/libxt/package.py @@ -9,7 +9,7 @@ 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") @@ -21,12 +21,14 @@ class Libxt(AutotoolsPackage, XorgPackage): 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 7027e0e6e42732..2ce4055623eaf6 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 3fbe336f8d46c3..62d914daaceb8f 100644 --- a/var/spack/repos/builtin/packages/libxtst/package.py +++ b/var/spack/repos/builtin/packages/libxtst/package.py @@ -18,7 +18,7 @@ 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") @@ -29,13 +29,15 @@ class Libxtst(AutotoolsPackage, XorgPackage): 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 bc1019e575d3c7..c0ea897606c1bc 100644 --- a/var/spack/repos/builtin/packages/libxv/package.py +++ b/var/spack/repos/builtin/packages/libxv/package.py @@ -10,7 +10,7 @@ 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") @@ -21,10 +21,12 @@ class Libxv(AutotoolsPackage, XorgPackage): 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 a970c24a34aab6..d3e95109239c2a 100644 --- a/var/spack/repos/builtin/packages/libxvmc/package.py +++ b/var/spack/repos/builtin/packages/libxvmc/package.py @@ -9,24 +9,27 @@ 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 c0d1300ef640fc..65c8709949803b 100644 --- a/var/spack/repos/builtin/packages/libxxf86dga/package.py +++ b/var/spack/repos/builtin/packages/libxxf86dga/package.py @@ -9,7 +9,7 @@ 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") @@ -20,11 +20,13 @@ class Libxxf86dga(AutotoolsPackage, XorgPackage): 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 f9cd5db8a79a32..331ddc05644621 100644 --- a/var/spack/repos/builtin/packages/libxxf86misc/package.py +++ b/var/spack/repos/builtin/packages/libxxf86misc/package.py @@ -9,7 +9,7 @@ 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") @@ -17,11 +17,13 @@ class Libxxf86misc(AutotoolsPackage, XorgPackage): 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 970ff1991f6016..eef44998cda6f0 100644 --- a/var/spack/repos/builtin/packages/libxxf86vm/package.py +++ b/var/spack/repos/builtin/packages/libxxf86vm/package.py @@ -9,7 +9,7 @@ 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") @@ -19,12 +19,14 @@ class Libxxf86vm(AutotoolsPackage, XorgPackage): 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 e3f46d0367453e..47cb11570927b3 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 f63d1736b9dfdb..d18dd7b31b4848 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 @@ def configure_args(self): 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 @@ def create_yogrt_conf(self): # 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 b4060d2ea39755..eff9884080af76 100644 --- a/var/spack/repos/builtin/packages/libzip/package.py +++ b/var/spack/repos/builtin/packages/libzip/package.py @@ -36,6 +36,9 @@ class Libzip(CMakePackage, AutotoolsPackage): 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" diff --git a/var/spack/repos/builtin/packages/libzmq/package.py b/var/spack/repos/builtin/packages/libzmq/package.py index 2028dcd55e026d..423fc9c43dcf30 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 00000000000000..cbe9eb0f8893ed --- /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 d67890824cb16d..58b213a4834b32 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 @@ def edit(self, spec, prefix): ) 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 @@ def edit(self, spec, prefix): # 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 7048111b6561ba..96a2cf04ec67ee 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 749cceeab26b59..39ebe95a736f15 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 eaa3c301a3c557..c6a7242ce91f10 100644 --- a/var/spack/repos/builtin/packages/likwid/package.py +++ b/var/spack/repos/builtin/packages/likwid/package.py @@ -41,6 +41,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 +93,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 +108,13 @@ def patch(self): 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 +176,14 @@ def install(self, spec, prefix): "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 +192,7 @@ def install(self, spec, prefix): 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 +206,7 @@ def install(self, spec, prefix): 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 +256,7 @@ def install(self, spec, prefix): # 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 00000000000000..42769c43b6baa3 --- /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 7c449819966331..a673f275bd92fe 100644 --- a/var/spack/repos/builtin/packages/linaro-forge/package.py +++ b/var/spack/repos/builtin/packages/linaro-forge/package.py @@ -22,7 +22,23 @@ class LinaroForge(Package): homepage = "https://www.linaroforge.com" maintainers("kenche-linaro") - if platform.machine() in ["aarch64", "arm64"]: + if platform.machine() == "aarch64": + 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" ) @@ -50,6 +66,7 @@ class LinaroForge(Package): "21.1.3", sha256="4a4ff7372aad5a31fc9e18b7b6c493691ab37d8d44a3158584e62d1ab82b0eeb" ) elif platform.machine() == "ppc64le": + # N.B. support for ppc64le was dropped in 24.0 version( "23.1.2", sha256="5c588a6b7391d75cced4016936d0c5a00023431269339432738ff33b860487b3" ) @@ -80,6 +97,22 @@ class LinaroForge(Package): "21.1.3", sha256="eecbc5686d60994c5468b2d7cd37bebe5d9ac0ba37bd1f98fbfc69b071db541e" ) elif platform.machine() == "x86_64": + 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" ) diff --git a/var/spack/repos/builtin/packages/linkphase3/package.py b/var/spack/repos/builtin/packages/linkphase3/package.py index 6eec3c55cd37d5..946a70dc177f52 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 ef8e510d06f9fc..b0163dd6167ab7 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 00000000000000..fbd5a458385288 --- /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 00000000000000..1934cb688d04e0 --- /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, 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 d45c123f943c51..1213d350142cb6 100644 --- a/var/spack/repos/builtin/packages/linux-headers/package.py +++ b/var/spack/repos/builtin/packages/linux-headers/package.py @@ -18,11 +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 e864d63b6b337c..265a96e4a6a678 100644 --- a/var/spack/repos/builtin/packages/linux-pam/package.py +++ b/var/spack/repos/builtin/packages/linux-pam/package.py @@ -14,19 +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") + 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") - depends_on("m4", type="build") - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") + 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 00000000000000..9e550d783db640 --- /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 a969427f92b15c..bae63b5b70d408 100644 --- a/var/spack/repos/builtin/packages/lis/package.py +++ b/var/spack/repos/builtin/packages/lis/package.py @@ -16,6 +16,9 @@ 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") diff --git a/var/spack/repos/builtin/packages/listres/package.py b/var/spack/repos/builtin/packages/listres/package.py index 3b9d14d3c75472..2a82b923c2917e 100644 --- a/var/spack/repos/builtin/packages/listres/package.py +++ b/var/spack/repos/builtin/packages/listres/package.py @@ -19,6 +19,8 @@ class Listres(AutotoolsPackage, XorgPackage): 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 index e91e14ed8fa056..8ff79e32f655b9 100644 --- a/var/spack/repos/builtin/packages/litestream/package.py +++ b/var/spack/repos/builtin/packages/litestream/package.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import os - from spack.package import * @@ -14,12 +12,12 @@ class Litestream(GoPackage): 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:") -class GoBuilder(spack.build_systems.go.GoBuilder): - @property - def build_directory(self): - return os.path.join(self.pkg.stage.source_path, "cmd", "litestream") + 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 60ce4e9cc4d398..9e18d86f923fb7 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 957e4a1774c86c..1222dddffb42f3 100644 --- a/var/spack/repos/builtin/packages/lksctp-tools/package.py +++ b/var/spack/repos/builtin/packages/lksctp-tools/package.py @@ -16,6 +16,8 @@ class LksctpTools(AutotoolsPackage): 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/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py index 808f2de8c7675b..4fec91e9ea0667 100644 --- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os +import re +import shutil from spack.package import * @@ -13,16 +15,20 @@ class LlvmAmdgpu(CMakePackage, CompilerPackage): 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.0.2.tar.gz" + url = "https://github.com/ROCm/llvm-project/archive/rocm-6.2.0.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.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") @@ -32,16 +38,15 @@ class LlvmAmdgpu(CMakePackage, CompilerPackage): 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") with default_args(deprecated=True): - 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.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", @@ -63,10 +68,10 @@ class LlvmAmdgpu(CMakePackage, CompilerPackage): description="Link LLVM tools against the LLVM shared library", ) - 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.13.4:", type="build") depends_on("python", type="build") @@ -75,6 +80,11 @@ class LlvmAmdgpu(CMakePackage, CompilerPackage): depends_on("ncurses+termlib", type="link") depends_on("pkgconfig", type="build") + # 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. @@ -100,8 +110,19 @@ class LlvmAmdgpu(CMakePackage, CompilerPackage): 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"] @@ -119,11 +140,6 @@ class LlvmAmdgpu(CMakePackage, CompilerPackage): ("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"), ]: resource( name="rocm-device-libs", @@ -141,6 +157,10 @@ class LlvmAmdgpu(CMakePackage, CompilerPackage): when="@master +rocm-device-libs", ) for d_version, d_shasum in [ + ("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"), @@ -202,14 +222,18 @@ def cmake_args(self): self.define("LIBCXXABI_ENABLE_STATIC", "ON"), self.define("LIBCXXABI_INSTALL_STATIC_LIBRARY", "OFF"), self.define("LLVM_ENABLE_RTTI", "ON"), - self.define("LLVM_TARGETS_TO_BUILD", "AMDGPU;X86"), 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")) + # Enable rocm-device-libs as a external project - if "+rocm-device-libs" in self.spec: + 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:"): @@ -222,10 +246,10 @@ def cmake_args(self): ] ) - if "+llvm_dylib" in self.spec: + if self.spec.satisfies("+llvm_dylib"): args.append(self.define("LLVM_BUILD_LLVM_DYLIB", True)) - if "+link_llvm_dylib" in self.spec: + 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)) @@ -255,7 +279,7 @@ def cmake_args(self): 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", False)) + 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")) @@ -272,9 +296,32 @@ def cmake_args(self): # 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-doe/package.py b/var/spack/repos/builtin/packages/llvm-doe/package.py index a0d2af411e4ad0..6bf4f67e505108 100644 --- a/var/spack/repos/builtin/packages/llvm-doe/package.py +++ b/var/spack/repos/builtin/packages/llvm-doe/package.py @@ -9,8 +9,8 @@ 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 * @@ -36,6 +36,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`. @@ -183,7 +187,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", @@ -306,7 +309,7 @@ def cc(self): 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 @@ -317,7 +320,7 @@ def cxx(self): 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 @@ -328,7 +331,7 @@ def fc(self): 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 @@ -339,7 +342,7 @@ def f77(self): 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 @@ -389,10 +392,10 @@ def setup_build_environment(self, env): 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")) @@ -419,7 +422,7 @@ def cmake_args(self): projects = [] runtimes = [] - if "+cuda" in spec: + if spec.satisfies("+cuda"): cmake_args.extend( [ define("CUDA_TOOLKIT_ROOT_DIR", spec["cuda"].prefix), @@ -433,7 +436,7 @@ def cmake_args(self): ), ] ) - if "+omp_as_runtime" in spec: + if spec.satisfies("+omp_as_runtime"): cmake_args.extend( [ define("LIBOMPTARGET_NVPTX_ENABLE_BCLIB", True), @@ -456,21 +459,21 @@ def cmake_args(self): 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") @@ -482,22 +485,22 @@ def cmake_args(self): 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)) @@ -541,13 +544,13 @@ def cmake_args(self): 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"): @@ -568,9 +571,9 @@ def post_install(self): 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): @@ -597,10 +600,10 @@ def post_install(self): 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 cb35ca36d25981..4e0385dd94442a 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 @@ def cmake_args(self): # 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 @@ def cmake_args(self): # 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 ec4046a61dd8fa..a1e3f056c980ed 100644 --- a/var/spack/repos/builtin/packages/llvm-openmp/package.py +++ b/var/spack/repos/builtin/packages/llvm-openmp/package.py @@ -43,6 +43,10 @@ class LlvmOpenmp(CMakePackage): version("9.0.0", sha256="9979eb1133066376cc0be29d1682bc0b0e7fb541075b391061679111ae4d3b5b") version("8.0.0", sha256="f7b1705d2f16c4fc23d6531f67d2dd6fb78a077dd346b02fed64f4b8df65c9d5") + 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") diff --git a/var/spack/repos/builtin/packages/llvm/detection_test.yaml b/var/spack/repos/builtin/packages/llvm/detection_test.yaml index e979a83626ce13..860b3061d26d32 100644 --- a/var/spack/repos/builtin/packages/llvm/detection_test.yaml +++ b/var/spack/repos/builtin/packages/llvm/detection_test.yaml @@ -2,12 +2,6 @@ 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)" @@ -22,6 +16,42 @@ paths: 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: /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: @@ -53,7 +83,6 @@ paths: compilers: c: ".*/bin/clang-8$" cxx: ".*/bin/clang[+][+]-8$" - ld: ".*/bin/ld.lld-8$" - spec: 'llvm@3.9.1+clang~lld~lldb' extra_attributes: diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 2825a73a3ff5a6..98a27080b3f9af 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -10,12 +10,32 @@ import llnl.util.tty as tty from llnl.util.lang import classproperty -import spack.build_environment import spack.util.executable +from spack.build_systems.cmake import get_cmake_prefix_path from spack.package import * +from spack.package_base import PackageBase -class Llvm(CMakePackage, CudaPackage, CompilerPackage): +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|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 @@ -36,6 +56,14 @@ class Llvm(CMakePackage, CudaPackage, CompilerPackage): license("Apache-2.0") version("main", branch="main") + 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") @@ -89,6 +117,9 @@ class Llvm(CMakePackage, CudaPackage, CompilerPackage): 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" ) @@ -137,8 +168,12 @@ class Llvm(CMakePackage, CudaPackage, CompilerPackage): "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 @@ -245,6 +280,8 @@ class Llvm(CMakePackage, CudaPackage, CompilerPackage): 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", @@ -253,6 +290,8 @@ class Llvm(CMakePackage, CudaPackage, CompilerPackage): 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") @@ -387,6 +426,19 @@ class Llvm(CMakePackage, CudaPackage, CompilerPackage): # 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 @@ -607,10 +659,6 @@ def patch(self): # LLD r"LLD ([^ )\n]+) \(compatible with GNU linkers\)" ) - compiler_version_argument = "--version" - compiler_languages = ["c", "cxx", "fortran"] - c_names = ["clang"] - cxx_names = ["clang++"] fortran_names = ["flang"] @property @@ -624,20 +672,7 @@ def supported_languages(self): @classproperty def executables(cls): - return super().executables + ["ld.lld", "lldb"] - - @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 + return super().executables + [r"^ld\.lld(-\d+)?$", r"^lldb(-\d+)?$"] @classmethod def determine_version(cls, exe): @@ -664,21 +699,19 @@ def determine_variants(cls, exes, version_str): # because LLVM has kindly named compilers variants, compilers = ["+clang"], {} lld_found, lldb_found = False, False - for exe in exes: + for exe in sorted(exes, key=len): name = os.path.basename(exe) if "clang++" in name: - compilers["cxx"] = exe + compilers.setdefault("cxx", exe) elif "clang" in name: - compilers["c"] = exe + compilers.setdefault("c", exe) elif "flang" in name: variants.append("+flang") - compilers["fortran"] = exe + compilers.setdefault("fortran", exe) elif "ld.lld" in name: lld_found = True - compilers["ld"] = 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") @@ -704,7 +737,7 @@ def cc(self): 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 @@ -715,7 +748,7 @@ def cxx(self): 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 @@ -726,7 +759,7 @@ def fc(self): 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 @@ -737,7 +770,7 @@ def f77(self): 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 @@ -788,10 +821,10 @@ def setup_build_environment(self, env): 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")) @@ -833,7 +866,7 @@ def cmake_args(self): projects = [] runtimes = [] - if "+cuda" in spec: + if spec.satisfies("+cuda"): cmake_args.extend( [ define("CUDA_TOOLKIT_ROOT_DIR", spec["cuda"].prefix), @@ -847,7 +880,7 @@ def cmake_args(self): ), ] ) - 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 @@ -867,8 +900,10 @@ def cmake_args(self): # 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 "+lldb" in spec: + if spec.satisfies("+lldb"): projects.append("lldb") cmake_args.extend( [ @@ -879,59 +914,65 @@ def cmake_args(self): 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)) @@ -945,6 +986,14 @@ def cmake_args(self): # 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), ] ) @@ -961,7 +1010,7 @@ def cmake_args(self): 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] @@ -1023,9 +1072,9 @@ def post_install(self): 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): @@ -1049,13 +1098,13 @@ def post_install(self): 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): diff --git a/var/spack/repos/builtin/packages/lm-sensors/package.py b/var/spack/repos/builtin/packages/lm-sensors/package.py index bdef319cbf7cbd..a9ae344fff44bb 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 a94a2793ab0851..cf5407194cf248 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 6e8c9667a904e9..a74a8d6918dc47 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 b1b0fd4e1579ac..e7e9cf85cb6535 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 @@ def patch(self): 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 3c34408946f129..91cf5aaabd0373 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 0fe2cc6375b1f9..d460f85c24fd40 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 95fbd8fe3a8ea0..01a21b00c23047 100644 --- a/var/spack/repos/builtin/packages/log4c/package.py +++ b/var/spack/repos/builtin/packages/log4c/package.py @@ -9,11 +9,14 @@ 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 6c3e6377817658..ad0b4e872067a9 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 165ed73b7fb3b4..1e08a86e2bea5e 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 b8554125319bac..077f30c5ead635 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 4983a7fb8b56e6..be759478bf51af 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 c7b922b06a1f5f..5f6318faa03bef 100644 --- a/var/spack/repos/builtin/packages/logstash/package.py +++ b/var/spack/repos/builtin/packages/logstash/package.py @@ -19,5 +19,8 @@ class Logstash(Package): version("6.6.0", sha256="5a9a8b9942631e9d4c3dfb8d47075276e8c2cff343841145550cc0c1cfe7bba7") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + def install(self, spec, prefix): install_tree(".", prefix) diff --git a/var/spack/repos/builtin/packages/loki/package.py b/var/spack/repos/builtin/packages/loki/package.py index 46e670640230d5..91bf32a1dec74e 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,6 +18,8 @@ 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): @@ -29,14 +31,14 @@ def flag_handler(self, name, flags): 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 52d56aca59565a..d84264b7581547 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 24e6f2d9a28bfb..7e3d1b32bd7d37 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 76ad46d1e141f2..abf63bd21fb5ea 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 @@ def edit(self, spec, prefix): ("@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 @@ def build(self, spec, prefix): # (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 @@ def install(self, spec, prefix): 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 @@ def install(self, spec, prefix): @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 4f4b36117dc6a2..252cb25dd69a52 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 b07e73e42449b1..772b942b7aa538 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 34224cad8b70b4..966b92149d7cee 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 dd6e49a0f49f2a..cff56ccc0e41e2 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 2042e3b6b89126..387ee162840c95 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 f2dc4a280cbcb1..02fbb4619b05b7 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/ltrace/package.py b/var/spack/repos/builtin/packages/ltrace/package.py index 3db1d32379e986..596242024710cf 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 a125690f45e309..d17ac20be3d9c0 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 @@ 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 d96c73dd4d7b5c..609475446ce876 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("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 6983f13b98b934..2615c4a9c8b5bf 100644 --- a/var/spack/repos/builtin/packages/lua-lpeg/package.py +++ b/var/spack/repos/builtin/packages/lua-lpeg/package.py @@ -4,17 +4,25 @@ # 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", @@ -27,3 +35,36 @@ class LuaLpeg(LuaPackage): ) 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 7e072a5f37676e..8eab6e7bee6740 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 @@ def url_for_version(self, version): 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 83849e691936ad..1f8356270f2820 100644 --- a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py +++ b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py @@ -18,15 +18,18 @@ class LuaLuajitOpenresty(LuaImplPackage): license("MIT") version( - "2.1-20230410", sha256="77bbcbb24c3c78f51560017288f3118d995fe71240aa379f5818ff6b166712ff" + "2.1-20240626", sha256="1e53822a1105df216b9657ccb0293a152ac5afd875abc848453bfa353ca8181b" ) version( - "2.1-20220111", sha256="1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" + "2.1-20230410", sha256="77bbcbb24c3c78f51560017288f3118d995fe71240aa379f5818ff6b166712ff" ) version( - "2.1-20230410", sha256="77bbcbb24c3c78f51560017288f3118d995fe71240aa379f5818ff6b166712ff" + "2.1-20220111", sha256="1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" ) + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + variant( "lualinks", default=True, @@ -61,3 +64,11 @@ def edit(self, spec, prefix): # 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 = .*", 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 d771de3e9aa921..f46748202dfd91 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 cddba50a2bf3a8..04bc97d6e490b1 100644 --- a/var/spack/repos/builtin/packages/lua-luaposix/package.py +++ b/var/spack/repos/builtin/packages/lua-luaposix/package.py @@ -23,4 +23,6 @@ class LuaLuaposix(LuaPackage): version("33.4.0", sha256="e66262f5b7fe1c32c65f17a5ef5ffb31c4d1877019b4870a5d373e2ab6526a21") version("33.2.1", sha256="4fb34dfea67f4cf3194cdecc6614c9aea67edc3c4093d34137669ea869c358e1") + depends_on("c", type="build") # generated + 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 da4cd89c4de4c4..2ce70fc23d8e62 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 6b07a6b3ede2b2..31d0367ffab513 100644 --- a/var/spack/repos/builtin/packages/lua-sol2/package.py +++ b/var/spack/repos/builtin/packages/lua-sol2/package.py @@ -26,6 +26,8 @@ class LuaSol2(CMakePackage): version("3.0.3", sha256="bf089e50387edfc70063e24fd7fbb693cceba4a50147d864fabedd1b33483582") version("3.0.2", sha256="3f5f369eae6732ae9a315fe4370bbdc9900d2f2f4f291206aeb5b2d5533f0c99") + depends_on("cxx", type="build") # generated + # Lua is not needed when building, since sol2 is headers-only depends_on("lua", type=("link", "run")) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index e326ef988b96e8..683657882359f0 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -6,6 +6,8 @@ import glob import os +from llnl.util.symlink import readlink + import spack.build_environment from spack.package import * from spack.util.executable import Executable @@ -62,8 +64,8 @@ def lua_share_dir(self): 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 +81,7 @@ def symlink_luajit(self): 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): @@ -221,6 +223,9 @@ class Lua(LuaImplPackage): version("5.1.4", sha256="b038e225eaf2a5b57c9bcc35cd13aa8c6c8288ef493d52970c9545074098af3a") version("5.1.3", sha256="6b5df2edaa5e02bf1a2d85e1442b2e329493b30b0c0780f77199d24f087d296d") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + variant("pcfile", default=False, description="Add patch for lua.pc generation") variant("shared", default=True, description="Builds a shared version of the library") @@ -254,7 +259,7 @@ def build(self, spec, prefix): 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"], @@ -264,7 +269,7 @@ def install(self, spec, prefix): # 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))) @@ -285,7 +290,7 @@ def install(self, spec, prefix): @run_after("install") def link_pkg_config(self): - if "+pcfile" in self.spec: + if self.spec.satisfies("+pcfile"): versioned_pc_file_name = "lua{0}.pc".format(self.version.up_to(2)) symlink( join_path(self.prefix.lib, "pkgconfig", versioned_pc_file_name), diff --git a/var/spack/repos/builtin/packages/lucene/package.py b/var/spack/repos/builtin/packages/lucene/package.py index 784084835b3407..eebfef62db0e01 100644 --- a/var/spack/repos/builtin/packages/lucene/package.py +++ b/var/spack/repos/builtin/packages/lucene/package.py @@ -17,16 +17,29 @@ class Lucene(Package): list_url = "https://archive.apache.org/dist/lucene/java/" list_depth = 1 - license("BSD-2-Clause") - - 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") - - 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 1f9e7ca6424033..9c5596a7150581 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 d991975c2ee737..3548c66c52bda8 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 @@ def build_targets(self): 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 71f316db949860..369072153cfa25 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 86c7dd07801570..9fdb78ebabb7b6 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 @@ def check(self): @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 @@ def _get_sys_type(self, spec): 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 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None): 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 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None): 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 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None): 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 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None): 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 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None): 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 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None): 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 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None): 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 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None): 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 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None): 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 @@ def cmake_args(self): # 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 cc005e970a0606..356faa1fc8c115 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 5449439f02d5ce..eb0dc95ed764f1 100644 --- a/var/spack/repos/builtin/packages/lwgrp/package.py +++ b/var/spack/repos/builtin/packages/lwgrp/package.py @@ -17,11 +17,14 @@ class Lwgrp(AutotoolsPackage): 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") diff --git a/var/spack/repos/builtin/packages/lwtnn/package.py b/var/spack/repos/builtin/packages/lwtnn/package.py index a823f7cb9ad855..0087b298d3b459 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 abc2c88f70be4f..30af5b77ca204a 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 7b8fb3673fa9d5..24053d94086b2d 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 ed9140254b6689..f00ec0ae0c5a6c 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,14 +75,14 @@ def root_cmakelists_dir(self): 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_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic")) 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 @@ -95,7 +99,7 @@ def setup_build_environment(self, env): 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 @@ -109,8 +113,8 @@ def install(self, pkg, spec, prefix): 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 46749cfcf445f5..1b08713e303b22 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 6bb7f3b449e9aa..e0ff76808b2751 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 1d95066711eddb..4fe4f819b79bea 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 cfe1745549b403..cc4aa1d65d6a8a 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 05de77cd740a59..fe1a2e80efdc3e 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 0e601b32d1ea3e..9f61c5dff2745b 100644 --- a/var/spack/repos/builtin/packages/macsio/package.py +++ b/var/spack/repos/builtin/packages/macsio/package.py @@ -20,6 +20,8 @@ class Macsio(CMakePackage): version("1.1", sha256="a86249b0f10647c0b631773db69568388094605ec1a0af149d9e61e95e6961ec") version("1.0", sha256="1dd0df28f9f31510329d5874c1519c745b5c6bec12e102cea3e9f4b05e5d3072") + depends_on("c", type="build") # generated + 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 b08a180dad5985..5095cf818b10ac 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 00000000000000..d7cf655bbd1282 --- /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 +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 eb08e306bdc244..4847a81225aefb 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 @@ def build(self, spec, prefix): 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 @@ def installfile(filename): 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 dbc8c545b02454..d7d333bb9e231b 100644 --- a/var/spack/repos/builtin/packages/madis/package.py +++ b/var/spack/repos/builtin/packages/madis/package.py @@ -24,6 +24,8 @@ class Madis(MakefilePackage): version("4.5", sha256="66376c72ade6b06a5392ad8b4b7a338efbf4d82ff6f7f33648ca316738808e6f") 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 d05ce5197e760e..fd42729b9058b5 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 da0ef74d0f2a6a..fc77b984334a06 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 799dbbc3525ab0..173f51f3008b8c 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 00000000000000..fbd65c3d907023 --- /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 c635278c348240..e895e44702ebc3 100644 --- a/var/spack/repos/builtin/packages/magics/package.py +++ b/var/spack/repos/builtin/packages/magics/package.py @@ -32,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 ") variant( diff --git a/var/spack/repos/builtin/packages/magma/package.py b/var/spack/repos/builtin/packages/magma/package.py index ee927289f251d7..ee0397b66f7a4f 100644 --- a/var/spack/repos/builtin/packages/magma/package.py +++ b/var/spack/repos/builtin/packages/magma/package.py @@ -14,7 +14,7 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage): """ homepage = "https://icl.utk.edu/magma/" - git = "https://bitbucket.org/icl/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") @@ -39,6 +39,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") @@ -50,7 +54,21 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage): 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"]: + 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") @@ -66,9 +84,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") @@ -101,14 +123,14 @@ def generate_gpu_config(self): 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") @@ -139,14 +161,14 @@ def cmake_args(self): 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: @@ -175,21 +197,40 @@ def post_install(self): 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 b1eecff6328f61..5778c9eadf3c62 100644 --- a/var/spack/repos/builtin/packages/makedepend/package.py +++ b/var/spack/repos/builtin/packages/makedepend/package.py @@ -9,7 +9,7 @@ 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") @@ -18,5 +18,7 @@ class Makedepend(AutotoolsPackage, XorgPackage): 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 00000000000000..79ad93eb9826c0 --- /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 a9b0fbb2a86368..7666b55e8a3c52 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 19e94e98fa6a3b..f7149aa434dc3d 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 b2d1ba4c959f88..0532d6ded460e0 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 836c0c2a27d79e..1139f5182297ae 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 ca6e9a5d5d2f6d..9e5a5c5697f4ee 100644 --- a/var/spack/repos/builtin/packages/mapl/package.py +++ b/var/spack/repos/builtin/packages/mapl/package.py @@ -38,9 +38,15 @@ class Mapl(CMakePackage): version("develop", branch="develop") version("main", branch="main") + 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.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") @@ -141,13 +147,22 @@ 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:", + when="@2.47", ) resource( name="esma_cmake", @@ -228,6 +243,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", @@ -240,11 +256,15 @@ class Mapl(CMakePackage): conflicts("+pflogger", when="@:2.40.3 %intel@2021.7:") conflicts("+extdata2g", when="@:2.40.3 %intel@2021.7:") - depends_on("cmake@3.17:", type="build") + 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") + + # ESMF dependency depends_on("esmf@8.6.1:", when="@2.45:") depends_on("esmf@8.6.0", when="@2.44") depends_on("esmf@8.5:", when="@2.40:2.43") @@ -254,46 +274,54 @@ class Mapl(CMakePackage): depends_on("esmf~debug", when="~debug") depends_on("esmf+debug", when="+debug") - depends_on("gftl@1.13.0:", when="@2.45:") + # 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.8.0:", when="@2.45:") + # 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") - depends_on("pflogger@1.9.1: +mpi", when="@2.23:2.39+pflogger") - depends_on("pflogger@1.9.5: +mpi", when="@2.40:2.43+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.14.0: +mpi", when="@2.45:+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.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.7.0:", when="@2.45:+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.9: +mpi +fhamcrest", when="@2.45:+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") @@ -385,3 +413,14 @@ def setup_build_environment(self, env): # 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.builder.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 ba8622595c768d..a5d35ecb6f50be 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 c55cba0fead114..66830e8a26e05a 100644 --- a/var/spack/repos/builtin/packages/mapserver/package.py +++ b/var/spack/repos/builtin/packages/mapserver/package.py @@ -20,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", diff --git a/var/spack/repos/builtin/packages/maq/package.py b/var/spack/repos/builtin/packages/maq/package.py index 3c6dee69c3afda..e00336542f7309 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 2412849e50ba98..00000000000000 --- 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 30dccf8db49db3..15ca777da0f9ad 100644 --- a/var/spack/repos/builtin/packages/mariadb-c-client/package.py +++ b/var/spack/repos/builtin/packages/mariadb-c-client/package.py @@ -60,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 d1392fe893fb1b..5585600b9d798d 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 b14b700bc9ab10..3145f4d4f2e6f1 100644 --- a/var/spack/repos/builtin/packages/masa/package.py +++ b/var/spack/repos/builtin/packages/masa/package.py @@ -20,6 +20,10 @@ class Masa(AutotoolsPackage): 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="Compile with Fortran interfaces") variant("python", default=True, description="Compile with Python interfaces") diff --git a/var/spack/repos/builtin/packages/mash/package.py b/var/spack/repos/builtin/packages/mash/package.py index 8a33d72816e214..bcf554bbc13050 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 a81f957b5364e1..24d894e29ab27c 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 @@ def patch(self): 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 ea4103996c22bc..460d700b919209 100644 --- a/var/spack/repos/builtin/packages/matio/package.py +++ b/var/spack/repos/builtin/packages/matio/package.py @@ -33,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 00000000000000..e29afca4904c49 --- /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 348e88d521a81d..08fc690658e862 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 fa0df4f84a60f4..bce42ca490cd22 100644 --- a/var/spack/repos/builtin/packages/maverick/package.py +++ b/var/spack/repos/builtin/packages/maverick/package.py @@ -15,6 +15,9 @@ 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") diff --git a/var/spack/repos/builtin/packages/mawk/package.py b/var/spack/repos/builtin/packages/mawk/package.py index 762b3929f951dc..deb5126d7c1497 100644 --- a/var/spack/repos/builtin/packages/mawk/package.py +++ b/var/spack/repos/builtin/packages/mawk/package.py @@ -22,4 +22,6 @@ class Mawk(AutotoolsPackage): ) 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 c7276ad216ca17..34222aab149f13 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 0585a2529c6193..73f463239d026c 100644 --- a/var/spack/repos/builtin/packages/mbedtls/package.py +++ b/var/spack/repos/builtin/packages/mbedtls/package.py @@ -14,112 +14,30 @@ 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") # version 3.x + version("3.6.0", sha256="3ecf94fcfdaacafb757786a01b7538a61750ebd85c4b024f56ff8ba1490fcd38") 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 2.x + 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 +76,11 @@ 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" + return f"https://github.com/Mbed-TLS/mbedtls/releases/download/v{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 01429c3d751b8d..045eae01945633 100644 --- a/var/spack/repos/builtin/packages/mc/package.py +++ b/var/spack/repos/builtin/packages/mc/package.py @@ -21,6 +21,8 @@ class Mc(AutotoolsPackage): 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:") diff --git a/var/spack/repos/builtin/packages/mcl/package.py b/var/spack/repos/builtin/packages/mcl/package.py index 8de3dcc57ddf54..e17f5a98d5b885 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 bc0530cc512432..0dd0562ee2d32d 100644 --- a/var/spack/repos/builtin/packages/mcpp/package.py +++ b/var/spack/repos/builtin/packages/mcpp/package.py @@ -15,6 +15,9 @@ class Mcpp(AutotoolsPackage, SourceforgePackage): version("2.7.2", sha256="3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + 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 1f6852c55138e9..53d1eb68ea0a4f 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 bcbed778e8096b..43eb1bd2bf9ff6 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 82526e0144413c..fbf48a56d3f7c6 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 00000000000000..f10bf37084c6cc --- /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 bb5be2536bc34d..00c815e2c39273 100644 --- a/var/spack/repos/builtin/packages/mdspan/package.py +++ b/var/spack/repos/builtin/packages/mdspan/package.py @@ -30,7 +30,7 @@ def cmake_args(self): 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 f4dad7bc6335f5..3f2ca7a83d24eb 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 9dc575f6720ae8..de0f92c1040f59 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 48cd8a82a3f730..8e22764f6138fe 100644 --- a/var/spack/repos/builtin/packages/med/package.py +++ b/var/spack/repos/builtin/packages/med/package.py @@ -43,6 +43,10 @@ class Med(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/medipack/package.py b/var/spack/repos/builtin/packages/medipack/package.py index 7823a2227942b3..ec07e792fbff0d 100644 --- a/var/spack/repos/builtin/packages/medipack/package.py +++ b/var/spack/repos/builtin/packages/medipack/package.py @@ -13,10 +13,14 @@ class Medipack(CMakePackage): 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:"), @@ -25,7 +29,7 @@ class Medipack(CMakePackage): ) 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, "src")) - install_tree(join_path(self.stage.source_path, "src"), join_path(prefix, "src")) + 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 18771f50c5c188..768a5c7babd58e 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 c0aceac0b5d5c4..3d81a58bcfe230 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 931460e22a899a..f40b2ddca2c554 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 58855d6f2caa0a..dd1cfa45ef1f87 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 b6a2f1651160b4..529a70bf63c1ee 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 a4a7260ac1a8a5..c99ecd67477ae9 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 4aaf317f57080d..77b69170c22132 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 a853e5df853c7a..4ab957483b092b 100644 --- a/var/spack/repos/builtin/packages/memkind/package.py +++ b/var/spack/repos/builtin/packages/memkind/package.py @@ -35,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") diff --git a/var/spack/repos/builtin/packages/memsurfer/package.py b/var/spack/repos/builtin/packages/memsurfer/package.py index b10bbf4e04b6de..2b6e3b812b82af 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 index 6d124d2121f90e..a0b598cd7377eb 100644 --- a/var/spack/repos/builtin/packages/mepo/package.py +++ b/var/spack/repos/builtin/packages/mepo/package.py @@ -11,12 +11,14 @@ class Mepo(PythonPackage): homepage = "https://github.com/GEOS-ESM/mepo" git = "https://github.com/GEOS-ESM/mepo.git" - pypi = "mepo/mepo-2.0.0rc4.tar.gz" + 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") diff --git a/var/spack/repos/builtin/packages/meraculous/package.py b/var/spack/repos/builtin/packages/meraculous/package.py index 1e17f87a8e32f1..2e87d70a016d77 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 df0fb44fece43f..c8c8036f75d187 100644 --- a/var/spack/repos/builtin/packages/mercurial/package.py +++ b/var/spack/repos/builtin/packages/mercurial/package.py @@ -16,6 +16,7 @@ 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") @@ -28,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")) diff --git a/var/spack/repos/builtin/packages/mercury/package.py b/var/spack/repos/builtin/packages/mercury/package.py index 4371ffdd1469e4..9a533cde8c1993 100644 --- a/var/spack/repos/builtin/packages/mercury/package.py +++ b/var/spack/repos/builtin/packages/mercury/package.py @@ -29,6 +29,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") diff --git a/var/spack/repos/builtin/packages/mesa-demos/package.py b/var/spack/repos/builtin/packages/mesa-demos/package.py index c85b2eb2e3ddab..6282ddf9e0553b 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 @@ def configure_args(self): "--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 071703aa5f3208..4692ad4e6b73e3 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 c53d7039edf2d6..61494f3db6a80e 100644 --- a/var/spack/repos/builtin/packages/mesa/package.py +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -49,6 +49,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") @@ -62,6 +65,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.") @@ -102,9 +106,7 @@ class Mesa(MesonPackage): # Provides provides("libglx", when="+glx") - # provides('egl@1.5', when='+egl') - provides("libosmesa", when="+osmesa") # Variant dependencies with when("+llvm"): @@ -113,12 +115,13 @@ class Mesa(MesonPackage): depends_on("libllvm@:12", when="@:21") depends_on("libllvm@:17", when="@:23") - 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") + 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 a88f5f5113a85b..00000000000000 --- 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 7c92326f3774d4..00000000000000 --- 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 17f6903c8d1b40..00000000000000 --- 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 20262d8d0808e7..bac6cbb77e3d41 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 6d3b107de55c38..dfa74a9c854188 100644 --- a/var/spack/repos/builtin/packages/meshtool/package.py +++ b/var/spack/repos/builtin/packages/meshtool/package.py @@ -18,6 +18,7 @@ class Meshtool(MakefilePackage): # 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") @@ -28,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 b2ffaef99fd105..e142fd09661902 100644 --- a/var/spack/repos/builtin/packages/meson/package.py +++ b/var/spack/repos/builtin/packages/meson/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 sys + from spack.package import * @@ -18,52 +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")) @@ -101,5 +181,11 @@ def setup_dependent_build_environment(self, env, dependent_spec): 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 04ade298bda860..776d4bc469e7a5 100644 --- a/var/spack/repos/builtin/packages/met/package.py +++ b/var/spack/repos/builtin/packages/met/package.py @@ -31,6 +31,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 b2a6526c84f59f..3871b38b6cdfed 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 00000000000000..6ec57d2fe02ed0 --- /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 cabccc9db21e2f..7c2b87ad01650d 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 bdb821b2e0ec77..841c48b86d15ed 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 454e7eee2fbef5..8ca6ee468d73ee 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 d1c85e22a9d74c..3f16a3f3765797 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 35e03b872d04a7..641c14f3500d5e 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/package.py b/var/spack/repos/builtin/packages/metis/package.py index c77ef4b34594f7..75e8b15982cfca 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -31,6 +31,8 @@ class Metis(CMakePackage, MakefilePackage): version("5.1.0", sha256="76faebe03f6c963127dbb73c13eab58c9a3faeae48779f049066a21c087c5db2") version("4.0.3", sha256="5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55") + depends_on("c", type="build") # generated + build_system( conditional("cmake", when="@5:"), conditional("makefile", when="@:4"), default="cmake" ) @@ -98,12 +100,32 @@ def setup_build_environment(self, env): 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 +178,8 @@ def install(self, pkg, spec, prefix): # 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 9d801477b704d6..05f4b33065acb1 100644 --- a/var/spack/repos/builtin/packages/metkit/package.py +++ b/var/spack/repos/builtin/packages/metkit/package.py @@ -24,6 +24,8 @@ class Metkit(CMakePackage): 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") 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 00000000000000..6e0d3c7ef574bb --- /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 + #include + #include "umpire/Umpire.hpp" ++#include + + #ifdef MFEM_USE_CUDA + #include + 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/mfem-hip.patch b/var/spack/repos/builtin/packages/mfem/mfem-hip.patch deleted file mode 100644 index 565bae348c0009..00000000000000 --- a/var/spack/repos/builtin/packages/mfem/mfem-hip.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 93ab69cac72cc2d13cfd4b7efcc235bdbca2b9f5 Mon Sep 17 00:00:00 2001 -From: Afzal Patel -Date: Wed, 17 Jan 2024 11:44:18 -0800 -Subject: [PATCH] Add hip library path to ghv flags so libamdhip64 can be found - ---- - config/makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/config/makefile b/config/makefile -index 627d117..a453865 100644 ---- a/config/makefile -+++ b/config/makefile -@@ -38,7 +38,7 @@ all: header config-mk - MPI = $(MFEM_USE_MPI:NO=) - GHV_CXX ?= $(MFEM_CXX) - GHV = get_hypre_version --GHV_FLAGS = $(subst @MFEM_DIR@,$(if $(MFEM_DIR),$(MFEM_DIR),..),$(HYPRE_OPT)) -+GHV_FLAGS = $(subst @MFEM_DIR@,$(if $(MFEM_DIR),$(MFEM_DIR),..),$(HYPRE_OPT)) $(HIP_LIB) - SMX = $(if $(MFEM_USE_PUMI:NO=),MFEM_USE_SIMMETRIX) - SMX_PATH = $(PUMI_DIR)/include/gmi_sim.h - SMX_FILE = $(subst @MFEM_DIR@,$(if $(MFEM_DIR),$(MFEM_DIR),..),$(SMX_PATH)) --- -2.25.1 \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index 0f339e11e7fcb0..b50af840f2725d 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 * @@ -51,6 +50,13 @@ class Mfem(Package, CudaPackage, ROCmPackage): # other version. 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", @@ -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") @@ -212,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") @@ -286,10 +306,11 @@ 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: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:+sundials~mpi") depends_on("sundials@5.0.0:6.7.0+mpi+hypre", when="@4.5.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_), @@ -337,7 +358,7 @@ 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") depends_on("slepc@3.8.0:", when="+slepc") # If petsc is built with +cuda, propagate cuda_arch to petsc and slepc for sm_ in CudaPackage.cuda_arch_values: @@ -361,6 +382,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_) @@ -395,13 +417,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_) @@ -429,6 +452,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_) @@ -448,6 +472,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:") @@ -468,7 +506,7 @@ class Mfem(Package, CudaPackage, ROCmPackage): when="@4.6.0 +gslib+shared+miniapps", sha256="2a31682d876626529e2778a216d403648b83b90997873659a505d982d0e65beb", ) - patch("mfem-hip.patch", when="+rocm ^hip@6.0:") + patch("mfem-4.7.patch", when="@4.7.0") phases = ["configure", "build", "install"] @@ -489,56 +527,16 @@ def setup_build_environment(self, env): # 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]: @@ -581,8 +579,8 @@ def find_optional_library(name, prefix): "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")), @@ -619,6 +617,8 @@ def find_optional_library(name, prefix): "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 @@ -632,6 +632,11 @@ def find_optional_library(name, prefix): cxxstd = "14" if self.spec.satisfies("^ginkgo"): 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: @@ -639,6 +644,8 @@ def find_optional_library(name, prefix): 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: @@ -757,7 +764,7 @@ def find_optional_library(name, prefix): 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"): @@ -792,7 +799,7 @@ def find_optional_library(name, prefix): ) 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), @@ -907,7 +914,7 @@ def find_optional_library(name, prefix): 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, @@ -944,7 +951,6 @@ def find_optional_library(name, prefix): options += ["HIP_CXX=%s" % spec["hip"].hipcc, "HIP_ARCH=%s" % amdgpu_target] hip_headers = HeaderList([]) hip_libs = LibraryList([]) - hip_libs += find_libraries("libamdhip64", spec["hip"].prefix.lib) # To use a C++ compiler that supports -xhip flag one can use # something like this: # options += [ @@ -967,14 +973,35 @@ def find_optional_library(name, prefix): 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: @@ -1018,9 +1045,17 @@ def find_optional_library(name, prefix): ] 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"} @@ -1089,7 +1124,7 @@ def find_optional_library(name, prefix): 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 @@ -1105,6 +1140,8 @@ def find_optional_library(name, prefix): 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), @@ -1121,6 +1158,10 @@ def find_optional_library(name, prefix): "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) @@ -1182,7 +1223,7 @@ def cache_test_sources(self): # 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)""" @@ -1259,7 +1300,7 @@ def libs(self): @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: @@ -1271,7 +1312,7 @@ def config_mk(self): @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. """ @@ -1281,3 +1322,46 @@ def test_mk(self): 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 cb658dd59cc468..be0d27bc0f93b8 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 81097f0a16f6e0..6a1c68807f08a9 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 c3abc1a5cfd93e..f397ffe08c40cb 100644 --- a/var/spack/repos/builtin/packages/mgard/package.py +++ b/var/spack/repos/builtin/packages/mgard/package.py @@ -29,6 +29,8 @@ class Mgard(CMakePackage, CudaPackage): version("2021-11-12", commit="3c05c80a45a51bb6cc5fb5fffe7b1b16787d3366") version("2020-10-01", commit="b67a0ac963587f190e106cc3c0b30773a9455f7a") + depends_on("cxx", type="build") # generated + variant( "serial", when="@2022-11-18:", @@ -47,6 +49,7 @@ 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.4:", when="@2022-11-18:") @@ -71,10 +74,15 @@ class Mgard(CMakePackage, CudaPackage): 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") - if self.spec.satisfies("@2020-10-01 %apple-clang@15:"): - 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 ecbe45b209b4e4..8a105d123d6b89 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 8ad20e6dd2fa24..6eaa3b079479cb 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 @@ def setup_build_environment(self, env): 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 a4dcb003bb5090..3ed05d7db37501 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 5bc771a1fbee2f..9e62835cefa85c 100644 --- a/var/spack/repos/builtin/packages/microbiomeutil/package.py +++ b/var/spack/repos/builtin/packages/microbiomeutil/package.py @@ -9,11 +9,13 @@ 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 0effbe21e579d6..a157413c036d4a 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 cad5b337d0e39a..86c0c0de877b55 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 8cb736a9b5c6cb..00000000000000 --- 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/package.py b/var/spack/repos/builtin/packages/migraphx/package.py index 69c0f48932242e..f282fc5293b52d 100644 --- a/var/spack/repos/builtin/packages/migraphx/package.py +++ b/var/spack/repos/builtin/packages/migraphx/package.py @@ -13,13 +13,17 @@ class Migraphx(CMakePackage): homepage = "https://github.com/ROCm/AMDMIGraphX" git = "https://github.com/ROCm/AMDMIGraphX.git" - url = "https://github.com/ROCm/AMDMIGraphX/archive/rocm-6.0.2.tar.gz" + 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.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") @@ -29,21 +33,24 @@ class Migraphx(CMakePackage): 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") with default_args(deprecated=True): - 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.4.3", sha256="f83e7bbe5d6d0951fb2cf0abf7e8b3530e9a5e45f7cec6d760da055d6905d568") + version("5.4.0", sha256="b6e7f4a1bf445ea0dae644ed5722369cde66fbee82a5917722f5d3f8c48b0a8c") + version("5.3.3", sha256="91d91902bbedd5e1951a231e8e5c9a328360b128c731912ed17c8059df38e02a") + version("5.3.0", sha256="d0b7283f42e03fb38b612868b8c94f46f27a6e0b019ae95fde5b9086582a1c69") + + 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 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="@:5.1") 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:5.7") @@ -51,13 +58,13 @@ class Migraphx(CMakePackage): patch( "https://github.com/ROCm/AMDMIGraphX/commit/728bea3489c97c9e1ddda0a0ae527ffd2d70cb97.patch?full_index=1", sha256="3a8afd32208aa4f59fb31f898d243287771ebd409c7af7a4a785c586081e3711", - when="@6.0:", + when="@6.0", ) patch( "https://github.com/ROCm/AMDMIGraphX/commit/624f8ef549522f64fdddad7f49a2afe1890b0b79.patch?full_index=1", sha256="410d0fd49f5f65089cd4f540c530c85896708b4fd94c67d15c2c279158aea85d", - when="@6.0:", + when="@6.0", ) patch("0003-add-half-include-directory-migraphx-6.0.patch", when="@6.0:") @@ -74,11 +81,6 @@ class Migraphx(CMakePackage): depends_on("abseil-cpp") 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", @@ -92,6 +94,10 @@ class Migraphx(CMakePackage): "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-cmake@{ver}:", type="build", when=f"@{ver}") depends_on(f"hip@{ver}", when=f"@{ver}") @@ -99,7 +105,7 @@ class Migraphx(CMakePackage): depends_on(f"rocblas@{ver}", when=f"@{ver}") depends_on(f"miopen-hip@{ver}", when=f"@{ver}") - for ver in ["6.0.0", "6.0.2", "6.1.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"]: depends_on(f"rocmlir@{ver}", when=f"@{ver}") @property @@ -121,6 +127,15 @@ def determine_version(cls, lib): 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 @@ -138,12 +153,18 @@ def cmake_args(self): 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) + ) + ) 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 33b408fb49aee5..67c52b80fd177c 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 c0f24d8bb27dc6..45ef8531e09163 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 65edd50b89cebe..31d21b9463cf37 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 53eefe6b4de68a..ff782be5550751 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 9739b7f4c317c7..3241b7175a91cf 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 af37a739045a59..2ff1e7a1d5d8ba 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 138d0a1b077a70..724cf9561fe9c2 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 166ba379c09b7a..78bcce5084f297 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 2a908fc0b237cc..3aff8f964d7ab4 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 c28bf4be9cf751..d620ce47c83c5a 100644 --- a/var/spack/repos/builtin/packages/miniconda3/package.py +++ b/var/spack/repos/builtin/packages/miniconda3/package.py @@ -10,6 +10,24 @@ 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", @@ -140,7 +158,7 @@ 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 beb587c7c7973a..25cec0c808891f 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 f690742acafb48..8f5d3c05e255ba 100644 --- a/var/spack/repos/builtin/packages/miniforge3/package.py +++ b/var/spack/repos/builtin/packages/miniforge3/package.py @@ -56,6 +56,21 @@ def install(self, spec, prefix): 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)) diff --git a/var/spack/repos/builtin/packages/minigmg/package.py b/var/spack/repos/builtin/packages/minigmg/package.py index 4a5e4605f7a3bd..f7da002cdf08ee 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 4a1e5aa6d4a599..142ef71fa46144 100644 --- a/var/spack/repos/builtin/packages/minimap2/package.py +++ b/var/spack/repos/builtin/packages/minimap2/package.py @@ -27,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 ec216a538f91c1..185dbd881b506f 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 7c827dc9d8fba0..1f2d287575f858 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 666c31ec293a92..386c3ba62ac9e3 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 f5161f669b76ac..7aaf40a1d6162c 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 0cf2ecc393b572..09ee7ea8aa2604 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 44c77e051dc9e8..2ae2c1722aab85 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 71cb49a9795352..de20e532a08d88 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 d88a5e046b51d3..55aa8c2cea1925 100644 --- a/var/spack/repos/builtin/packages/minizip/package.py +++ b/var/spack/repos/builtin/packages/minizip/package.py @@ -16,6 +16,9 @@ class Minizip(AutotoolsPackage): version("1.2.11", sha256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + configure_directory = "contrib/minizip" depends_on("automake", type="build") diff --git a/var/spack/repos/builtin/packages/miopen-hip/package.py b/var/spack/repos/builtin/packages/miopen-hip/package.py index 5a9c1136e1cdcc..73c7d08c6c1da1 100644 --- a/var/spack/repos/builtin/packages/miopen-hip/package.py +++ b/var/spack/repos/builtin/packages/miopen-hip/package.py @@ -14,13 +14,17 @@ class MiopenHip(CMakePackage): homepage = "https://github.com/ROCm/MIOpen" git = "https://github.com/ROCm/MIOpen.git" - url = "https://github.com/ROCm/MIOpen/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/MIOpen/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["libMIOpen"] license("MIT") + 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") @@ -30,16 +34,19 @@ class MiopenHip(CMakePackage): 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") with default_args(deprecated=True): - 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.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("cxx", type="build") # generated depends_on("cmake@3.5:", type="build") depends_on("pkgconfig", type="build") @@ -58,17 +65,12 @@ class MiopenHip(CMakePackage): patch("0002-add-include-dir-miopen-hip-6.0.0.patch", when="@6.0") patch("0002-add-include-dir-miopen-hip-6.1.0.patch", when="@6.1") patch( - "https://github.com/ROCm/MIOpen/pull/2276/commits/f60aa1ff89f8fb596b4a6a4c70aa7d557803db87.patch?full_index=1", - sha256="c777d9f4cd2bbfec632b38620c0f70bb0cce8da1", + "https://github.com/ROCm/MIOpen/commit/f60aa1ff89f8fb596b4a6a4c70aa7d557803db87.patch?full_index=1", + sha256="7f382c872d89f22da1ad499e85ffe9881cc7404c8465e42877a210a09382e2ea", when="@5.7", ) 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", @@ -82,29 +84,75 @@ class MiopenHip(CMakePackage): "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-cmake@{ver}:", type="build", when=f"@{ver}") depends_on(f"hip@{ver}", when=f"@{ver}") - depends_on(f"rocm-clang-ocl@{ver}", when=f"@{ver}") depends_on(f"rocblas@{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"]: + 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(f"rocm-clang-ocl@{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.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2", "6.1.0"]: + 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", + ]: depends_on("nlohmann-json", type="link") 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(f"rocmlir@{ver}", when=f"@{ver}") - for ver in ["6.0.0", "6.0.2", "6.1.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"]: depends_on("roctracer-dev@" + ver, when="@" + ver) - for ver in ["6.1.0"]: + for ver in ["6.1.0", "6.1.1", "6.1.2"]: depends_on("googletest") + for ver in ["6.2.0", "6.2.1"]: + depends_on(f"rocrand@{ver}", when=f"@{ver}") def setup_build_environment(self, env): 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): return self.spec["llvm-amdgpu"].prefix.amdgcn.bitcode @@ -138,7 +186,7 @@ def cmake_args(self): 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) ) @@ -152,14 +200,21 @@ def cmake_args(self): 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.0:"): + if self.spec.satisfies("@6:6.1"): 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)) - if self.spec.satisfies("@6.1:"): + if self.spec.satisfies("@6.1"): args.append("-DSQLITE_INCLUDE_DIR={0}".format(self.spec["sqlite"].prefix.include)) + if self.spec.satisfies("@6.2:"): + args.append( + self.define( + "CMAKE_CXX_FLAGS", + f"-I{self.spec['roctracer-dev'].prefix.include} " + f"-L{self.spec['roctracer-dev'].prefix.lib} " + 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 34e4de3569f9ac..b9b5da9e53edab 100644 --- a/var/spack/repos/builtin/packages/miopen-opencl/package.py +++ b/var/spack/repos/builtin/packages/miopen-opencl/package.py @@ -24,16 +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") with default_args(deprecated=True): - 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.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") @@ -47,23 +44,12 @@ class MiopenOpencl(CMakePackage): depends_on("sqlite", type="link") depends_on("half", type="build") - for ver in [ - "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", - ]: + 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.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3"]: + 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"]: 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 be92505c18016a..00000000000000 --- 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 c0e9d78ab7e267..00000000000000 --- a/var/spack/repos/builtin/packages/miopen-tensile/package.py +++ /dev/null @@ -1,91 +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/ROCm/MIOpenTensile" - git = "https://github.com/ROCm/MIOpenTensile.git" - url = "https://github.com/ROCm/MIOpentensile/archive/rocm-5.0.0.tar.gz" - tags = ["rocm"] - - maintainers("srekolam") - libraries = ["libMIOpenTensile"] - - version("5.1.0", sha256="f1ae57bd4df8c154357b3f17caf0cfd5f80ba16ffff67bf6219a56f1eb5f897d") - - 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/ROCm/Tensile.git", - commit="9cbabb07f81e932b9c98bf5ae48fbd7fcef615cf", - ) - - for ver in ["5.1.0"]: - 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"rocminfo@{ver}", when=f"@{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: - return "{0}.{1}.{2}".format( - int(match.group(1)), int(match.group(2)), int(match.group(3)) - ) - return None - - 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 112d8a749587d4..89e7399cbc7005 100644 --- a/var/spack/repos/builtin/packages/miopengemm/package.py +++ b/var/spack/repos/builtin/packages/miopengemm/package.py @@ -30,32 +30,22 @@ def url_for_version(self, version): 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") 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") - 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", - ]: + 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}") diff --git a/var/spack/repos/builtin/packages/mira/package.py b/var/spack/repos/builtin/packages/mira/package.py index 7c0cd23874bcc0..005a7a4a16691e 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 b9c12d9e5ff14d..8090d9ec8d1214 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 00000000000000..80bbdff605c0ec --- /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 +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/package.py b/var/spack/repos/builtin/packages/mivisionx/package.py index 9918f6ad2d3e6f..f3e565f99f40a9 100644 --- a/var/spack/repos/builtin/packages/mivisionx/package.py +++ b/var/spack/repos/builtin/packages/mivisionx/package.py @@ -13,7 +13,7 @@ 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-6.0.2.tar.gz" + url = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/archive/rocm-6.1.2.tar.gz" maintainers("srekolam", "renjithravindrankannath") tags = ["rocm"] @@ -26,6 +26,10 @@ def url_for_version(self, version): return url.format(version) license("MIT") + 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") @@ -35,16 +39,13 @@ def url_for_version(self, version): 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") with default_args(deprecated=True): - 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.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. @@ -54,10 +55,16 @@ def url_for_version(self, version): 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.0: +add_tests") patch( "https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/commit/da24882438b91a0ae1feee23206b75c1a1256887.patch?full_index=1", @@ -69,25 +76,6 @@ def url_for_version(self, version): conflicts("+add_tests", when="@:5.4") def patch(self): - if self.spec.satisfies("@:5.1 + hip"): - filter_file( - r"${ROCM_PATH}/miopen", - self.spec["miopen-hip"].prefix.miopen, - "amd_openvx_extensions/CMakeLists.txt", - string=True, - ) - filter_file( - r"${ROCM_PATH}/bin", - self.spec["hip"].prefix.bin, - "amd_openvx/openvx/hipvx/CMakeLists.txt", - string=True, - ) - filter_file( - r"${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( r"${ROCM_PATH}/include/miopen/config.h", @@ -115,48 +103,63 @@ def patch(self): "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( 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( 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( 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( 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( 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("+add_tests"): filter_file( r"${ROCM_PATH}/include/mivisionx", "{0}/include/mivisionx".format(self.spec.prefix), - "samples/inference/mv_objdetect/CMakeLists.txt", + "tests/amd_migraphx_tests/mnist/CMakeLists.txt", string=True, ) filter_file( r"${ROCM_PATH}/lib", "{0}/lib".format(self.spec.prefix), - "samples/inference/mv_objdetect/CMakeLists.txt", + "tests/amd_migraphx_tests/mnist/CMakeLists.txt", + string=True, + ) + filter_file( + r"${ROCM_PATH}/include/mivisionx", + "{0}/include/mivisionx".format(self.spec.prefix), + "tests/amd_migraphx_tests/resnet50/CMakeLists.txt", + string=True, + ) + filter_file( + r"${ROCM_PATH}/lib", + "{0}/lib".format(self.spec.prefix), + "tests/amd_migraphx_tests/resnet50/CMakeLists.txt", string=True, ) filter_file( @@ -200,13 +203,6 @@ def patch(self): depends_on("ffmpeg@:4", type="build", when="@:5.3") 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" @@ -216,7 +212,7 @@ def patch(self): ) depends_on("openssl") depends_on("libjpeg-turbo@2.0.6+partial_decoder", type="build") - depends_on("rpp", when="@5.5:") + 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:") @@ -232,32 +228,14 @@ def patch(self): # 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 [ - "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", - ]: + 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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -271,6 +249,10 @@ def patch(self): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on(f"miopen-hip@{ver}", when=f"@{ver}") for ver in [ @@ -286,16 +268,47 @@ def patch(self): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: 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", "6.0.0", "6.0.2", "6.1.0"]: + 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"@{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"]: + 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 diff --git a/var/spack/repos/builtin/packages/mkfontscale/package.py b/var/spack/repos/builtin/packages/mkfontscale/package.py index c034896f8f3a6e..04fe6637bfab6e 100644 --- a/var/spack/repos/builtin/packages/mkfontscale/package.py +++ b/var/spack/repos/builtin/packages/mkfontscale/package.py @@ -10,7 +10,7 @@ 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") @@ -19,10 +19,12 @@ class Mkfontscale(AutotoolsPackage, XorgPackage): version("1.2.2", sha256="4a5af55e670713024639a7f7d10826d905d86faf574cd77e0f5aef2d00e70168") version("1.1.2", sha256="8bba59e60fbc4cb082092cf6b67e810b47b4fe64fbc77dbea1d7e7d55312b2e4") + depends_on("c", type="build") + depends_on("libfontenc") 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 00000000000000..c2e1194ddf692c --- /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 807e7c3bb2b7b9..02b9bd521def71 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 4c4eb8c7c52f0d..d2766e8a939123 100644 --- a/var/spack/repos/builtin/packages/mlirmiopen/package.py +++ b/var/spack/repos/builtin/packages/mlirmiopen/package.py @@ -16,15 +16,10 @@ class Mlirmiopen(CMakePackage): tags = ["rocm"] maintainers("srekolam") - version("5.4.0", sha256="3823f455ee392118c3281e27d45fa0e5381f3c4070eb4e06ba13bc6b34a90a60") - version("5.3.3", sha256="e9aa407df775d00fdb9404689f69ac755575188f8b25c6bd0fa9599928c5c57f") - version("5.3.0", sha256="e8471a13cb39d33adff34730d3162adaa5d20f9544d61a6a94b39b9b5762ad6d") with default_args(deprecated=True): - 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") + 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 @@ def patch(self): 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 b520e3b87e97a1..0c9d6cca64fbf1 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 d84fdc3bc1899f..c2ad3aa3baf595 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,6 +60,7 @@ 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") @@ -64,8 +76,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 01ce1dbec6bd35..5baed86ac377f2 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 fe6d05f89b7b48..eb14be0c7761bf 100644 --- a/var/spack/repos/builtin/packages/mmg/package.py +++ b/var/spack/repos/builtin/packages/mmg/package.py @@ -40,6 +40,10 @@ class Mmg(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/mmseqs2/package.py b/var/spack/repos/builtin/packages/mmseqs2/package.py index 86d18d45c6dcbc..5855899a78ac37 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 dc7a2550178eb0..991503504a42ac 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 a0ed8f8b1d365b..6ad76aba0728ea 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 fa0943655866dd..57813c1b9ec741 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 905292e1500728..7bdcfc7665296b 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 c49ab28bff5744..2215190dac04f9 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 3dd44a14968cc7..023fd759d02680 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 692b1e49ee8423..a6c4fae52b3d6f 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 8ca6f5cede2224..06048ee28595ce 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 75457968978d68..00b02c8ae9cf87 100644 --- a/var/spack/repos/builtin/packages/mold/package.py +++ b/var/spack/repos/builtin/packages/mold/package.py @@ -16,6 +16,11 @@ class Mold(CMakePackage): 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") @@ -27,13 +32,18 @@ class Mold(CMakePackage): 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 98c8152334694b..25d7680f63eb28 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 6f07ecea21890c..ed52c14dd32fa7 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") @@ -50,7 +54,7 @@ class Molgw(MakefilePackage): 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"]) @@ -82,7 +86,11 @@ def edit(self, spec, prefix): 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 @@ -93,7 +101,7 @@ def edit(self, spec, prefix): 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: @@ -109,7 +117,11 @@ def edit(self, spec, prefix): 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 f53ee03166ec85..add8e3c541ec2c 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 @@ def configure_args(self): 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 b42b1827d76d56..06a7e8444eaa3b 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 3c65647e84bedd..408db7dabe4f4f 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=" 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 b75bdcb50aa8e7..30faee839d9d42 100644 --- a/var/spack/repos/builtin/packages/mono/package.py +++ b/var/spack/repos/builtin/packages/mono/package.py @@ -66,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";' diff --git a/var/spack/repos/builtin/packages/montage/package.py b/var/spack/repos/builtin/packages/montage/package.py index c50de9265a1100..47873700c34db9 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 60a98252984605..c0fbe28222bd7f 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 2495dc740507df..c660882271ccfb 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 a797598658767b..2a87ab3bc6aa3d 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 809cc4bca7a97e..4cc040287cc54d 100644 --- a/var/spack/repos/builtin/packages/mosquitto/package.py +++ b/var/spack/repos/builtin/packages/mosquitto/package.py @@ -23,6 +23,9 @@ class Mosquitto(CMakePackage): 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 8fc043cf49964e..f661642c980514 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/package.py b/var/spack/repos/builtin/packages/motif/package.py index 4fa53c7e930dfd..8d2b39e8610be1 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") 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 0c50cd9b72d3fa..a1a8688907d068 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 8a7e46f759f457..aa802f5e504e03 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 f1e2148fef9dd7..c7c9652d596c8d 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 3acd79366b30f9..7b738f2d76b3e6 100644 --- a/var/spack/repos/builtin/packages/mpas-model/package.py +++ b/var/spack/repos/builtin/packages/mpas-model/package.py @@ -25,6 +25,10 @@ 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 = [ @@ -65,6 +69,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 @@ -110,7 +119,7 @@ def target(self, model, action): 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 c117130c3a4a0d..5898c67895f81c 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 d5c795a05876fa..7095dbe29f680c 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 08a8bf372a815f..a08cb42d53008e 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 85e001daa92338..b5b9eca97143d4 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 e58672c4dcf5f8..b20bb35a82fd8a 100644 --- a/var/spack/repos/builtin/packages/mpfr/package.py +++ b/var/spack/repos/builtin/packages/mpfr/package.py @@ -30,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/ diff --git a/var/spack/repos/builtin/packages/mpi-bash/package.py b/var/spack/repos/builtin/packages/mpi-bash/package.py index d55940a6eaf2ab..bd29bcf73382c7 100644 --- a/var/spack/repos/builtin/packages/mpi-bash/package.py +++ b/var/spack/repos/builtin/packages/mpi-bash/package.py @@ -16,6 +16,8 @@ class MpiBash(AutotoolsPackage): 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:") diff --git a/var/spack/repos/builtin/packages/mpi-serial/package.py b/var/spack/repos/builtin/packages/mpi-serial/package.py index 2d23ad8caa85b6..583bb56a6e8bea 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 9c0e858778df4a..a07bbf86dc01d7 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 34910ae2010a75..945422c3a9b530 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/package.py b/var/spack/repos/builtin/packages/mpich/package.py index f0211f042cc798..92e9c104f13b08 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -37,6 +37,8 @@ def url_for_version(self, version): 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") @@ -62,6 +64,10 @@ def url_for_version(self, version): 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") # generated + 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") @@ -136,6 +142,8 @@ def url_for_version(self, version): 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", @@ -459,22 +467,10 @@ def setup_build_environment(self, env): 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") and spack_cc is not None: - # 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): dependent_module = dependent_spec.package.module @@ -487,20 +483,12 @@ def setup_dependent_build_environment(self, env, dependent_spec): 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") and spack_cc is not None: - 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)), @@ -675,7 +663,7 @@ def configure_args(self): 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 00000000000000..47ae0b8ee196c3 --- /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 5b23f1dd1c3bad..ffe5e9e9e70da7 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,23 @@ class Mpifileutils(Package): version("0.9.1", sha256="15a22450f86b15e7dc4730950b880fda3ef6f59ac82af0b268674d272aa61c69") version("0.9", sha256="1b8250af01aae91c985ca5d61521bfaa4564e46efa15cee65cd0f82cf5a2bcfb") + depends_on("c", type="build") # generated + + 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 +57,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) + 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 00000000000000..485c07240aea05 --- /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 587b5e65d04860..5df4b63c2d22d7 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 8c07e68ae645f4..89da44e32e5d9d 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 c7628f07d62f00..4eed14cde543d8 100644 --- a/var/spack/repos/builtin/packages/mpip/package.py +++ b/var/spack/repos/builtin/packages/mpip/package.py @@ -19,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 ac0d0d41ab5d2c..830d12cdfda386 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 f6e440ebd4fff2..7d61086b95ae32 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,9 +84,9 @@ def libs(self): 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")) diff --git a/var/spack/repos/builtin/packages/mpiwrapper/package.py b/var/spack/repos/builtin/packages/mpiwrapper/package.py index 50d18fc57f77be..2b6f7e9edd31a7 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 d8b9b59f61a672..a25f1ca57685aa 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 f39c81c76d7580..bff77e0465b6bd 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 index 2c302ad3744804..ef4a7fbb2e8347 100644 --- a/var/spack/repos/builtin/packages/mppp/package.py +++ b/var/spack/repos/builtin/packages/mppp/package.py @@ -30,6 +30,8 @@ class Mppp(CMakePackage): version("0.21", sha256="49a05fc6874a800cb42a3ac16eb46a50583f0b59d3b54008c58af766186a8c69") version("0.20", sha256="c736daeaac30e38e1c09a19d249209ad49f8ec92ab1315a8fb9a47cc1f54e607") + depends_on("cxx", type="build") # generated + variant( "mpfr", default=True, diff --git a/var/spack/repos/builtin/packages/mpt/package.py b/var/spack/repos/builtin/packages/mpt/package.py index e9a6c6f18c7e60..1a45de40a09513 100644 --- a/var/spack/repos/builtin/packages/mpt/package.py +++ b/var/spack/repos/builtin/packages/mpt/package.py @@ -50,14 +50,7 @@ def setup_run_environment(self, env): env.set("MPIF90", self.prefix.bin.mpif90) def setup_dependent_package(self, module, dependent_spec): - if "platform=cray" in self.spec: - 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 - 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 3fcae8fc5be9a9..b3b3e972032f74 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 @@ def cmake_args(self): 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 ee3c846408c931..f658222ac35a14 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 c73484c0f6f111..ada2c70ad9be50 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 46dfbe6eef04b7..05a94892def7df 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 16be03143c6de0..a27b7bfa057486 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 a5a2b1183188c7..38e8b7b6c0b81b 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 05a7f30f34a3fb..40b5f7d5225049 100644 --- a/var/spack/repos/builtin/packages/mruby/package.py +++ b/var/spack/repos/builtin/packages/mruby/package.py @@ -18,6 +18,7 @@ class Mruby(Package): 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") @@ -25,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 aae65bc5e9ebf4..6f533395bab020 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 b297eb7d1f3a65..223e639108da1c 100644 --- a/var/spack/repos/builtin/packages/msgpack-c/package.py +++ b/var/spack/repos/builtin/packages/msgpack-c/package.py @@ -16,9 +16,18 @@ 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): diff --git a/var/spack/repos/builtin/packages/mshadow/package.py b/var/spack/repos/builtin/packages/mshadow/package.py index 652c454f5d7d6a..fdb61f72d8af40 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 738e2e05508729..9b3dc8a7881a80 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 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 00000000000000..d0c4d44a6d245a --- /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 5cc0be5f178b97..47af70a42f7f2b 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/mt-metis/package.py b/var/spack/repos/builtin/packages/mt-metis/package.py index 609c9634cc5cc5..acd534a79e1bb3 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 d92122211b6f96..3ea59dd9831da1 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 44724042fff140..14868e203c0cd8 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 38ce762525b305..497e2f841bf9fb 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 22b835323719c8..18ceee7aee1f52 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 a1e8f1b538cded..52b4da1feffc94 100644 --- a/var/spack/repos/builtin/packages/mummer/package.py +++ b/var/spack/repos/builtin/packages/mummer/package.py @@ -9,13 +9,16 @@ 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 122f4229dc42ac..98071ae52b5277 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 c048ce55eb9f39..d6a4434852410c 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -13,11 +13,13 @@ 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( diff --git a/var/spack/repos/builtin/packages/munge/package.py b/var/spack/repos/builtin/packages/munge/package.py index a2dd177475f7ee..56584f7e3100fa 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 3364f50a33da4f..6190b6280f6712 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 a34b2ad55bb5e9..5d111cbc8bf8c1 100644 --- a/var/spack/repos/builtin/packages/muparserx/package.py +++ b/var/spack/repos/builtin/packages/muparserx/package.py @@ -18,3 +18,5 @@ class Muparserx(CMakePackage): 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 40460650b3f52c..caabc6ac748def 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 799bf1067468e7..87a140ad555853 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 e5f7928c988391..796f56168ede8a 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 8c7ce2e50efdec..cc0cee2be4b6bf 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 64612d6b45717d..aff44c3b94e505 100644 --- a/var/spack/repos/builtin/packages/musl/package.py +++ b/var/spack/repos/builtin/packages/musl/package.py @@ -47,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": diff --git a/var/spack/repos/builtin/packages/must/package.py b/var/spack/repos/builtin/packages/must/package.py index 5597157134e4c6..388edc7a6f2fa3 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 13ebbd04f35bda..76c1c4f988c987 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 0a7a01262edcd0..449c7011630b70 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 bdb66c763d6b7e..55aa19f3e2bfe2 100644 --- a/var/spack/repos/builtin/packages/mvapich/package.py +++ b/var/spack/repos/builtin/packages/mvapich/package.py @@ -29,6 +29,10 @@ class Mvapich(AutotoolsPackage): # Prefer the latest stable release 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 @@ -223,33 +232,16 @@ def setup_dependent_build_environment(self, env, dependent_spec): 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") and 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) - 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)), @@ -278,6 +270,8 @@ def configure_args(self): 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/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 9ab54c3eaa3eee..23129c3ec0c4da 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -39,6 +39,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:") @@ -384,33 +388,16 @@ def setup_dependent_build_environment(self, env, dependent_spec): 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") and 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) - 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") and spack_cc is not None: - 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/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py index 7ae66fbd23c749..40a892419e086a 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 c8808558a4d3d2..690b3803aa3a9e 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 * @@ -23,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", @@ -123,5 +127,4 @@ def cmake_args(self): 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 d0e4d1f218b5c1..874447d3ea3281 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 73f75c6b294d09..f687b980072646 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", diff --git a/var/spack/repos/builtin/packages/mysqlpp/package.py b/var/spack/repos/builtin/packages/mysqlpp/package.py index cec4a6d4dc6076..d34501bbf690b4 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 2a41a52c20422f..8d27028eda3022 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,16 +60,15 @@ 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): @@ -92,46 +94,62 @@ def install(self, spec, prefix): 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/package.py b/var/spack/repos/builtin/packages/nag/package.py index ab3adc912698b6..2fc265268a5147 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -13,7 +13,13 @@ class Nag(Package, CompilerPackage): homepage = "https://www.nag.com/nagware/np.asp" maintainers("skosukhin") - version("7.2.7200", sha256="3c2179e073d6cf2aadaeaf9a6a5f3b7f1fdcfb85b99c6fb593445b28ddd44880") + 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", @@ -30,6 +36,8 @@ class Nag(Package, CompilerPackage): deprecated=True, ) + depends_on("fortran", type="build") # generated + # Licensing license_required = True license_comment = "!" diff --git a/var/spack/repos/builtin/packages/nalu-wind/package.py b/var/spack/repos/builtin/packages/nalu-wind/package.py index ba0d96e5640b9d..3ebf50b3af02d5 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 * @@ -20,13 +18,15 @@ class NaluWind(CMakePackage, CudaPackage, ROCmPackage): 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("2.0.0", tag="v2.0.0") + 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( @@ -44,7 +44,7 @@ class NaluWind(CMakePackage, CudaPackage, ROCmPackage): 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") @@ -53,40 +53,40 @@ class NaluWind(CMakePackage, CudaPackage, ROCmPackage): 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") - 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", + variant( + "tests", default=False, description="Enable regression tests and clone the mesh submodule" ) - conflicts("+cuda", when="+rocm") - conflicts("+rocm", when="+cuda") + + 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@13.4.1+exodus+zoltan+stk", when="@=2.0.0") + 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~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), @@ -98,9 +98,7 @@ class NaluWind(CMakePackage, CudaPackage, ROCmPackage): ) for _arch in ROCmPackage.amdgpu_targets: depends_on( - "trilinos@13.4.0.2022.10.27: " - "~shared+exodus+tpetra+zoltan+stk~superlu-dist~superlu" - "+hdf5+shards~hypre+gtest+rocm amdgpu_target={0}".format(_arch), + "trilinos@13.4: ~shared+rocm+rocm_rdc amdgpu_target={0}".format(_arch), when="+rocm amdgpu_target={0}".format(_arch), ) depends_on( @@ -108,44 +106,59 @@ class NaluWind(CMakePackage, CudaPackage, ROCmPackage): when="+hypre+rocm amdgpu_target={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") - supported_cxxstd = ["17"] - variant( - "cxxstd", default="17", values=supported_cxxstd, multi=False, description="cxx standard" + conflicts( + "~hypre~trilinos-solvers", + msg="nalu-wind: Must enable at least one of the linear-solvers: hypre or trilinos-solvers", ) - for std in supported_cxxstd: - depends_on("trilinos cxxstd=%s" % std, when="cxxstd=%s" % std) - - def setup_build_environment(self, env): - if "~stk_simd" in self.spec: - env.append_flags("CXXFLAGS", "-DUSE_STK_SIMD_NONE") - if "+cuda" in self.spec: + 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 "+rocm" in self.spec: + 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("CMAKE_CXX_STANDARD", "cxxstd"), self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("ENABLE_OPENFAST", "openfast"), self.define_from_variant("ENABLE_TIOGA", "tioga"), @@ -154,25 +167,27 @@ def cmake_args(self): 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"), ] - 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)) - if "+tioga" in spec: + if spec.satisfies("+tioga"): args.append(self.define("TIOGA_DIR", spec["tioga"].prefix)) - if "+hypre" in spec: + if spec.satisfies("+hypre"): args.append(self.define("HYPRE_DIR", spec["hypre"].prefix)) - if "+catalyst" in spec: + if spec.satisfies("+catalyst"): args.append( self.define( "PARAVIEW_CATALYST_INSTALL_PATH", spec["trilinos-catalyst-ioss-adapter"].prefix ) ) - 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)) @@ -184,10 +199,10 @@ def cmake_args(self): ] ) - if "+umpire" in spec: + if spec.satisfies("+umpire"): args.append(self.define("UMPIRE_DIR", spec["umpire"].prefix)) - if "+rocm" in spec: + 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 @@ -200,6 +215,6 @@ def cmake_args(self): @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 31e6b2989a787e..6d022f2b25a5d5 100644 --- a/var/spack/repos/builtin/packages/nalu/package.py +++ b/var/spack/repos/builtin/packages/nalu/package.py @@ -21,6 +21,9 @@ class Nalu(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/namd/package.py b/var/spack/repos/builtin/packages/namd/package.py index 4bb91a8772f7a5..47fcb3b03cc74c 100644 --- a/var/spack/repos/builtin/packages/namd/package.py +++ b/var/spack/repos/builtin/packages/namd/package.py @@ -9,10 +9,11 @@ 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.""" @@ -25,13 +26,33 @@ class Namd(MakefilePackage, CudaPackage): maintainers("jcphill") version("master", branch="master") - version("3.0b6", sha256="8b5fb1dc8d5b5666c6a45d20ee7e8c9d1f5c186578e2cf148b68ba421d43b850") - 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", @@ -55,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 @@ -83,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 @@ -134,7 +176,7 @@ def _edit_arch_generic(self, spec, prefix): # this options are take from the default provided # configuration files # https://github.com/UIUC-PPL/charm/pull/2778 - archopt = spec.architecture.target.optimization_flags(spec.compiler) + archopt = optimization_flags(self.compiler, spec.target) if self.spec.satisfies("^charmpp@:6.10.1"): optims_opts = { @@ -274,6 +316,17 @@ def edit(self, spec, prefix): 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) diff --git a/var/spack/repos/builtin/packages/nano/package.py b/var/spack/repos/builtin/packages/nano/package.py index 3fd46110cb0f8c..1f0767e21736ac 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 9a6daec988a145..a307c71c6d80e4 100644 --- a/var/spack/repos/builtin/packages/nanoflann/package.py +++ b/var/spack/repos/builtin/packages/nanoflann/package.py @@ -14,10 +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 ed2a74c7753f9c..895e0d4d71cb5c 100644 --- a/var/spack/repos/builtin/packages/nanomsg/package.py +++ b/var/spack/repos/builtin/packages/nanomsg/package.py @@ -19,3 +19,5 @@ class Nanomsg(CMakePackage): 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 83c6daa425a125..0f8c0ff5871b58 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 d3f2fad668d026..c3d64e47576bd3 100644 --- a/var/spack/repos/builtin/packages/nasm/package.py +++ b/var/spack/repos/builtin/packages/nasm/package.py @@ -22,11 +22,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 +86,8 @@ def install(self, pkg, spec, prefix): 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 056eff96a1fb30..fd9371bcb3e922 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 00000000000000..528d7d911fb607 --- /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 0f748b9c9e6f70..8c2ad6041a476e 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 1fb7379af0a128..15c3c23cfb8a64 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 228c5fc6f60eb7..4700e5e4129910 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 2576cc2cafbf3e..c058ea4e53e3c2 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 88b213c72a474d..32257c5c2e0ccd 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 ab69fb4b4ba783..12601c61f4509e 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 4ec1d9ffdc3184..0bd21040134ce6 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 4517124f661a63..d70ee8180da804 100644 --- a/var/spack/repos/builtin/packages/nccl/package.py +++ b/var/spack/repos/builtin/packages/nccl/package.py @@ -17,6 +17,8 @@ class Nccl(MakefilePackage, CudaPackage): maintainers("adamjstewart") libraries = ["libnccl.so"] + 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") @@ -51,6 +53,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 7204eaff96eb82..4e6d234ecb9f7f 100644 --- a/var/spack/repos/builtin/packages/nccmp/package.py +++ b/var/spack/repos/builtin/packages/nccmp/package.py @@ -9,7 +9,7 @@ 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,8 @@ class Nccmp(CMakePackage): version("1.8.9.0", sha256="da5d2b4dcd52aec96e7d96ba4d0e97efebbd40fe9e640535e5ee3d5cd082ae50") version("1.8.2.0", sha256="7f5dad4e8670568a71f79d2bcebb08d95b875506d3d5faefafe1a8b3afa14f18") + depends_on("c", type="build") # generated + 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 9acbaa9802968f..1b57d8ef954542 100644 --- a/var/spack/repos/builtin/packages/ncdu/package.py +++ b/var/spack/repos/builtin/packages/ncdu/package.py @@ -33,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 9e5fa9fc869e55..d710a81923fb6b 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") diff --git a/var/spack/repos/builtin/packages/ncl/package.py b/var/spack/repos/builtin/packages/ncl/package.py index 6498dae1a25aa5..e3949f4d335d19 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: @@ -136,18 +139,26 @@ def patch(self): # 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): @@ -398,16 +409,3 @@ def delete_files(*filenames): os.remove(filename) except OSError as e: raise InstallError("Failed to delete file %s: %s" % (e.filename, e.strerror)) - - @when("+grib") - def patch(self): - # 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", - ) diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py index 83e23c1b3a78d0..25280e3a3dcde2 100644 --- a/var/spack/repos/builtin/packages/nco/package.py +++ b/var/spack/repos/builtin/packages/nco/package.py @@ -10,7 +10,7 @@ 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") @@ -41,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") diff --git a/var/spack/repos/builtin/packages/ncompress/package.py b/var/spack/repos/builtin/packages/ncompress/package.py index 56b61a98b4ede8..5dbcbdddedd2ca 100644 --- a/var/spack/repos/builtin/packages/ncompress/package.py +++ b/var/spack/repos/builtin/packages/ncompress/package.py @@ -18,5 +18,7 @@ class Ncompress(MakefilePackage): 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", f"PREFIX={prefix}") diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py index 4baa2652e1f37f..6f3b424ae36d04 100644 --- a/var/spack/repos/builtin/packages/ncurses/package.py +++ b/var/spack/repos/builtin/packages/ncurses/package.py @@ -32,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", diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py index 07576d45522ec8..62db3ad64716ba 100644 --- a/var/spack/repos/builtin/packages/ncview/package.py +++ b/var/spack/repos/builtin/packages/ncview/package.py @@ -19,6 +19,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 index aa56e4e342ebcd..c44bd4b14d85b7 100644 --- a/var/spack/repos/builtin/packages/ncvis/package.py +++ b/var/spack/repos/builtin/packages/ncvis/package.py @@ -20,6 +20,8 @@ class Ncvis(CMakePackage): "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") diff --git a/var/spack/repos/builtin/packages/ndiff/package.py b/var/spack/repos/builtin/packages/ndiff/package.py index 41b7dbd4a565e8..1aa83a51b2387d 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 867cb373dcfd04..91dead20db1011 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 00000000000000..722eea809eb37d --- /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 00000000000000..77023f687e856e --- /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 a898593b6a1a42..89fb15fe2a56d9 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/package.py b/var/spack/repos/builtin/packages/neic-finitefault/package.py index a27283e371740e..93607c6220a8c4 100644 --- a/var/spack/repos/builtin/packages/neic-finitefault/package.py +++ b/var/spack/repos/builtin/packages/neic-finitefault/package.py @@ -25,6 +25,9 @@ class NeicFinitefault(PythonPackage): 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", diff --git a/var/spack/repos/builtin/packages/nek5000/package.py b/var/spack/repos/builtin/packages/nek5000/package.py index 2936177d7246e4..5221d0cb234c61 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 23a494119d2c62..e6d36687cee2d7 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 76fae8fd6cd5ad..51b8cc0b525ebe 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") diff --git a/var/spack/repos/builtin/packages/neko/package.py b/var/spack/repos/builtin/packages/neko/package.py index 3eab17ecabc564..7b83d6b83dc350 100644 --- a/var/spack/repos/builtin/packages/neko/package.py +++ b/var/spack/repos/builtin/packages/neko/package.py @@ -16,6 +16,7 @@ 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.8.0", sha256="09d0b253c8abda9f384bf8f03b17b50d774cb0a1f7b72744a8e863acac516a51") version("0.7.2", sha256="5dd17fbae83d0b26dc46fafce4e5444be679cdce9493cef4ff7d504e2f854254") version("0.7.1", sha256="c935c3d93b0975db46448045f97aced6ac2cab31a2b8803047f8086f98dcb981") version("0.7.0", sha256="fe871e0a79f388073e0b3dc191d1c0d5da3a53883f5b1951d88b9423fc79a53c") @@ -29,9 +30,13 @@ 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") # Requires cuda or rocm enabled MPI variant( @@ -54,6 +59,7 @@ class Neko(AutotoolsPackage, CudaPackage, ROCmPackage): 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") def configure_args(self): args = [] @@ -63,6 +69,7 @@ def configure_args(self): 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) diff --git a/var/spack/repos/builtin/packages/nekrs/package.py b/var/spack/repos/builtin/packages/nekrs/package.py index d3c9c41b74650f..3376682772fee9 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 @@ def setup_build_environment(self, env): 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 @@ def install(self, spec, prefix): 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 b00a994efafe03..482a66a31ceae1 100644 --- a/var/spack/repos/builtin/packages/nektar/package.py +++ b/var/spack/repos/builtin/packages/nektar/package.py @@ -20,6 +20,9 @@ class Nektar(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/nektools/package.py b/var/spack/repos/builtin/packages/nektools/package.py index 125b3838f35a3e..90e7951449ad3c 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 dbd52cab92caac..0677376d154ebc 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") diff --git a/var/spack/repos/builtin/packages/nemsiogfs/package.py b/var/spack/repos/builtin/packages/nemsiogfs/package.py index 4d2e538ba430bc..e38f5a0adf2a33 100644 --- a/var/spack/repos/builtin/packages/nemsiogfs/package.py +++ b/var/spack/repos/builtin/packages/nemsiogfs/package.py @@ -21,6 +21,8 @@ class Nemsiogfs(CMakePackage): version("develop", branch="develop") version("2.5.3", sha256="bf84206b08c8779787bef33e4aba18404df05f8b2fdd20fc40b3af608ae4b9af") + depends_on("fortran", type="build") + depends_on("nemsio") def check(self): diff --git a/var/spack/repos/builtin/packages/neo4j/package.py b/var/spack/repos/builtin/packages/neo4j/package.py index 68852cbeb6022f..cab92756125adb 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 00000000000000..f0e2f2091b7648 --- /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 7924b894fab006..c21e2def03fec2 100644 --- a/var/spack/repos/builtin/packages/neovim/package.py +++ b/var/spack/repos/builtin/packages/neovim/package.py @@ -19,6 +19,8 @@ class Neovim(CMakePackage): version("master", branch="master") version("stable", tag="stable", commit="d772f697a281ce9c58bf933997b87c7f27428a60") + 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 +79,8 @@ class Neovim(CMakePackage): deprecated=True, ) + depends_on("c", type="build") # generated + variant( "no_luajit", default=False, @@ -135,6 +139,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 a664749bc67fa6..416930ac7b3242 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 d3573406542d33..9c427f19c3818c 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/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py index 43bf1ccffefcd9..986fbfe7492ddf 100644 --- a/var/spack/repos/builtin/packages/netcdf-c/package.py +++ b/var/spack/repos/builtin/packages/netcdf-c/package.py @@ -53,6 +53,9 @@ 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: @@ -63,7 +66,7 @@ class NetcdfC(CMakePackage, AutotoolsPackage): # 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", when="platform=windows") + 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 = [] @@ -165,7 +168,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 @@ -251,7 +254,7 @@ class NetcdfC(CMakePackage, AutotoolsPackage): 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 @@ -356,7 +359,7 @@ def cmake_args(self): @run_after("install") def patch_hdf5_pkgconfigcmake(self): """ - Incorrect hdf5 library names are put in the package config and config.cmake files + 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 """ @@ -364,11 +367,10 @@ def patch_hdf5_pkgconfigcmake(self): return pkgconfig_file = find(self.prefix, "netcdf.pc", recursive=True) - cmakeconfig_file = find(self.prefix, "netCDFTargets.cmake", recursive=True) ncconfig_file = find(self.prefix, "nc-config", recursive=True) settingsconfig_file = find(self.prefix, "libnetcdf.settings", recursive=True) - files = pkgconfig_file + cmakeconfig_file + ncconfig_file + settingsconfig_file + 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) diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py index 876e85b30be43e..4193c5894983f8 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py @@ -19,6 +19,8 @@ class NetcdfCxx(AutotoolsPackage): version("4.2", sha256="95ed6ab49a0ee001255eac4e44aacb5ca4ea96ba850c08337a3e4c9a0872ccd1") + depends_on("cxx", type="build") # generated + depends_on("netcdf-c") variant("netcdf4", default=True, description="Compile with netCDF4 support") diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py index b970ec658be2a1..46a5db3b97fd0d 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") @@ -160,7 +163,7 @@ def cray_module_filenames(self): # 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 52a03c2b63a6aa..69df8425714c14 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 9f4943759e4193..e9dda6be8cff2f 100644 --- a/var/spack/repos/builtin/packages/netdata/package.py +++ b/var/spack/repos/builtin/packages/netdata/package.py @@ -20,6 +20,10 @@ class Netdata(AutotoolsPackage): 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 692ce5af1b5ceb..108abb8dd9c33e 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 4430a2530906ed..75b1fa6ee83937 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 beb565e4f123e2..8b2e373dbef123 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 2b6eb12fa19a61..20d9a0664f5c27 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 @@ def patch(self): 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 @@ def lapack_libs(self): 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 df3792b93bd70f..245dcfaf0c7a70 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -41,11 +41,14 @@ 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("%gcc@14:"): + # https://bugzilla.redhat.com/show_bug.cgi?id=2178710 + flags.append("-std=gnu89") + elif name == "fflags": if self.spec.satisfies("%cce"): - iflags.append("-hnopattern") - return (iflags, None, None) + flags.append("-hnopattern") + return (flags, None, None) @property def libs(self): @@ -119,5 +122,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 787fe900241ca6..0b04a8f895e092 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 320a414e2dc72a..512a2251d44e2f 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 ce320812fccaab..aacf408c1a9485 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 a0262fab2870ab..df7f51d350e986 100644 --- a/var/spack/repos/builtin/packages/nettle/package.py +++ b/var/spack/repos/builtin/packages/nettle/package.py @@ -24,6 +24,9 @@ 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") diff --git a/var/spack/repos/builtin/packages/neuron/package.py b/var/spack/repos/builtin/packages/neuron/package.py index c6d33e70308a11..2cb16fdd03d00f 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 * @@ -37,6 +38,10 @@ class Neuron(CMakePackage): "7.8.2", tag="7.8.2", commit="09b151ecb2b3984335c265932dc6ba3e4fcb318e", submodules="True" ) + 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") @@ -145,7 +150,7 @@ def cmake_args(self): # 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 = self.spec.architecture.target.optimization_flags(self.spec.compiler) + compilation_flags = optimization_flags(self.compiler, self.spec.target) args.append(self.define("CMAKE_CXX_FLAGS", compilation_flags)) return args @@ -157,10 +162,7 @@ def filter_compilers(self): 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: diff --git a/var/spack/repos/builtin/packages/neve/package.py b/var/spack/repos/builtin/packages/neve/package.py index 916ad5091d4ba2..7e095a300cb7bc 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 b92803eba28996..5ef214d549387f 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 fca9afd2ee70d5..b9c242e1568538 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 f0800126c56dd0..316e4da17cfe10 100644 --- a/var/spack/repos/builtin/packages/nextflow/package.py +++ b/var/spack/repos/builtin/packages/nextflow/package.py @@ -14,6 +14,21 @@ 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", @@ -177,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/nfft/package.py b/var/spack/repos/builtin/packages/nfft/package.py index 3d86f0710b123e..8ae71152d45011 100644 --- a/var/spack/repos/builtin/packages/nfft/package.py +++ b/var/spack/repos/builtin/packages/nfft/package.py @@ -27,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 f5e0da3e6a401a..caf3e5da077514 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 48c7d8c33d4fda..ddfb62dc720ec6 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 5ca28566174443..e1442944b4b7da 100644 --- a/var/spack/repos/builtin/packages/nghttp2/package.py +++ b/var/spack/repos/builtin/packages/nghttp2/package.py @@ -15,6 +15,11 @@ class Nghttp2(AutotoolsPackage): license("MIT") + 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,6 +29,9 @@ 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") @@ -43,4 +51,5 @@ def configure_args(self): "--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 55af399eb11eab..cdee6710cd40cf 100644 --- a/var/spack/repos/builtin/packages/nginx/package.py +++ b/var/spack/repos/builtin/packages/nginx/package.py @@ -25,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 4114d071b977e9..7e627acfa2fb5c 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 51e5197f6a721e..748fbb262c0a47 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 dafffd8f2292f3..46394c9aa5b8dd 100644 --- a/var/spack/repos/builtin/packages/ngspice/package.py +++ b/var/spack/repos/builtin/packages/ngspice/package.py @@ -10,7 +10,7 @@ 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 @@ -22,6 +22,7 @@ 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") @@ -36,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", @@ -172,3 +176,7 @@ def flag_handler(self, name, flags): 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 ef25505ae4ca7b..2018741df61eb5 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 a00495a2eed458..241ec9259e264e 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 * @@ -18,6 +17,7 @@ class Nim(Package): license("MIT") + version("2.0.4", sha256="71526bd07439dc8e378fa1a6eb407eda1298f1f3d4df4476dca0e3ca3cbe3f09") version("1.9.3", sha256="d8de7515db767f853d9b44730f88ee113bfe9c38dcccd5afabc773e2e13bf87c") version("1.4.4", sha256="6d73729def143f72fc2491ca937a9cab86d2a8243bd845a5d1403169ad20660e") version("1.4.2", sha256="03a47583777dd81380a3407aa6a788c9aa8a67df4821025770c9ac4186291161") @@ -38,22 +38,27 @@ 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") + install_sh_path = join_path(self.stage.source_path, "install.sh") filter_file("1/nim", "1", install_sh_path) def install(self, spec, prefix): bash = which("bash") bash("./build.sh") - nim = Executable(os.path.join("bin", "nim")) + nim = Executable(join_path("bin", "nim")) nim("c", "koch") koch = Executable("./koch") koch("boot", "-d:release") koch("tools") + koch("nimble") bash("./install.sh", prefix) + install(join_path("bin", "nimble"), join_path(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 280173bfca82c0..0b24858ef86886 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 = [ diff --git a/var/spack/repos/builtin/packages/ninja-fortran/package.py b/var/spack/repos/builtin/packages/ninja-fortran/package.py index 02daabf9dab778..071a64b7b6b1da 100644 --- a/var/spack/repos/builtin/packages/ninja-fortran/package.py +++ b/var/spack/repos/builtin/packages/ninja-fortran/package.py @@ -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"] diff --git a/var/spack/repos/builtin/packages/ninja-phylogeny/package.py b/var/spack/repos/builtin/packages/ninja-phylogeny/package.py index f6251cf54e82a3..f0c325ebae0e33 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 5d9e7af81d34ba..64e9eb36030f2d 100644 --- a/var/spack/repos/builtin/packages/ninja/package.py +++ b/var/spack/repos/builtin/packages/ninja/package.py @@ -26,6 +26,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 +38,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 +62,7 @@ def configure(self, spec, prefix): @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 d9f48c7dc04a3c..25d1dca28a3a27 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 694fbbfc5c1fed..5f854969007bf1 100644 --- a/var/spack/repos/builtin/packages/nlcglib/package.py +++ b/var/spack/repos/builtin/packages/nlcglib/package.py @@ -18,11 +18,13 @@ class Nlcglib(CMakePackage, CudaPackage, ROCmPackage): 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 @@ def cmake_args(self): 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 166c5344b781dd..29f9946567fa83 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 @@ -22,6 +22,8 @@ class NlohmannJsonSchemaValidator(CMakePackage): 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 219e73c87a80ac..d0003219c60039 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" ) diff --git a/var/spack/repos/builtin/packages/nlopt/package.py b/var/spack/repos/builtin/packages/nlopt/package.py index b71450d78f4a98..fd9ed9b18f4877 100644 --- a/var/spack/repos/builtin/packages/nlopt/package.py +++ b/var/spack/repos/builtin/packages/nlopt/package.py @@ -29,6 +29,10 @@ class Nlopt(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/nmap/package.py b/var/spack/repos/builtin/packages/nmap/package.py index 47ef9de535c939..205ae5c56e4cb4 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 d66c061de2b60f..29e262e7153957 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 36110c6f4ffe42..88c7398f61a475 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 ca57d8aa199a00..974177ffcd3e67 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 00000000000000..9629a6bb0c5342 --- /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 header file. */ +-#define HAVE_SYS_RANDOM_H 1 ++#undef HAVE_SYS_RANDOM_H + + /* Define to 1 if you have the 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 744304f4660afd..8850255deba572 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 @@ def configure_args(self): # # /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 index 92319d0f62e9b9..0686d1b74e4c0c 100644 --- a/var/spack/repos/builtin/packages/nopayloadclient/package.py +++ b/var/spack/repos/builtin/packages/nopayloadclient/package.py @@ -20,6 +20,9 @@ class Nopayloadclient(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/notmuch/package.py b/var/spack/repos/builtin/packages/notmuch/package.py index 744dbd029b2592..4b500fcb744615 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 e14f99bbabef62..62d5b86d0ec330 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 @@ -119,6 +122,10 @@ def edit(self, spec, prefix): 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 @@ def edit(self, spec, prefix): "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 decade229c4984..d44566a3ab4d82 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 24bb3e68291806..317d1adf456f92 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 6a8aef33b1e06e..a6a8d6fc9114e2 100644 --- a/var/spack/repos/builtin/packages/ns-3-dev/package.py +++ b/var/spack/repos/builtin/packages/ns-3-dev/package.py @@ -18,6 +18,9 @@ class Ns3Dev(CMakePackage): version("3.40", sha256="96526e7ae6cb746d02af0cad04f63daff926dad5d30a6fe0d3c7943989ba4e59") version("3.37", sha256="d72defeeddbba14397cd4403565992d98cd7b7d9c680c22fee56022706878720") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + variant("boost", default=True, description="Compile with Boost libraries") depends_on("gsl") diff --git a/var/spack/repos/builtin/packages/nsimd/package.py b/var/spack/repos/builtin/packages/nsimd/package.py index d7981d1ff46783..fc4f02baeeb888 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 f18f4c778d7d56..a2fa85d11ee67c 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 3f10701b42e19f..189140250d6629 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 b35f256d49a009..6922fbe3810f79 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 2096c3334b42be..f7cf1c35f76da2 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 b6b736a6f77402..69b22e948bead9 100644 --- a/var/spack/repos/builtin/packages/ntpoly/package.py +++ b/var/spack/repos/builtin/packages/ntpoly/package.py @@ -21,15 +21,28 @@ 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 00000000000000..995a42858cdf0b --- /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 00000000000000..b296e49e39067b --- /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 1d50ca656e9191..cde391471cdafb 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") diff --git a/var/spack/repos/builtin/packages/numamma/package.py b/var/spack/repos/builtin/packages/numamma/package.py index 01bfa7fe4869d1..a560b619d7b619 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 85ebf348ca324f..6e5623ae3400ef 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 bd7a2cd9e1a8ad..cb0282eca6a2c9 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 2fee673edbd14f..6d01acc677a9d2 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 42764b62bcb53c..4d00edcbb31950 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") diff --git a/var/spack/repos/builtin/packages/nvbandwidth/package.py b/var/spack/repos/builtin/packages/nvbandwidth/package.py index 64f4fa5eee7291..677574ba22ea5d 100644 --- a/var/spack/repos/builtin/packages/nvbandwidth/package.py +++ b/var/spack/repos/builtin/packages/nvbandwidth/package.py @@ -42,6 +42,8 @@ class Nvbandwidth(CMakePackage, CudaPackage): sha256="ce164f91e35d1b28ebb1f83b22f38199e430d18ebfb8e21fa8c5e53c38d82daf", ) + depends_on("cxx", type="build") # generated + depends_on("boost@1.66.0 +program_options") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/nvcomp/package.py b/var/spack/repos/builtin/packages/nvcomp/package.py index 6dccb895bb1a06..e8a05563ebd2ae 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 90cf100ab34a39..a8928e9dd3771c 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 index bdf1c6b596c4dd..fc8ccfafc84553 100644 --- a/var/spack/repos/builtin/packages/nvhpc/detection_test.yaml +++ b/var/spack/repos/builtin/packages/nvhpc/detection_test.yaml @@ -24,7 +24,7 @@ paths: extra_attributes: compilers: c: ".*/bin/nvc" - cxx: ".*/bin/nvc++" + cxx: ".*/bin/nvc\\+\\+" fortran: ".*/bin/nvfortran" - layout: - executables: @@ -51,7 +51,7 @@ paths: extra_attributes: compilers: c: ".*/bin/nvc" - cxx: ".*/bin/nvc++" + cxx: ".*/bin/nvc\\+\\+" fortran: ".*/bin/nvfortran" - layout: - executables: @@ -78,5 +78,5 @@ paths: extra_attributes: compilers: c: ".*/bin/nvc" - cxx: ".*/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 17a9eecb7da386..ce918e96965c7c 100644 --- a/var/spack/repos/builtin/packages/nvhpc/package.py +++ b/var/spack/repos/builtin/packages/nvhpc/package.py @@ -21,6 +21,36 @@ # - 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.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", @@ -386,7 +416,7 @@ class Nvhpc(Package, CompilerPackage): homepage = "https://developer.nvidia.com/hpc-sdk" maintainers("samcmill") - tags = ["e4s"] + tags = ["e4s", "compiler"] skip_version_audit = ["platform=darwin", "platform=windows"] @@ -398,6 +428,10 @@ class Nvhpc(Package, CompilerPackage): 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", diff --git a/var/spack/repos/builtin/packages/nvpl-blas/package.py b/var/spack/repos/builtin/packages/nvpl-blas/package.py index 211717d2bb414f..0bd0a769df788e 100644 --- a/var/spack/repos/builtin/packages/nvpl-blas/package.py +++ b/var/spack/repos/builtin/packages/nvpl-blas/package.py @@ -22,6 +22,8 @@ class NvplBlas(Package): license("UNKNOWN") + version("0.3.0", sha256="b51cb199a440c1e8673d3d845d395950c9a9020d4e83af2655eb96c23c6ec90d") + version("0.2.0.1", sha256="ba29f6a9d3831b6ae5c9265b4d124c13b9b9e0faea025359b02b41ad230975c2") version("0.1.0", sha256="4ccc894593cbcbfaa1a4f3c54505982691971667acf191c9ab0f4252a37c8063") provides("blas") @@ -42,6 +44,10 @@ class NvplBlas(Package): 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) 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 00000000000000..b7a9964f60adf9 --- /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 index 20bc6d16d7867a..e76e09863621b8 100644 --- a/var/spack/repos/builtin/packages/nvpl-lapack/package.py +++ b/var/spack/repos/builtin/packages/nvpl-lapack/package.py @@ -22,7 +22,9 @@ class NvplLapack(Package): license("UNKNOWN") - version("0.2.0", sha256="7054f775b18916ee662c94ad7682ace53debbe8ee36fa926000fe412961edb0b") + version("0.2.3.1", sha256="25927df133c5486fd71d5976c93917c96e62275a78dffc354bcaf1b022f56f8e") + version("0.2.2.1", sha256="cdfbf69517a044e99e3e6231c8b2f4e845fd0de57775ccad6b4b0b4fe7e91e84") + version("0.2.0.1", sha256="7054f775b18916ee662c94ad7682ace53debbe8ee36fa926000fe412961edb0b") provides("lapack") @@ -50,6 +52,10 @@ class NvplLapack(Package): 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) diff --git a/var/spack/repos/builtin/packages/nvptx-tools/package.py b/var/spack/repos/builtin/packages/nvptx-tools/package.py index 7305a403476178..e442fbc17ef2ee 100644 --- a/var/spack/repos/builtin/packages/nvptx-tools/package.py +++ b/var/spack/repos/builtin/packages/nvptx-tools/package.py @@ -19,6 +19,9 @@ class NvptxTools(AutotoolsPackage): 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 7bb13dd912a3ff..5d93c01afc7867 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 eff8c65b36cb4f..c6f6af43817774 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 @@ def install(self, spec, prefix): 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/dft-d3_url.patch b/var/spack/repos/builtin/packages/nwchem/dft-d3_url.patch new file mode 100644 index 00000000000000..66d8508823e5df --- /dev/null +++ b/var/spack/repos/builtin/packages/nwchem/dft-d3_url.patch @@ -0,0 +1,13 @@ +--- a/src/nwpw/nwpwlib/nwpwxc/build_dftd3a.sh ++++ b/src/nwpw/nwpwlib/nwpwxc/build_dftd3a.sh +@@ -42,8 +42,8 @@ + check_patch + rm -f dftd3.f nwpwxc_vdw3a.F + export PATH=`pwd`:$PATH +-#URL1="https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/" +-URL1="https://www.chemiebn.uni-bonn.de/pctc/mulliken-center/software/dft-d3/" ++URL1="https://www.chemie.uni-bonn.de/grimme/de/software/dft-d3/" ++#URL1="https://www.chemiebn.uni-bonn.de/pctc/mulliken-center/software/dft-d3/" + URL2="https://web.archive.org/web/20210527062154if_/https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/" + declare -a urls=("$URL1" "$URL1" "$URL1" "$URL2" "$URL2") + TGZ=dftd3.tgz diff --git a/var/spack/repos/builtin/packages/nwchem/package.py b/var/spack/repos/builtin/packages/nwchem/package.py index 72465aa52dbaf7..a3882f55f12bbe 100644 --- a/var/spack/repos/builtin/packages/nwchem/package.py +++ b/var/spack/repos/builtin/packages/nwchem/package.py @@ -19,6 +19,12 @@ class Nwchem(Package): 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", @@ -35,7 +41,12 @@ 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", ) + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + depends_on("fortran", type="build") # generated + variant("openmp", default=False, description="Enables OpenMP support") + variant("f90allocatable", default=False, description="Use F90 allocatable instead of MA") variant( "armci", values=("mpi-ts", "mpi-pr", "armcimpi", "mpi3", "openib", "ofi"), @@ -47,6 +58,7 @@ class Nwchem(Package): 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( @@ -67,11 +79,16 @@ 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:7.2.2 +fftw3") + patch("fftw_splans.patch", when="@7.2.0:7.2.3 +fftw3") + # This patch is for including a working link for dft-d3 download as existing link + # https://www.chemiebn.uni-bonn.de/pctc/mulliken-center/software/dft-d3//dftd3.tgz is not active + # Same is mentioned in https://metadata.ftp-master.debian.org/changelogs/main/n/nwchem/unstable_changelog + patch("dft-d3_url.patch", when="@7.2.0:7.2.2") 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") @@ -141,9 +158,18 @@ def install(self, spec, prefix): 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("+f90allocatable"): + args.extend(["USE_F90_ALLOCATABLE=1"]) + if self.spec.variants["armci"].value == "armcimpi": armcimpi = spec["armci"] args.extend(["ARMCI_NETWORK=ARMCI"]) diff --git a/var/spack/repos/builtin/packages/nyancat/package.py b/var/spack/repos/builtin/packages/nyancat/package.py index 6aae2643442520..8eb8edaf34a2c6 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 175a5833cf2ca0..595853ef3b3948 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 bd56b8e3fac13b..941cbf3ca551ee 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 ecc72911ae5de4..48f1ed0eeb27ee 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,20 +15,36 @@ 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") @@ -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 1c0c86569bf85b..00000000000000 --- 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 - #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 5d0c5c62bdae1d..01d29d8bf7cb64 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 80f500c61bd4c3..42efeef4e25d6a 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 76dd8fd47a0fdd..fdf3bc69dba339 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 c278ea5751d219..2fa9c53596f71e 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 c8816c74075acd..9622c8f8874e1b 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 52857e761c91e5..9dab93a2a908c9 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 629d2a1baf2f0e..e3da8de047c2b2 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 ca82c960561b80..0884768d822f50 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 3ee5ff878e26e1..be6c23aba99ccd 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 d6c515475ba3b2..d3cb070b7c609d 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 @@ 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 0eb361062771c4..422664ef8deab0 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -51,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") @@ -72,6 +76,7 @@ class Octave(AutotoolsPackage, GNUMirrorPackage): 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") @@ -84,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") @@ -350,6 +357,8 @@ def configure_args(self): 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 4abe82b3042e1d..8c8e2dd5d0b4c6 100644 --- a/var/spack/repos/builtin/packages/octopus/package.py +++ b/var/spack/repos/builtin/packages/octopus/package.py @@ -44,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") @@ -316,54 +320,38 @@ def configure_args(self): @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() - - def test(self): - """Entry point for smoke tests run through `spack test run octopus`.""" - self.smoke_tests() + self.test_version() + self.test_example() + self.test_he() - 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", @@ -371,24 +359,27 @@ def smoke_tests(self): "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.", @@ -397,17 +388,10 @@ def smoke_tests(self): "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 a0638f869ede4e..6e4c6c8fc5759e 100644 --- a/var/spack/repos/builtin/packages/odc/package.py +++ b/var/spack/repos/builtin/packages/odc/package.py @@ -21,6 +21,10 @@ class Odc(CMakePackage): 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 0c4b9ea2ff3b07..c96761bcfc06b5 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 diff --git a/var/spack/repos/builtin/packages/of-catalyst/package.py b/var/spack/repos/builtin/packages/of-catalyst/package.py index d7a3821736a2da..7db9cb811a6f6a 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 6c47302e3aec38..ff7fd26827760d 100644 --- a/var/spack/repos/builtin/packages/of-precice/package.py +++ b/var/spack/repos/builtin/packages/of-precice/package.py @@ -30,6 +30,8 @@ class OfPrecice(Package): 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") diff --git a/var/spack/repos/builtin/packages/ollama/package.py b/var/spack/repos/builtin/packages/ollama/package.py index b0839efa65c565..7de54a4ce8a0d3 100644 --- a/var/spack/repos/builtin/packages/ollama/package.py +++ b/var/spack/repos/builtin/packages/ollama/package.py @@ -7,38 +7,44 @@ from spack.package import * -class Ollama(GoPackage): +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") + maintainers("teaguesterling", "brettviren") - # We're using commit IDs because the `go generate` process will fail for some - # dependencies that expect to be within a git repo. This is also an issue with - # cached downloads, but I don't know how to fix that yet - version("0.1.31", commit="dc011d16b9ff160c0be3829fc39a43054f0315d0", submodules=True) - # This is the last verified non-preview version as of 20240413 - version( - "0.1.30", - commit="756c2575535641f1b96d94b4214941b90f4c30c7", - submodules=True, - preferred=True, - ) + # 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.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", type="build") - depends_on("go", type="build") - depends_on("gcc", type="build") + depends_on("cmake@3.24:", type="build") + depends_on("go@1.4.0:", type="build") depends_on("git", type="build") - depends_on("ccache", 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", spec.variants["cuda_arch"].value) + @property def generate_args(self): """Arguments for ``go generate``.""" @@ -46,9 +52,5 @@ def generate_args(self): def generate(self, pkg, spec, prefix): """Runs ``go generate`` in the source directory""" - import inspect - - import llnl.util.filesystem as fs - - with fs.working_dir(self.build_directory): - inspect.getmodule(pkg).go("generate", *self.generate_args) + 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 7e4939d028adb8..a13957de5b9e07 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 96af69f7df1258..2edab104fd768c 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 aa94521f266a66..93c58e086c8632 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 25887e04910d5e..e4432f2e104dcb 100644 --- a/var/spack/repos/builtin/packages/omega-h/package.py +++ b/var/spack/repos/builtin/packages/omega-h/package.py @@ -19,6 +19,11 @@ class OmegaH(CMakePackage, CudaPackage): maintainers("cwsmith") tags = ["e4s"] version("main", branch="main") + version( + "scorec.10.8.5", + commit="62026fc305356abb5e02a9fce3fead9cf5077fbe", + git="https://github.com/SCOREC/omega_h.git", + ) version( "scorec.10.7.0", commit="0e5de8618c3370f702e08c1b1af476dbbc118892", @@ -59,6 +64,9 @@ 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") @@ -72,6 +80,12 @@ class OmegaH(CMakePackage, CudaPackage): when="@scorec.10.1.0:", msg="Thrust is broken in CUDA = 11.2.* see https://github.com/sandialabs/omega_h/issues/366", ) + conflicts( + "^cuda@:11.3", + when="@scorec.10.8.5:", + msg="see https://github.com/SCOREC/omega_h/issues/66", + ) + # the sandia repo has a fix for cuda > 11.2 support # see github.com/sandialabs/omega_h/pull/373 conflicts( @@ -158,23 +172,20 @@ def flag_handler(self, name, flags): 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") and not self.spec.satisfies("@:scorec"): + 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/package.py b/var/spack/repos/builtin/packages/omm-bundle/package.py index e16209c0c92cf4..f42ce9a7bb3334 100644 --- a/var/spack/repos/builtin/packages/omm-bundle/package.py +++ b/var/spack/repos/builtin/packages/omm-bundle/package.py @@ -19,6 +19,8 @@ class OmmBundle(MakefilePackage): 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") 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 00000000000000..c89b883f57765a --- /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 00000000000000..779dfa6763814a --- /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 +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 00000000000000..436ec037d0b2c9 --- /dev/null +++ b/var/spack/repos/builtin/packages/omniperf/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 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.1", sha256="c14cb73b9fe17a3cca31489a73e8ea49cb278093f8d64c433b1bac387445074a") + version("6.2.0", sha256="b2ad49324a07aef977833d62741509a5d799b92758db56a16b4ab5636b6e231e") + + 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 384f8ca2db4c92..3b558925aa7145 100644 --- a/var/spack/repos/builtin/packages/omnitrace/package.py +++ b/var/spack/repos/builtin/packages/omnitrace/package.py @@ -11,24 +11,61 @@ 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.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 +122,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"]: + 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 @@ -130,8 +182,19 @@ def cmake_args(self): 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 diff --git a/var/spack/repos/builtin/packages/ompss-2/package.py b/var/spack/repos/builtin/packages/ompss-2/package.py index 48ea331f9d4b2b..6ba60dd25bc172 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 67986430bb087e..428162c5890db1 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 5f67b63c6d73d5..dbb7113ff07900 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 120509dab362b8..97b67e065e3f8e 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,5 @@ class OneapiLevelZero(CMakePackage): version("1.3.7", sha256="e84c7f36316257eb46f74b41aef5c37fb593a8821497e45dfeda81aceba0abbc") version("1.3.6", sha256="c2b3bd6e4ee3cc874bdcc32bc8705bd217ffc46b194c77e27b23b8391c0c9704") version("1.2.3", sha256="69689429fcdaef74fa8395785aca65f5652e410bd6c56f47b2b64692c098892b") + + depends_on("cxx", type="build") # generated diff --git a/var/spack/repos/builtin/packages/onednn/package.py b/var/spack/repos/builtin/packages/onednn/package.py index a49c7df626f3a3..4d2d2ac2763bca 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" diff --git a/var/spack/repos/builtin/packages/oniguruma/package.py b/var/spack/repos/builtin/packages/oniguruma/package.py index 784e28b8b45037..a7afee51cb7307 100644 --- a/var/spack/repos/builtin/packages/oniguruma/package.py +++ b/var/spack/repos/builtin/packages/oniguruma/package.py @@ -19,6 +19,8 @@ class Oniguruma(AutotoolsPackage): 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 3cf5ba753fa0da..ec9602c14befbe 100644 --- a/var/spack/repos/builtin/packages/onnx/package.py +++ b/var/spack/repos/builtin/packages/onnx/package.py @@ -17,9 +17,11 @@ 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") @@ -60,6 +62,8 @@ 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") @@ -70,6 +74,9 @@ def patch(self): filter_file("CMAKE_CXX_STANDARD 11", "CMAKE_CXX_STANDARD 14", "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), + ] return args diff --git a/var/spack/repos/builtin/packages/oommf/package.py b/var/spack/repos/builtin/packages/oommf/package.py index fb181cba5ec88e..e339b417df7b2d 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 18df2a38ebc75d..53618f814aaace 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 795eeb7e69feb4..aff8c73e6e3a5e 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 d1b6bff3facc64..bae70b6d828e67 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 @@ def setup_build_environment(self, env): # 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 /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 ca08fa3ad856bc..5b000d5542d0e8 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 index baeb63c312bcf1..9aa5f14ec29f79 100644 --- a/var/spack/repos/builtin/packages/opdilib/package.py +++ b/var/spack/repos/builtin/packages/opdilib/package.py @@ -14,10 +14,13 @@ class Opdilib(Package): 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")) diff --git a/var/spack/repos/builtin/packages/open-iscsi/package.py b/var/spack/repos/builtin/packages/open-iscsi/package.py index fe0f354ab9ef64..f93ecfae800ae9 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 @@ def setup_build_environment(self, env): 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 38a97504193283..3f9f7d10a5eabf 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 a8f1beee6b04d9..01220d0c1b85dd 100644 --- a/var/spack/repos/builtin/packages/open3d/package.py +++ b/var/spack/repos/builtin/packages/open3d/package.py @@ -11,7 +11,7 @@ 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 @@ -116,11 +120,11 @@ def install(self, spec, prefix): @run_after("install") @on_package_attributes(run_tests=True) - def test(self): - if "+python" in self.spec: - self.run_test( - python.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 51d62c2c6ea0fe..6e835e03955223 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/package.py b/var/spack/repos/builtin/packages/openbabel/package.py index 1d028565aaf6c0..e4e140faa3f1b9 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)") 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 00000000000000..8c94a921a590b5 --- /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 5ffb00bccd8c4f..8310cc9d781a2f 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -26,6 +26,8 @@ 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") @@ -85,12 +87,6 @@ class Openblas(CMakePackage, MakefilePackage): default=False, description="Enable experimental support for up to 1024 CPUs/Cores and 128 numa nodes", ) - variant( - "noavx512", - default=False, - description="Disable AVX-512 with NO_AVX512=1 (internal compiler error with AVX512 " - + "when using Intel 2021/2022)", - ) variant("symbol_suffix", default="none", description="Set a symbol suffix") variant("locking", default=True, description="Build with thread safety") @@ -107,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:") @@ -227,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) @@ -237,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", @@ -257,17 +269,16 @@ class Openblas(CMakePackage, MakefilePackage): 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): @@ -536,7 +547,7 @@ def make_defs(self): if self.spec.satisfies("+bignuma"): make_defs.append("BIGNUMA=1") - if self.spec.satisfies("+noavx512"): + 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. @@ -566,17 +577,19 @@ def check_install(self): # 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) @@ -584,7 +597,12 @@ def check_install(self): 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"): diff --git a/var/spack/repos/builtin/packages/opencarp/package.py b/var/spack/repos/builtin/packages/opencarp/package.py index 3a299f75d14640..289364536f2090 100644 --- a/var/spack/repos/builtin/packages/opencarp/package.py +++ b/var/spack/repos/builtin/packages/opencarp/package.py @@ -19,12 +19,15 @@ class Opencarp(CMakePackage): maintainers("MarieHouillon") version( - "15.0", - commit="2271a3cccd7137f1e28c043c10adbd80480f1462", + "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 ) @@ -51,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") @@ -69,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 ["15.0", "13.0", "12.0", "11.0", "10.0", "9.0", "8.2", "8.1", "7.0"]: + 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 4c07bb5a7d1e84..7cd1ae20a50523 100644 --- a/var/spack/repos/builtin/packages/opencascade/package.py +++ b/var/spack/repos/builtin/packages/opencascade/package.py @@ -23,71 +23,32 @@ class Opencascade(CMakePackage): license("LGPL-2.1-only") - version( - "7.8.0", - extension="tar.gz", - sha256="b9c8f0a9d523ac1a606697f95fc39d8acf1140d3728561b8010a604431b4e9cf", - ) - version( - "7.7.2", - extension="tar.gz", - sha256="2fb23c8d67a7b72061b4f7a6875861e17d412d524527b2a96151ead1d9cfa2c1", - ) - 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.3p5", - extension="tar.gz", - sha256="29a4b4293f725bea2f32de5641b127452fc836a30e207d0daa5a0d1b746226b8", - ) - 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 2249897e8ddf8d..afba470d0f2794 100644 --- a/var/spack/repos/builtin/packages/opencl-c-headers/package.py +++ b/var/spack/repos/builtin/packages/opencl-c-headers/package.py @@ -16,6 +16,9 @@ class OpenclCHeaders(CMakePackage): license("Apache-2.0") + version( + "2024.05.08", sha256="3c3dd236d35f4960028f4f58ce8d963fb63f3d50251d1e9854b76f1caab9a309" + ) version( "2023.12.14", sha256="407d5e109a70ec1b6cd3380ce357c21e3d3651a91caae6d0d8e1719c69a1791d" ) @@ -53,6 +56,8 @@ class OpenclCHeaders(CMakePackage): "2020.03.13", sha256="664bbe587e5a0a00aac267f645b7c413586e7bc56dca9ff3b00037050d06f476" ) + 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 84e3b8dad4968f..c580b966775af4 100644 --- a/var/spack/repos/builtin/packages/opencl-clhpp/package.py +++ b/var/spack/repos/builtin/packages/opencl-clhpp/package.py @@ -27,6 +27,8 @@ class OpenclClhpp(CMakePackage): version("2.0.10", sha256="fa27456295c3fa534ce824eb0314190a8b3ebd3ba4d93a0b1270fc65bf378f2b") version("2.0.9", sha256="ba8ac4977650d833804f208a1b0c198006c65c5eac7c83b25dc32cea6199f58c") + depends_on("cxx", type="build") # generated + 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 00000000000000..368eb1aa336927 --- /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 7d5a668c07c31a..9c5922f47b1c98 100644 --- a/var/spack/repos/builtin/packages/opencoarrays/package.py +++ b/var/spack/repos/builtin/packages/opencoarrays/package.py @@ -31,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", 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 00000000000000..bed7b22eb3d0ec --- /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 64375458a32833..58110998851bb5 100644 --- a/var/spack/repos/builtin/packages/opencv/package.py +++ b/var/spack/repos/builtin/packages/opencv/package.py @@ -22,6 +22,9 @@ class Opencv(CMakePackage, CudaPackage): 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") @@ -46,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", @@ -70,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( @@ -251,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"): @@ -481,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"): @@ -781,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") @@ -823,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") diff --git a/var/spack/repos/builtin/packages/opendatadetector/package.py b/var/spack/repos/builtin/packages/opendatadetector/package.py index 345c0c90e0dd41..6953fbd115a04b 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 27a7052f30ae2e..0a92677f77f3d4 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 ce2bf16b5966aa..3e9c6ac01e1fc7 100644 --- a/var/spack/repos/builtin/packages/openexr/package.py +++ b/var/spack/repos/builtin/packages/openexr/package.py @@ -16,6 +16,7 @@ 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") @@ -70,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") @@ -85,6 +89,7 @@ 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): diff --git a/var/spack/repos/builtin/packages/openfast/package.py b/var/spack/repos/builtin/packages/openfast/package.py index 7fcaf397a3f7dd..8b99fda2c669e3 100644 --- a/var/spack/repos/builtin/packages/openfast/package.py +++ b/var/spack/repos/builtin/packages/openfast/package.py @@ -35,6 +35,10 @@ class Openfast(CMakePackage): version("2.0.0", tag="v2.0.0", commit="0769598a17e19b3ccd00a85cde389995f55024a8") version("1.0.0", tag="v1.0.0", commit="e788b9b18bd5ed96ea59d4bc0812d461bc430cfe") + 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") @@ -71,6 +75,7 @@ def cmake_args(self): 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"), ] ) diff --git a/var/spack/repos/builtin/packages/openfoam-org/package.py b/var/spack/repos/builtin/packages/openfoam-org/package.py index 44408134bf727e..d54c9e30bfbb79 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 0919b9abd6f617..d3de3823f62092 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:") diff --git a/var/spack/repos/builtin/packages/openfst/package.py b/var/spack/repos/builtin/packages/openfst/package.py index ec4271a0cfce0d..de50be11357a02 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 280b8efc63b472..7d16073ed4af1f 100644 --- a/var/spack/repos/builtin/packages/opengl/package.py +++ b/var/spack/repos/builtin/packages/opengl/package.py @@ -106,6 +106,6 @@ def gl_libs(self): 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 7882f59ef12493..0b271967064558 100644 --- a/var/spack/repos/builtin/packages/openimagedenoise/package.py +++ b/var/spack/repos/builtin/packages/openimagedenoise/package.py @@ -13,12 +13,11 @@ 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") @@ -30,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 f2f2169e5b89fc..fe48959156bc3b 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 b70d0aa9e14c01..6e64d5c5526f4a 100644 --- a/var/spack/repos/builtin/packages/openipmi/package.py +++ b/var/spack/repos/builtin/packages/openipmi/package.py @@ -19,6 +19,8 @@ class Openipmi(AutotoolsPackage): 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 c8a739bda30419..bcaec85a861270 100644 --- a/var/spack/repos/builtin/packages/openjdk/package.py +++ b/var/spack/repos/builtin/packages/openjdk/package.py @@ -18,12 +18,40 @@ # 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", @@ -37,7 +65,7 @@ "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", ), @@ -69,7 +97,7 @@ "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", ), @@ -150,6 +178,30 @@ "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", @@ -163,7 +215,7 @@ "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", ), @@ -181,7 +233,7 @@ "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", ), @@ -203,7 +255,7 @@ "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", ), @@ -341,7 +393,7 @@ class Openjdk(Package): """The free and opensource java implementation""" homepage = "https://openjdk.org/" - preferred_prefix = "11." + preferred_prefix = "17." preferred_defined = False for ver, packages in _versions.items(): @@ -354,9 +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") @@ -426,6 +487,37 @@ def install(self, spec, prefix): 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 4a00fcc42b584e..86d2af471a54ea 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 dd2156ba3247c7..c88290cbb5a9a4 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 4fedf169db4a06..629a81950b6d71 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 @@ -64,6 +68,9 @@ class Openldap(AutotoolsPackage): 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") def configure_args(self): diff --git a/var/spack/repos/builtin/packages/openlibm/package.py b/var/spack/repos/builtin/packages/openlibm/package.py index 2645969ad9cbd3..7d1bf65682c0e8 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 3c82765fd429e6..97510a2c685110 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 67ad7d6337f72f..68e6f2142313a6 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 6412fab474c5f2..94d7cbb1050849 100644 --- a/var/spack/repos/builtin/packages/openmm/package.py +++ b/var/spack/repos/builtin/packages/openmm/package.py @@ -25,6 +25,10 @@ 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")) diff --git a/var/spack/repos/builtin/packages/openmolcas/package.py b/var/spack/repos/builtin/packages/openmolcas/package.py index c3a59df79de2d6..d9e95fca8fffd8 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") diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index b9e02c4285b9a2..a2f2340aa8c257 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -44,10 +44,16 @@ class Openmpi(AutotoolsPackage, CudaPackage): # Current version( - "5.0.3", sha256="990582f206b3ab32e938aa31bbf07c639368e4405dca196fabe7f0f76eeda90b" - ) # libmpi.so.40.40.3 + "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 @@ -388,6 +394,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") @@ -433,16 +443,11 @@ class Openmpi(AutotoolsPackage, CudaPackage): 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") - # 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. - def patch(self): - spec = self.spec - if "+two_level_namespace" in spec and spec.satisfies("platform=darwin"): - print("Applying configure patch for two_level_namespace on MacOS") - filter_file(r"-flat_namespace", "-commons,use_dylibs", "configure") + # 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") variant( "fabrics", @@ -476,7 +481,7 @@ def patch(self): ) # 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=False, description="Build static libraries") variant("sqlite3", default=False, when="@1.7.3:1", description="Build SQLite3 support") @@ -537,6 +542,7 @@ def patch(self): 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 @@ -555,6 +561,7 @@ def patch(self): 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 @@ -562,6 +569,7 @@ def patch(self): 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") variant( "two_level_namespace", @@ -572,9 +580,19 @@ def patch(self): '-Wl,-flat_namespace'.""", ) - provides("mpi") - provides("mpi@:2.2", when="@1.6.5") - provides("mpi@:3.0", when="@1.7.5:") + # 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": @@ -668,11 +686,6 @@ def patch(self): # knem support was added in 1.5 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:", @@ -996,12 +1009,15 @@ def die_without_fortran(self): def autoreconf(self, spec, prefix): perl = which("perl") perl("autogen.pl") + if spec.satisfies("+two_level_namespace platform=darwin"): + print("Re-applying configure patch for two_level_namespace on MacOS after autoreconf") + 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 "+two_level_namespace" in spec and spec.satisfies("platform=darwin"): + if spec.satisfies("+two_level_namespace platform=darwin"): print("Re-applying configure patch for two_level_namespace on MacOS after autoreconf") filter_file(r"-flat_namespace", "-commons,use_dylibs", "configure") @@ -1009,6 +1025,11 @@ 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()). @@ -1032,9 +1053,9 @@ def configure_args(self): 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 @@ -1047,7 +1068,7 @@ def configure_args(self): 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") @@ -1056,6 +1077,9 @@ def configure_args(self): 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"]) @@ -1162,26 +1186,14 @@ def configure_args(self): config_args.append("--disable-wrapper-runpath") # Add extra_rpaths and implicit_rpaths into the wrappers. - if wrapper_ldflags and any(self.compiler.linker_arg in x for x in wrapper_ldflags): - for i in range(len(wrapper_ldflags)): - if wrapper_ldflags[i].startswith(self.compiler.linker_arg): - rpaths = ",".join( - self.compiler.extra_rpaths + self.compiler.implicit_rpaths() - ) - # Remove leading '-Wl' - rpaths = (self.compiler.cc_rpath_arg + rpaths).lstrip( - self.compiler.linker_arg - ) - wrapper_ldflags[i] += "{}".format(rpaths) - else: - wrapper_ldflags.extend( - [ - self.compiler.cc_rpath_arg + path - for path in itertools.chain( - self.compiler.extra_rpaths, self.compiler.implicit_rpaths() - ) - ] - ) + wrapper_ldflags.extend( + [ + self.compiler.cc_rpath_arg + path + for path in itertools.chain( + self.compiler.extra_rpaths, self.compiler.implicit_rpaths() + ) + ] + ) else: config_args.append("--disable-wrapper-rpath") config_args.append("--disable-wrapper-runpath") @@ -1209,6 +1221,25 @@ def configure_args(self): # 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") @@ -1258,6 +1289,7 @@ def filter_pc_files(self): 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 @@ -1267,7 +1299,7 @@ def delete_mpirun_mpiexec(self): # 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, @@ -1289,7 +1321,7 @@ def setup_install_tests(self): 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""" @@ -1307,7 +1339,7 @@ def test_mpirun(self): 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): 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 00000000000000..add0fb2c9bca0a --- /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 00000000000000..ccb854ce811993 --- /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 96626672ec18ea..3ec7c6b818e1e2 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 cd583f0f888ca5..c9110087a06037 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 63f73bbb7492cd..7ab2d75413943f 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 1a588e95b1436e..32ae5909785a15 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 b114ed8efebf92..d05af6a7338f8c 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,25 @@ 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("cxx", type="build") # generated + 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 +76,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 +109,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): @@ -172,17 +185,10 @@ def check(self): # 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 3c871a4abd932f..3fe45e505426a6 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") diff --git a/var/spack/repos/builtin/packages/openradioss-starter/package.py b/var/spack/repos/builtin/packages/openradioss-starter/package.py index cf5a47215e4aec..b727c7e5c07110 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") diff --git a/var/spack/repos/builtin/packages/openrasmol/package.py b/var/spack/repos/builtin/packages/openrasmol/package.py index b7064e810bd336..f66dd35241ee73 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 5c4ca053eea269..df9cb91771c4d9 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 c1ec2f50106d72..9d257c5c71ba72 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") @@ -83,8 +86,8 @@ class Openscenegraph(CMakePackage): # 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/pull/1281/commits/759620a3b7b787c960a7e414ba26ab5497817d40.patch?full_index=1", - sha256="b8f588d1fba9361127a7d5127e0720a4d64f44ef021515d1d67d77dcacdef8fd", + "https://github.com/openscenegraph/OpenSceneGraph/commit/759620a3b7b787c960a7e414ba26ab5497817d40.patch?full_index=1", + sha256="1e6daf0d15e916b69d62519a0ca4f8a722fe2144cbdab7dd182eaffb141e3c1a", when="@3.6:", ) patch("glibc-jasper.patch", when="@3.4%gcc") diff --git a/var/spack/repos/builtin/packages/openslide/package.py b/var/spack/repos/builtin/packages/openslide/package.py index e9992484be3996..8133a6eea29e6a 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 6e77b75dbfa3fa..f930d127234065 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 7fa3e646e3f908..c77a608fd21b3c 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") diff --git a/var/spack/repos/builtin/packages/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py index 5ef937a0f8e92e..6dddc60f97d49c 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") diff --git a/var/spack/repos/builtin/packages/openssh/package.py b/var/spack/repos/builtin/packages/openssh/package.py index e25efd3d11dee0..bfc90e928a31f5 100755 --- a/var/spack/repos/builtin/packages/openssh/package.py +++ b/var/spack/repos/builtin/packages/openssh/package.py @@ -25,6 +25,7 @@ class Openssh(AutotoolsPackage): license("SSH-OpenSSH") + version("9.8p1", sha256="dd8bd002a379b5d499dfb050dd1fa9af8029e80461f4bb6c523c49973f5a39f3") version("9.7p1", sha256="490426f766d82a2763fcacd8d83ea3d70798750c7bd2aff2e57dc5660f773ffd") version("9.6p1", sha256="910211c07255a8c5ad654391b40ee59800710dd8119dd5362de09385aa7a777c") version("9.5p1", sha256="f026e7b79ba7fb540f75182af96dc8a8f1db395f922bbc9f6ca603672686086b") @@ -54,6 +55,9 @@ class Openssh(AutotoolsPackage): 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" ) @@ -93,7 +97,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 diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index cf27d75a617180..cf0e5544fb1919 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -12,15 +12,13 @@ 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,341 +30,65 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package license("Apache-2.0") - version("3.3.0", sha256="53e66b043322a606abf0087e7699a0e033a37fa13feb9742df35c3a33b18fb02") - version("3.2.1", sha256="83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39") - version("3.1.5", sha256="6ae015467dabf0469b139ada93319327be24b98251ffaeceda0221848dc09262") - version("3.0.13", sha256="88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313") + 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.3", - sha256="f0316a2ebd89e7f2352976445458689f80302093788c466692fb2a188b2eacf6", + "3.3.1", + sha256="777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e", deprecated=True, ) version( - "3.1.2", - sha256="a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539", + "3.3.0", + sha256="53e66b043322a606abf0087e7699a0e033a37fa13feb9742df35c3a33b18fb02", deprecated=True, ) version( - "3.1.1", - sha256="b3aa61334233b852b63ddb048df181177c2c659eb9d4376008118f9c08d07674", + "3.2.2", + sha256="197149c18d9e9f292c43f0400acaba12e5f52cacfe050f3d199277ea738ec2e7", deprecated=True, ) version( - "3.1.0", - sha256="aaa925ad9828745c4cad9d9efeb273deca820f2cdcf2c3ac7d7c1212b7c497b4", + "3.2.1", + sha256="83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39", deprecated=True, ) version( - "3.0.11", - sha256="b3425d3bb4a2218d0697eb41f7fc0cdede016ed19ca49d168b78e8d947887f55", + "3.1.6", + sha256="5d2be4036b478ef3cb0a854ca9b353072c3a0e26d8a56f8f0ab9fb6ed32d38d7", deprecated=True, ) version( - "3.0.10", - sha256="1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323", + "3.1.5", + sha256="6ae015467dabf0469b139ada93319327be24b98251ffaeceda0221848dc09262", deprecated=True, ) version( - "3.0.9", - sha256="eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90", + "3.0.14", + sha256="eeca035d4dd4e84fc25846d952da6297484afa0650a6f84c682e39df3a4123ca", deprecated=True, ) version( - "3.0.8", - sha256="6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e", - deprecated=True, - ) - version( - "3.0.7", - sha256="83049d042a260e696f62406ac5c08bf706fd84383f945cf21bd61e9ed95c396e", - 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. @@ -377,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") @@ -396,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) @@ -418,6 +131,7 @@ def libs(self): root=self.prefix, recursive=True, shared=self.spec.variants["shared"].value, + runtime=False, ) def handle_fetch_error(self, error): @@ -466,9 +180,11 @@ def install(self, spec, prefix): "--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 7b6db1c532adf3..6dea137c243079 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 32399f546da45d..b526ef9a1e5d16 100644 --- a/var/spack/repos/builtin/packages/opensubdiv/package.py +++ b/var/spack/repos/builtin/packages/opensubdiv/package.py @@ -26,6 +26,8 @@ class Opensubdiv(CMakePackage, CudaPackage): 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) diff --git a/var/spack/repos/builtin/packages/openturns/package.py b/var/spack/repos/builtin/packages/openturns/package.py index d5e0d5d1a2921e..ba002881d91559 100644 --- a/var/spack/repos/builtin/packages/openturns/package.py +++ b/var/spack/repos/builtin/packages/openturns/package.py @@ -27,6 +27,9 @@ class Openturns(CMakePackage): version("1.19", sha256="1d61cb6ce8ec1121db9f1e9fb490aaa056d2ff250db26df05d2e3e30ceb32344") version("1.18", sha256="1840d3fd8b38fd5967b1fa04e49d8f760c2c497400430e97623595ca48754ae0") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + variant("python", default=True, description="Build Python bindings") variant("libxml2", default=False, description="Use LibXML2 for XML support") diff --git a/var/spack/repos/builtin/packages/openvdb/package.py b/var/spack/repos/builtin/packages/openvdb/package.py index 293839704f79be..0ef4cbb354bfe3 100644 --- a/var/spack/repos/builtin/packages/openvdb/package.py +++ b/var/spack/repos/builtin/packages/openvdb/package.py @@ -28,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 c04f3f22dbd9c6..165c5b39b26462 100644 --- a/var/spack/repos/builtin/packages/openvkl/package.py +++ b/var/spack/repos/builtin/packages/openvkl/package.py @@ -14,8 +14,6 @@ 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") @@ -29,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 9d9870706b72ae..d9cdb2f80b0c6d 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") 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 443ecb3df542a5..dfc990efbd64ca 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 c9215b0f6df0fd..1d98f78271b24b 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 5e010251f46a52..636854421d7a77 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 174e68dafb4d2b..c300b2100cb19b 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 277acc74de431c..8f8a59ae3a8b96 100644 --- a/var/spack/repos/builtin/packages/opium/package.py +++ b/var/spack/repos/builtin/packages/opium/package.py @@ -9,7 +9,7 @@ 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 3b09e935bdd2a3..b3ed4112cdf131 100644 --- a/var/spack/repos/builtin/packages/optional-lite/package.py +++ b/var/spack/repos/builtin/packages/optional-lite/package.py @@ -30,6 +30,8 @@ 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 [ f"-DOPTIONAL_LITE_OPT_BUILD_TESTS={'ON' if self.run_tests else '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 similarity index 100% rename from var/spack/repos/builtin/packages/optipng/for_aarch64.patch rename to 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 00000000000000..9fa2386b3c1e8b --- /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 ebef46e2ae958d..9223cce45c1d22 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 f839f67202fb62..4cfc0b897be110 100644 --- a/var/spack/repos/builtin/packages/opus/package.py +++ b/var/spack/repos/builtin/packages/opus/package.py @@ -43,3 +43,5 @@ class Opus(AutotoolsPackage): version("0.9.2", sha256="6e85c1b57e1d7b7dfe2928bf92586b96b73a9067e054ede45bd8e6d24bd30582") version("0.9.1", sha256="206221afc47b87496588013bd4523e1e9f556336c0813f4372773fc536dd4293") version("0.9.0", sha256="b2f75c4ac5ab837845eb028413fae2a28754bfb0a6d76416e2af1441ef447649") + + 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 922b849d443588..138d8d7cea915c 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 597e229a0844a5..a911b64a676ee1 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 b07b5abe0ff922..1c3487cb1a08b2 100644 --- a/var/spack/repos/builtin/packages/orc/package.py +++ b/var/spack/repos/builtin/packages/orc/package.py @@ -16,6 +16,8 @@ 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") diff --git a/var/spack/repos/builtin/packages/orca/package.py b/var/spack/repos/builtin/packages/orca/package.py index d2e47fb334e4ad..00021a970d73b1 100644 --- a/var/spack/repos/builtin/packages/orca/package.py +++ b/var/spack/repos/builtin/packages/orca/package.py @@ -23,6 +23,10 @@ class Orca(Package): license("LGPL-2.1-or-later") + version( + "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") @@ -33,17 +37,28 @@ class Orca(Package): # 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.2.0": "3.1.4", "4.2.1": "3.1.4", "5.0.3": "4.1.2", "5.0.4": "4.1.2"} + openmpi_versions = { + "4.2.0": "3.1.4", + "4.2.1": "3.1.4", + "5.0.3": "4.1.2", + "5.0.4": "4.1.2", + "6.0.0": "4.1.6", + "avx2-6.0.0": "4.1.6", + } for orca_version, openmpi_version in openmpi_versions.items(): depends_on( "openmpi@{0}".format(openmpi_version), type="run", when="@{0}".format(orca_version) ) def url_for_version(self, version): - openmpi_version = self.openmpi_versions[str(version.dotted)].replace(".", "") + openmpi_version = self.openmpi_versions[version.string].replace(".", "") if openmpi_version == "412": openmpi_version = "411" - return f"file://{os.getcwd()}/orca_{version.underscored}_linux_x86-64_shared_openmpi{openmpi_version}.tar.xz" + ver_parts = version.string.split("-") + ver_underscored = ver_parts[-1].replace(".", "_") + features = ver_parts[:-1] + ["shared"] + feature_text = "_".join(features) + return f"file://{os.getcwd()}/orca_{ver_underscored}_linux_x86-64_{feature_text}_openmpi{openmpi_version}.tar.xz" def install(self, spec, prefix): mkdirp(prefix.bin) diff --git a/var/spack/repos/builtin/packages/orfm/package.py b/var/spack/repos/builtin/packages/orfm/package.py index 3b87e6084278ba..9aeb4ada490aff 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/osi/package.py b/var/spack/repos/builtin/packages/osi/package.py index 83e12ebe3a7c8e..a29a9fea0f9e67 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 a322d470db6d3a..c78837343c2a6f 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 b42564cc9c0126..682032655bccf7 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 @@ def gl_headers(self): @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 fc649dc22f2eaa..efa051d48fe53f 100644 --- a/var/spack/repos/builtin/packages/ospray/package.py +++ b/var/spack/repos/builtin/packages/ospray/package.py @@ -11,11 +11,12 @@ 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") @@ -27,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") @@ -39,14 +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.13:", when="@3.1:") + 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:") @@ -54,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 9fb9614d374898..8506e50949337e 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 24dd3c08092cb7..1db80850dd70db 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 e94129c65d0c48..bf2c2e505dc20c 100644 --- a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py +++ b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py @@ -44,6 +44,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 00000000000000..4ad43a6b2923fa --- /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 757d34d08af3d6..56bfddac03f586 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 60d55d097cb170..ff16ea5dd4bdee 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 @@ def url_for_version(self, version): 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 685d6aede57652..b46bb62fac6b9e 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 dc82a5ad273290..11427f1f8e1ea3 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.") diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index de98e31e1e04e2..9b71294db3d3d1 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 bb6266286d93d9..2a04e90c34cf00 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 28ede3ec5062a2..b51a86435e0986 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 fbcff6696ed564..3a431949230872 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 27a01e5ea06235..8909dd66c87cec 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 4b6f0eef1c6452..033a927fdf514e 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 2821ae6eec5050..0790f950860030 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 f10dbee84b12dd..02892853da23a2 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 ac72eed956aa35..582da1d9c39f49 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 index 92724d24177b63..84baaad08cee36 100644 --- a/var/spack/repos/builtin/packages/paddle/package.py +++ b/var/spack/repos/builtin/packages/paddle/package.py @@ -17,6 +17,9 @@ class Paddle(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/pagit/package.py b/var/spack/repos/builtin/packages/pagit/package.py index 7cec37c0eef77a..723eb8bc7eb60c 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 0a7538d2e342dd..2bcebe0187b9a2 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") diff --git a/var/spack/repos/builtin/packages/pagmo2/package.py b/var/spack/repos/builtin/packages/pagmo2/package.py index a72cb796767526..527314c70055b0 100644 --- a/var/spack/repos/builtin/packages/pagmo2/package.py +++ b/var/spack/repos/builtin/packages/pagmo2/package.py @@ -22,6 +22,8 @@ class Pagmo2(CMakePackage): version("master", branch="master") version("2.18.0", sha256="5ad40bf3aa91857a808d6b632d9e1020341a33f1a4115d7a2b78b78fd063ae31") + depends_on("cxx", type="build") # generated + 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 43ff1ae55927d4..50fd6d86ef39da 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 b607a24209be22..b718f4c9b3c3b7 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 9edf9290ee6c4c..e4bc3af5ad33d9 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 176b358472a45a..630645642f4f53 100644 --- a/var/spack/repos/builtin/packages/palace/package.py +++ b/var/spack/repos/builtin/packages/palace/package.py @@ -20,6 +20,8 @@ class Palace(CMakePackage): version("0.12.0", tag="v0.12.0", commit="8c192071206466638d5818048ee712e1fada386f") version("0.11.2", tag="v0.11.2", commit="6c3aa5f84a934a6ddd58022b2945a1bdb5fa329d") + 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 for shared-memory parallelism") diff --git a/var/spack/repos/builtin/packages/palisade-development/package.py b/var/spack/repos/builtin/packages/palisade-development/package.py index 05e523a13cdc05..df1c75e05c0f23 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 63d35ec21adeaf..1e989967741bda 100644 --- a/var/spack/repos/builtin/packages/paml/package.py +++ b/var/spack/repos/builtin/packages/paml/package.py @@ -34,6 +34,8 @@ class Paml(MakefilePackage): 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 c97a5a21adb353..127413bae35a74 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 15f6c64af03868..98f6ab47ca8806 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/pandoramonitoring/package.py b/var/spack/repos/builtin/packages/pandoramonitoring/package.py index df7599c0a59c05..25008056ad968c 100644 --- a/var/spack/repos/builtin/packages/pandoramonitoring/package.py +++ b/var/spack/repos/builtin/packages/pandoramonitoring/package.py @@ -23,6 +23,8 @@ class Pandoramonitoring(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/pandorasdk/package.py b/var/spack/repos/builtin/packages/pandorasdk/package.py index 2f4d3be357a5e7..77535e003eb442 100644 --- a/var/spack/repos/builtin/packages/pandorasdk/package.py +++ b/var/spack/repos/builtin/packages/pandorasdk/package.py @@ -25,6 +25,8 @@ class Pandorasdk(CMakePackage): 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): diff --git a/var/spack/repos/builtin/packages/pango/package.py b/var/spack/repos/builtin/packages/pango/package.py index 4a44c07094955b..1219deb54d4abb 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 @@ def url_for_version(self, version): 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 @@ def configure_args(self): # 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}") if self.spec.satisfies("^cairo ~shared"): pkgconfig = which("pkg-config") diff --git a/var/spack/repos/builtin/packages/pangolin/package.py b/var/spack/repos/builtin/packages/pangolin/package.py index 1cde66335f0d0b..d7d7108c4b7725 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 d09c682720d82b..032694b8e0e0f3 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 89f6508c7f75db..7b22451ae2b357 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -46,6 +46,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 +59,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 @@ -155,6 +165,9 @@ def configure_args(self): 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") @@ -205,7 +218,7 @@ 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`.""" 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 76703751c487b0..166dbee53f916e 100644 --- a/var/spack/repos/builtin/packages/papyrus/package.py +++ b/var/spack/repos/builtin/packages/papyrus/package.py @@ -42,7 +42,7 @@ def setup_run_environment(self, env): 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 327c9ce3944a3f..f402ef6d28ad14 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 9acb90d815a602..0f2db875eeb10f 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 @@ def url_for_version(self, version): 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 @@ def libs(self): 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 spack.error.NoLibrariesError(msg) @when("@master") def autoreconf(self, spec, prefix): @@ -134,7 +139,7 @@ def configure_args(self): 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") @@ -157,46 +162,46 @@ def configure_args(self): 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 7ced55d382a204..ced0386a4d44dc 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") @@ -49,3 +51,6 @@ def filter_sbang(self): 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 ba3a3ee1a42b17..bfc933a7c8e36c 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 639d7689148e81..4e27759a580070 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 530bb340177ada..3098ab8c46f011 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/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 2c5882e2a929d3..874f8bed64155a 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,10 +35,13 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): version("master", branch="master", submodules=True) version( - "5.12.0", - sha256="d289afe7b48533e2ca4a39a3b48d3874bfe67cf7f37fdd2131271c57e64de20d", + "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") @@ -58,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, @@ -66,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") @@ -79,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, @@ -120,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") @@ -145,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( @@ -153,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") @@ -181,27 +229,31 @@ 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") @@ -226,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 @@ -257,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 @@ -307,6 +361,9 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): # https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9690 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:") @@ -373,7 +430,7 @@ def flag_handler(self, name, flags): 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 @@ -421,19 +478,17 @@ def cmake_args(self): 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" @@ -441,7 +496,7 @@ def use_x11(): 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", @@ -450,7 +505,7 @@ def use_x11(): 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:"): @@ -525,10 +580,16 @@ def use_x11(): 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") @@ -551,11 +612,9 @@ def use_x11(): 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( [ @@ -583,38 +642,25 @@ def use_x11(): # 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( @@ -686,4 +732,59 @@ def use_x11(): 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 00000000000000..a580debfa1e037 --- /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 3906e6f8f46d44..937ab1786d09ea 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 @@ def setup_run_environment(self, env): 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 9d18cd69511773..c18d61e798799d 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -21,6 +21,8 @@ class Parmetis(CMakePackage): version("4.0.3", sha256="f2d9a231b7cf97f1fee6e8c9663113ebf6c240d407d3c118c55b3633d6be6e5f") version("4.0.2", sha256="5acbb700f457d3bda7d4bb944b559d7f21f075bb6fa4c33f42c261019ef2f0b2") + depends_on("c", type="build") # generated + 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.") diff --git a/var/spack/repos/builtin/packages/parmgridgen/package.py b/var/spack/repos/builtin/packages/parmgridgen/package.py index ee83f9622fe35b..942e7be7ba35c6 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 5766f9b79b6f00..e41f7129400bcc 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 1525bd45f95109..6c3719519f16bb 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 c98ba1336f42ca..faba983eea22ae 100644 --- a/var/spack/repos/builtin/packages/parsec/package.py +++ b/var/spack/repos/builtin/packages/parsec/package.py @@ -104,17 +104,29 @@ def check(self): 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 472cbcb34c7105..b13e425f063345 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 cc04c1ad98d845..b4755313fd698a 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 index 1e8a8a1817d8a1..9d2cdfc5c3ce54 100644 --- a/var/spack/repos/builtin/packages/parthenon/package.py +++ b/var/spack/repos/builtin/packages/parthenon/package.py @@ -19,6 +19,8 @@ class Parthenon(CMakePackage): version("23.11", sha256="76f79fb7d6556d94052829a8ac71f53cbda76f37fabd9233c5c0cd47ef561aee") version("0.8.0", sha256="9ed7c9ebdc84927a43b86c1e061f925b57cef9b567c7275f22779ed4d98e858d") + depends_on("cxx", type="build") # generated + # ------------------------------------------------------------# # Variants # ------------------------------------------------------------# 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 00000000000000..b5d953d4e0a272 --- /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 18877d58b11713..6112d51ba0c3e1 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") diff --git a/var/spack/repos/builtin/packages/patch/package.py b/var/spack/repos/builtin/packages/patch/package.py index f974ab01c25606..50bbda43bc4caa 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 3aa78aa604c3ea..f5f2c9742783e9 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 407c7021aeb57a..ef0ee22a9e01dc 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 c6940f01920bc6..26f34d2e1ddfff 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 bf14c3c2792de0..aee7b4ced63668 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 65d1f6467f3c50..f0dc90cfaa92be 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 index b62a96eb2a54e7..3c82805097c716 100644 --- a/var/spack/repos/builtin/packages/pblat/package.py +++ b/var/spack/repos/builtin/packages/pblat/package.py @@ -17,6 +17,8 @@ class Pblat(MakefilePackage): version("2.5.1", sha256="e85a4d752b8e159502d529f0f9e47579851a6b466b6c2f1f4d49f598642bc615") + depends_on("c", type="build") # generated + depends_on("openssl") depends_on("zlib-api") diff --git a/var/spack/repos/builtin/packages/pbmpi/package.py b/var/spack/repos/builtin/packages/pbmpi/package.py index f063f0cd843a4c..a02903fbec9275 100644 --- a/var/spack/repos/builtin/packages/pbmpi/package.py +++ b/var/spack/repos/builtin/packages/pbmpi/package.py @@ -9,7 +9,7 @@ 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 a2b8d2fdb3f07d..b066d797d71c5a 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 e6a720a17837cc..4cc74a437d5daf 100644 --- a/var/spack/repos/builtin/packages/pcl/package.py +++ b/var/spack/repos/builtin/packages/pcl/package.py @@ -23,6 +23,9 @@ class Pcl(CMakePackage): 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 ce9a459056b6b1..0b7fc617a06c8b 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 02d4ea0cd07878..e9b4606ce884a4 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 27af43f6000037..df79accc6ed67e 100644 --- a/var/spack/repos/builtin/packages/pcre2/package.py +++ b/var/spack/repos/builtin/packages/pcre2/package.py @@ -6,7 +6,7 @@ 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 +14,9 @@ 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") @@ -26,9 +27,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 = [] @@ -41,11 +70,23 @@ def configure_args(self): 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 a531d14defd463..50a785c1e2648b 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 index 76f53662986f15..58c78abb7c36fd 100644 --- a/var/spack/repos/builtin/packages/pdal/package.py +++ b/var/spack/repos/builtin/packages/pdal/package.py @@ -26,6 +26,8 @@ class Pdal(CMakePackage): 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:") diff --git a/var/spack/repos/builtin/packages/pdc/package.py b/var/spack/repos/builtin/packages/pdc/package.py index 1915dbdbe29976..1c09eb56f6358a 100644 --- a/var/spack/repos/builtin/packages/pdc/package.py +++ b/var/spack/repos/builtin/packages/pdc/package.py @@ -14,13 +14,14 @@ 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.4.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", "jeanbez") license("BSD-3-Clause-LBNL") + version("0.5", sha256="d8ee6ad31670882dec8a9a131cd491a7134953acf3d18abf288605f3cc517636") version("0.4", sha256="eb2c2b69e5cdbca3210b8d72a646c16a2aa004ca08792f28cc6290a9a3ad6c8a") version("0.3", sha256="14a3abd5e1e604f9527105709fca545bcdebe51abd2b89884db74d48a38b5443") version( @@ -37,6 +38,9 @@ class Pdc(CMakePackage): 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") @@ -60,8 +64,4 @@ def cmake_args(self): 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 b7a74e0e96eedf..9f190a14ca11d8 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 58872d3a3a8344..77be9d6305cf21 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 bb414c0bf5684a..41a0d02a9fce63 100644 --- a/var/spack/repos/builtin/packages/pdt/package.py +++ b/var/spack/repos/builtin/packages/pdt/package.py @@ -38,6 +38,8 @@ class Pdt(AutotoolsPackage): version("3.19", sha256="d57234077e2e999f2acf9860ea84369a4694b50cc17fa6728e5255dc5f4a2160") version("3.18.1", sha256="d06c2d1793fadebf169752511e5046d7e02cf3fead6135a35c34b1fee6d6d3b2") + depends_on("cxx", type="build") # generated + variant("pic", default=False, description="Builds with pic") patch("cray_configure.patch", when="%cce") diff --git a/var/spack/repos/builtin/packages/pegtl/package.py b/var/spack/repos/builtin/packages/pegtl/package.py index af038366f46bd2..850e305afed367 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 bfce36fc5968b8..eb5fd1b8d66f65 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") diff --git a/var/spack/repos/builtin/packages/percept/package.py b/var/spack/repos/builtin/packages/percept/package.py index 2680fe33bda575..7bfea43e800feb 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 6a7203cd5efce7..bd7de28d111623 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 699521a631bbde..993e1567403a4c 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-alien-build/package.py b/var/spack/repos/builtin/packages/perl-alien-build/package.py index 74799af883a283..15f41fc09cd930 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 a48a7f88e9ecce..033bbe4400682b 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 94b06b1bde9aa3..18b06469d5fbe8 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 @@ 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-bio-bigfile/package.py b/var/spack/repos/builtin/packages/perl-bio-bigfile/package.py new file mode 100644 index 00000000000000..b43d7ec1de7301 --- /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-ensembl-funcgen/package.py b/var/spack/repos/builtin/packages/perl-bio-ensembl-funcgen/package.py new file mode 100644 index 00000000000000..bede5949f67252 --- /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 00000000000000..5793e3bd51185b --- /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 00000000000000..0078c280611a75 --- /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 00000000000000..8cf860e3d72007 --- /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-bioperl/package.py b/var/spack/repos/builtin/packages/perl-bioperl/package.py index abe4ab450ae442..1385bd5911ec0e 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 f48e8c993adaa7..ecf719976e91d1 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-cairo/package.py b/var/spack/repos/builtin/packages/perl-cairo/package.py index 828cbc64aefda9..343f902c62a070 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-carp-clan/package.py b/var/spack/repos/builtin/packages/perl-carp-clan/package.py index 08f43e817e761b..ce0f79ee1a25ae 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-class-data-inheritable/package.py b/var/spack/repos/builtin/packages/perl-class-data-inheritable/package.py index f80a9e744b8aa5..565c58520b5ce3 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-compress-bzip2/package.py b/var/spack/repos/builtin/packages/perl-compress-bzip2/package.py new file mode 100644 index 00000000000000..5eac90503acf20 --- /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-raw-bzip2/package.py b/var/spack/repos/builtin/packages/perl-compress-raw-bzip2/package.py index e3d5727399c5ea..21791aa84215dd 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 318c47cd6363f0..8006b3a58fa471 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,9 +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-general/package.py b/var/spack/repos/builtin/packages/perl-config-general/package.py index 3397394fb0817d..e7371fd1a22753 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-cpan-meta-check/package.py b/var/spack/repos/builtin/packages/perl-cpan-meta-check/package.py index f9fe89ff84d220..1aff7abd8ab59f 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-data-optlist/package.py b/var/spack/repos/builtin/packages/perl-data-optlist/package.py index 6d5ecb4d5a0624..46b533f6a79b2c 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-stag/package.py b/var/spack/repos/builtin/packages/perl-data-stag/package.py index 94d8e5e7f8ce14..3184c827796e82 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-db-file/package.py b/var/spack/repos/builtin/packages/perl-db-file/package.py index 6efe63ec0bd241..08725e63c3d94e 100644 --- a/var/spack/repos/builtin/packages/perl-db-file/package.py +++ b/var/spack/repos/builtin/packages/perl-db-file/package.py @@ -21,6 +21,8 @@ class PerlDbFile(PerlPackage): 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 0cdf051ce06c56..9ce4fbe00c2f03 100644 --- a/var/spack/repos/builtin/packages/perl-dbd-mysql/package.py +++ b/var/spack/repos/builtin/packages/perl-dbd-mysql/package.py @@ -14,6 +14,17 @@ 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", @@ -21,7 +32,21 @@ class PerlDbdMysql(PerlPackage): ) 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 5b755fb8c84bc4..05d00d17e02846 100644 --- a/var/spack/repos/builtin/packages/perl-dbd-oracle/package.py +++ b/var/spack/repos/builtin/packages/perl-dbd-oracle/package.py @@ -16,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")) 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 7b6e708bc1b32d..272e1fd6d588b0 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 d7fc41403a64ae..8d96305c7e9cd8 100644 --- a/var/spack/repos/builtin/packages/perl-dbd-sqlite/package.py +++ b/var/spack/repos/builtin/packages/perl-dbd-sqlite/package.py @@ -21,4 +21,6 @@ class PerlDbdSqlite(PerlPackage): 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 319cc53bbbf4ae..1064d147d3cb76 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-devel-stacktrace/package.py b/var/spack/repos/builtin/packages/perl-devel-stacktrace/package.py index 4b7c3184bcbfd6..11d7a409ddf918 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-email-address-xs/package.py b/var/spack/repos/builtin/packages/perl-email-address-xs/package.py index 569788ad1e6c04..2847f52b52413d 100644 --- a/var/spack/repos/builtin/packages/perl-email-address-xs/package.py +++ b/var/spack/repos/builtin/packages/perl-email-address-xs/package.py @@ -16,4 +16,6 @@ class PerlEmailAddressXs(PerlPackage): 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-extutils-config/package.py b/var/spack/repos/builtin/packages/perl-extutils-config/package.py index 6f8ec7c689a90c..9143a9485c8374 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 cb583055eefcb0..747ff747fac248 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-listing/package.py b/var/spack/repos/builtin/packages/perl-file-listing/package.py index ff5f316dba88ff..6ac982ae1383ef 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-fth/package.py b/var/spack/repos/builtin/packages/perl-fth/package.py index 4d40028a72335a..1fd728ec2a3fb4 100644 --- a/var/spack/repos/builtin/packages/perl-fth/package.py +++ b/var/spack/repos/builtin/packages/perl-fth/package.py @@ -40,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-graphviz/package.py b/var/spack/repos/builtin/packages/perl-graphviz/package.py index ae67fe9aa801ff..2b882c584c6f51 100644 --- a/var/spack/repos/builtin/packages/perl-graphviz/package.py +++ b/var/spack/repos/builtin/packages/perl-graphviz/package.py @@ -18,6 +18,7 @@ class PerlGraphviz(PerlPackage): 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")) diff --git a/var/spack/repos/builtin/packages/perl-gzip-faster/package.py b/var/spack/repos/builtin/packages/perl-gzip-faster/package.py index 30628b8cf1192f..bf0a140804d90e 100644 --- a/var/spack/repos/builtin/packages/perl-gzip-faster/package.py +++ b/var/spack/repos/builtin/packages/perl-gzip-faster/package.py @@ -18,4 +18,6 @@ class PerlGzipFaster(PerlPackage): 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-html-parser/package.py b/var/spack/repos/builtin/packages/perl-html-parser/package.py index 6f1cbfc160d6d6..09b9139501a480 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-http-cookies/package.py b/var/spack/repos/builtin/packages/perl-http-cookies/package.py index 86e2eedf5014a5..bef18fd969d2f3 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 4f078746af7ab9..4c4bb395890dbd 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 b524951a51592e..4bc6d30456a916 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-parser-xs/package.py b/var/spack/repos/builtin/packages/perl-http-parser-xs/package.py index 33ee14b5ea266e..9bae76faa43530 100644 --- a/var/spack/repos/builtin/packages/perl-http-parser-xs/package.py +++ b/var/spack/repos/builtin/packages/perl-http-parser-xs/package.py @@ -17,3 +17,5 @@ class PerlHttpParserXs(PerlPackage): 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-tiny/package.py b/var/spack/repos/builtin/packages/perl-http-tiny/package.py new file mode 100644 index 00000000000000..1a3250252923c8 --- /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-io-socket-ssl/package.py b/var/spack/repos/builtin/packages/perl-io-socket-ssl/package.py index 7463880ad49f34..9035a38fa9a32e 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 @@ def configure(self, spec, prefix): 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 4db1550b32b1e2..e8d1c1f7ca9ebd 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 4be01b572c074b..af0da3ed9c115a 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-run3/package.py b/var/spack/repos/builtin/packages/perl-ipc-run3/package.py index 95025e3c583e7f..ae4e4feca30b17 100644 --- a/var/spack/repos/builtin/packages/perl-ipc-run3/package.py +++ b/var/spack/repos/builtin/packages/perl-ipc-run3/package.py @@ -14,4 +14,5 @@ class PerlIpcRun3(PerlPackage): maintainers("EbiArnie") + version("0.049", sha256="9d048ae7b9ae63871bae976ba01e081d887392d904e5d48b04e22d35ed22011a") version("0.048", sha256="3d81c3cc1b5cff69cca9361e2c6e38df0352251ae7b41e2ff3febc850e463565") diff --git a/var/spack/repos/builtin/packages/perl-ipc-sharelite/package.py b/var/spack/repos/builtin/packages/perl-ipc-sharelite/package.py index 6b2c01349e4c57..fa6d5908181874 100644 --- a/var/spack/repos/builtin/packages/perl-ipc-sharelite/package.py +++ b/var/spack/repos/builtin/packages/perl-ipc-sharelite/package.py @@ -17,3 +17,5 @@ class PerlIpcSharelite(PerlPackage): 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-json/package.py b/var/spack/repos/builtin/packages/perl-json/package.py index 16387789976d4b..5ffad50b64ec95 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-lwp-mediatypes/package.py b/var/spack/repos/builtin/packages/perl-lwp-mediatypes/package.py index 1a6d3c9c5b21cb..28593cb2474fc4 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 71fb1209e6ff51..df240e2eb2092b 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 655ea9fe897f9d..ec09e393dddf92 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 1b29e2f11c044b..01df08643da92d 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 3bc07147754af4..1389c02e9d3373 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-module-build/package.py b/var/spack/repos/builtin/packages/perl-module-build/package.py index 62c1822d59229d..248c78789f1e09 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 b4b0a27cf1bf57..3ff083a14611d1 100644 --- a/var/spack/repos/builtin/packages/perl-module-corelist/package.py +++ b/var/spack/repos/builtin/packages/perl-module-corelist/package.py @@ -12,6 +12,9 @@ class PerlModuleCorelist(PerlPackage): homepage = "https://metacpan.org/pod/Module::CoreList" 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" ) diff --git a/var/spack/repos/builtin/packages/perl-moose/package.py b/var/spack/repos/builtin/packages/perl-moose/package.py index 234cc6167c86bc..d3b08f943b9fb0 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-net-http/package.py b/var/spack/repos/builtin/packages/perl-net-http/package.py index 27a18f0598352b..42cdb6ca5ab8c8 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-ssleay/package.py b/var/spack/repos/builtin/packages/perl-net-ssleay/package.py index cd6a8168b1f2a4..f6f40905977d40 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 @@ def configure(self, spec, prefix): 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 8f22bba758082b..68ab65abead2f5 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 8678271714eec1..1709bc3a18398e 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-params-util/package.py b/var/spack/repos/builtin/packages/perl-params-util/package.py index 55281d4775fd20..e56f1a3cd92ac4 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-parse-recdescent/package.py b/var/spack/repos/builtin/packages/perl-parse-recdescent/package.py index 491b8f42f6c038..90e87a4dc29a74 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-path-tiny/package.py b/var/spack/repos/builtin/packages/perl-path-tiny/package.py index ec90934c53b064..19fbc6ba700ca1 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-proc-processtable/package.py b/var/spack/repos/builtin/packages/perl-proc-processtable/package.py index efc7faaa40b2f5..7b133d55a4e6fc 100644 --- a/var/spack/repos/builtin/packages/perl-proc-processtable/package.py +++ b/var/spack/repos/builtin/packages/perl-proc-processtable/package.py @@ -18,4 +18,6 @@ class PerlProcProcesstable(PerlPackage): version("0.636", sha256="944224ffb00fc1ef35069633770a0afda8623b5c7532d1e4ab48a9df394890fd") + 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-sereal-decoder/package.py b/var/spack/repos/builtin/packages/perl-sereal-decoder/package.py index 000887a6bee4ae..74d9b3c705a767 100644 --- a/var/spack/repos/builtin/packages/perl-sereal-decoder/package.py +++ b/var/spack/repos/builtin/packages/perl-sereal-decoder/package.py @@ -18,6 +18,8 @@ class PerlSerealDecoder(PerlPackage): 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")) diff --git a/var/spack/repos/builtin/packages/perl-sereal-encoder/package.py b/var/spack/repos/builtin/packages/perl-sereal-encoder/package.py index 6c27d95527f033..891d6171872411 100644 --- a/var/spack/repos/builtin/packages/perl-sereal-encoder/package.py +++ b/var/spack/repos/builtin/packages/perl-sereal-encoder/package.py @@ -18,6 +18,8 @@ class PerlSerealEncoder(PerlPackage): 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")) 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 aa788637b0a93e..fa45c04a00cf4b 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-sort-naturally/package.py b/var/spack/repos/builtin/packages/perl-sort-naturally/package.py new file mode 100644 index 00000000000000..a4ba950b05fb47 --- /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-string-approx/package.py b/var/spack/repos/builtin/packages/perl-string-approx/package.py index aa25c0bf84dd4e..9d41cbc7880fcf 100644 --- a/var/spack/repos/builtin/packages/perl-string-approx/package.py +++ b/var/spack/repos/builtin/packages/perl-string-approx/package.py @@ -15,3 +15,5 @@ class PerlStringApprox(PerlPackage): 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 index dbe2eced521b28..7b7a544329c7de 100644 --- a/var/spack/repos/builtin/packages/perl-string-crc32/package.py +++ b/var/spack/repos/builtin/packages/perl-string-crc32/package.py @@ -17,3 +17,5 @@ class PerlStringCrc32(PerlPackage): 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-sub-exporter/package.py b/var/spack/repos/builtin/packages/perl-sub-exporter/package.py index b559099b9980aa..e22b2790cf6e6d 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-swissknife/package.py b/var/spack/repos/builtin/packages/perl-swissknife/package.py index 33ff9f59510715..9d44c199431d94 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 @@ 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 a3a7a682293083..e5445de3bb5436 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-readline-gnu/package.py b/var/spack/repos/builtin/packages/perl-term-readline-gnu/package.py index 80ec3394a8c96e..a14da8ac593583 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-test-output/package.py b/var/spack/repos/builtin/packages/perl-test-output/package.py index 1c4024933e3458..f17327ee22350d 100644 --- a/var/spack/repos/builtin/packages/perl-test-output/package.py +++ b/var/spack/repos/builtin/packages/perl-test-output/package.py @@ -13,6 +13,7 @@ class PerlTestOutput(PerlPackage): 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-warnings/package.py b/var/spack/repos/builtin/packages/perl-test-warnings/package.py index 27a4f34048f96b..62e16d23f1314b 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-text-csv/package.py b/var/spack/repos/builtin/packages/perl-text-csv/package.py index 8cc0254d8c10f0..9f8f3e3f369c2b 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-timedate/package.py b/var/spack/repos/builtin/packages/perl-timedate/package.py index 8049cfe27cad14..d698a1630dcf04 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 f8410200cd521b..146b7260b13f1e 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-xml-hash-xs/package.py b/var/spack/repos/builtin/packages/perl-xml-hash-xs/package.py index dce4b09c55b6ce..06f1dd0ed58def 100644 --- a/var/spack/repos/builtin/packages/perl-xml-hash-xs/package.py +++ b/var/spack/repos/builtin/packages/perl-xml-hash-xs/package.py @@ -17,3 +17,5 @@ class PerlXmlHashXs(PerlPackage): 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 be125ef471fbf9..c789f96409e245 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 d096df2d5af09f..c16a3c83f89c19 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 86e2027e0fc25e..f199fd8073bb4e 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 @@ def configure_args(self): 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-yaml-libyaml/package.py b/var/spack/repos/builtin/packages/perl-yaml-libyaml/package.py index 9b2276c4cc3d5c..0e37d54ab13d53 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 index 0b1e74eecd48b8..a58c078a9b44b0 100644 --- a/var/spack/repos/builtin/packages/perl-yaml-syck/package.py +++ b/var/spack/repos/builtin/packages/perl-yaml-syck/package.py @@ -18,4 +18,6 @@ class PerlYamlSyck(PerlPackage): 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 ff16227d1ce180..2246a6ea9a8707 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -3,14 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -# -# Author: Milton Woods -# Date: March 22, 2017 -# Author: George Hartzell -# Date: July 21, 2016 -# Author: Justin Too -# Date: September 6, 2015 -# import os import re import sys @@ -35,89 +27,147 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package 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 diff --git a/var/spack/repos/builtin/packages/pestpp/package.py b/var/spack/repos/builtin/packages/pestpp/package.py index e99dba98de137b..f4b0c5a75adbd1 100644 --- a/var/spack/repos/builtin/packages/pestpp/package.py +++ b/var/spack/repos/builtin/packages/pestpp/package.py @@ -20,6 +20,10 @@ class Pestpp(CMakePackage): 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 188c6d432e4138..1dd72a24dd9edb 100644 --- a/var/spack/repos/builtin/packages/petaca/package.py +++ b/var/spack/repos/builtin/packages/petaca/package.py @@ -35,6 +35,9 @@ class Petaca(CMakePackage): 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/package.py b/var/spack/repos/builtin/packages/petsc/package.py index eaa55d63eaf104..0a0d61da856919 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,6 +23,13 @@ class Petsc(Package, CudaPackage, ROCmPackage): tags = ["e4s"] version("main", branch="main") + 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") @@ -89,6 +98,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") @@ -175,6 +188,16 @@ 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( @@ -245,6 +268,7 @@ def check_fortran_compiler(self): depends_on("hip", when="+rocm") with when("+rocm"): + depends_on("rocm-core") depends_on("hipblas") depends_on("hipsparse") depends_on("hipsolver") @@ -255,10 +279,11 @@ def check_fortran_compiler(self): 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") @@ -515,7 +540,7 @@ def configure_options(self): True, ), ("hdf5" + hdf5libs, "hdf5", True, True), - "zlib", + ("zlib-api", "zlib", True, True), "mumps", ("trilinos", "trilinos", False, False), ("fftw:mpi", "fftw", True, True), @@ -594,7 +619,7 @@ def configure_options(self): 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"]) @@ -612,6 +637,10 @@ def configure_options(self): 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) @@ -686,8 +715,9 @@ def setup_build_tests(self): 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/package.py b/var/spack/repos/builtin/packages/pexsi/package.py index 9b7191ef00195d..04d1350d5e2aba 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,10 @@ 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") @@ -90,7 +91,7 @@ def edit(self, pkg, spec, prefix): 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: diff --git a/var/spack/repos/builtin/packages/pfapack/package.py b/var/spack/repos/builtin/packages/pfapack/package.py index a86549949c2f0f..bcc5a875942d89 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 4a9796067f8b94..f2545593b51e49 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 f7831f61403bd5..392edadf6719de 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 8b118cc3aa85df..7271a1b94696ea 100644 --- a/var/spack/repos/builtin/packages/pflogger/package.py +++ b/var/spack/repos/builtin/packages/pflogger/package.py @@ -22,6 +22,7 @@ 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") @@ -37,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", diff --git a/var/spack/repos/builtin/packages/pflotran/package.py b/var/spack/repos/builtin/packages/pflotran/package.py index 71ff9d1b94c615..8d5330406745c8 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 @@ def build(self, spec, prefix): 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 ad459bdd47e869..0ad50d8a486c0e 100644 --- a/var/spack/repos/builtin/packages/pfunit/package.py +++ b/var/spack/repos/builtin/packages/pfunit/package.py @@ -78,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", diff --git a/var/spack/repos/builtin/packages/pgi/detection_test.yaml b/var/spack/repos/builtin/packages/pgi/detection_test.yaml index 1a4745fc4c2d42..ec6268282ea7f2 100644 --- a/var/spack/repos/builtin/packages/pgi/detection_test.yaml +++ b/var/spack/repos/builtin/packages/pgi/detection_test.yaml @@ -9,3 +9,25 @@ paths: platforms: [linux] results: - spec: pgi@15.10 + +- layout: + - executables: + - bin/pgcc + script: | + echo "pgcc 17.4-0 linuxpower target on Linuxpower" + echo "PGI Compilers and Tools" + echo "Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved." + platforms: [linux] + results: + - spec: pgi@17.4 + +- layout: + - executables: + - bin/pgcc + script: | + echo "pgcc-llvm 18.4-0 LLVM 64-bit target on x86-64 Linux -tp haswell" + echo "PGI Compilers and Tools" + echo "Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved." + platforms: [linux] + results: + - spec: pgi@18.4 diff --git a/var/spack/repos/builtin/packages/pgplot/package.py b/var/spack/repos/builtin/packages/pgplot/package.py index 4821370345a7c8..f3204fc95fa00d 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/phast/package.py b/var/spack/repos/builtin/packages/phast/package.py index 5626a79f6924fb..4e35bc6d1c923d 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 6cf303420c2260..8ffb91f89bb93f 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 d96c72a858eba6..da926898e8c086 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 @@ -321,6 +331,7 @@ def check(self): @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 ce86f30fe22f65..3abeb512459893 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 ea07db9e107393..2ee8af60cf3887 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 14534795420b4d..ecfbab83733d74 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 441fe3af7bb464..6de2f97c2b891d 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 @@ def patch(self): 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 similarity index 100% rename from var/spack/repos/builtin/packages/php/sbang.patch rename to 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 00000000000000..c9afec864a3ba9 --- /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' => ' 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' => ' 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"; ++ } + $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 1ff3894d8b349d..8cd32e1c22f5b7 100644 --- a/var/spack/repos/builtin/packages/phylobayesmpi/package.py +++ b/var/spack/repos/builtin/packages/phylobayesmpi/package.py @@ -18,6 +18,8 @@ class Phylobayesmpi(MakefilePackage): 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/picsar/package.py b/var/spack/repos/builtin/packages/picsar/package.py index 522551fa1cb345..bfc36739152af2 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 79e6fd58e2114b..98365c4f42620e 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 b9f0fa4f9ce551..e16cb06af670bf 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 92b1084d53931e..bad604900e3494 100644 --- a/var/spack/repos/builtin/packages/pigz/package.py +++ b/var/spack/repos/builtin/packages/pigz/package.py @@ -21,6 +21,8 @@ class Pigz(MakefilePackage): 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 3442ff8aba46b1..b96ab2c764743a 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 549906ddf1e09b..f5fe4b9727acfb 100644 --- a/var/spack/repos/builtin/packages/pika/package.py +++ b/var/spack/repos/builtin/packages/pika/package.py @@ -19,6 +19,12 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): license("BSL-1.0") + 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") @@ -49,8 +55,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", @@ -59,11 +70,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 @@ -86,6 +98,7 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): 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, @@ -94,7 +107,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") @@ -105,6 +117,8 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): conflicts("%clang@:8", when="@0.2:") conflicts("+stdexec", when="cxxstd=17") conflicts("cxxstd=23", when="^cmake@:3.20.2") + 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): requires("%nvhpc", when=f"cxxstd={cxxstd} ^cuda@:11") @@ -115,19 +129,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") @@ -135,6 +161,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}") @@ -185,6 +213,7 @@ def cmake_args(self): 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"), @@ -194,6 +223,7 @@ def cmake_args(self): 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 a25737b242119e..9a9189b853f349 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 484228f4986711..f43ae2c1224b93 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 c2d75e94134cad..d4d987676633c2 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,12 +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", @@ -52,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") @@ -90,17 +94,24 @@ def configure_args(self): 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 39b66c9ee71f5e..62e5e06875d87e 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 8ae15b3d82d947..19a5fd97632cbb 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 641e985ddb5f6d..d7c7be75be77ca 100644 --- a/var/spack/repos/builtin/packages/pism/package.py +++ b/var/spack/repos/builtin/packages/pism/package.py @@ -9,7 +9,7 @@ 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 2d15deb69e83ef..103e8702e275a7 100644 --- a/var/spack/repos/builtin/packages/pixman/package.py +++ b/var/spack/repos/builtin/packages/pixman/package.py @@ -13,7 +13,7 @@ class Pixman(AutotoolsPackage): 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") @@ -26,6 +26,8 @@ class Pixman(AutotoolsPackage): version("0.34.0", sha256="21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e") version("0.32.6", sha256="3dfed13b8060eadabf0a4945c7045b7793cc7e3e910e748a8bb0f0dc3e794904") + depends_on("c", type="build") # generated + depends_on("pkgconfig", type="build") depends_on("flex", type="build") depends_on("bison@3:", type="build") @@ -68,7 +70,7 @@ def libs(self): ) 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"] @@ -79,7 +81,6 @@ def configure_args(self): if self.spec.target.family == "aarch64": args.append("--disable-arm-a64-neon") - args.extend(self.enable_or_disable("shared")) args.extend(self.with_or_without("pic")) png = self.spec["libpng"] @@ -92,4 +93,6 @@ def configure_args(self): 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 932128da273b4b..e4b91b99d98e3a 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 82cd66f78eca54..d2f51bf11d0488 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") @@ -53,17 +55,18 @@ def setup_dependent_build_environment(self, env, dependent_spec): 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") - c_name = self.spec.compiler.name - if "oneapi" in c_name or "cce" in c_name: - # Don't treat int-conversion warning as error with oneapi and cce. - config_args.append("CFLAGS=-Wno-error=int-conversion") + 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 3447a6bfd48c32..39f3b198e0d2d4 100644 --- a/var/spack/repos/builtin/packages/pkgconf/package.py +++ b/var/spack/repos/builtin/packages/pkgconf/package.py @@ -33,6 +33,8 @@ 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 diff --git a/var/spack/repos/builtin/packages/pktools/package.py b/var/spack/repos/builtin/packages/pktools/package.py index 59c2d1ef234f83..131911892e700b 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 7315b7f9e25df4..30629a7ec3a74e 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 @@ def install(self, spec, prefix): 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 @@ def install(self, spec, prefix): "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 1ff83f62011ea6..1d5e46b272b58a 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:"), diff --git a/var/spack/repos/builtin/packages/plink2/package.py b/var/spack/repos/builtin/packages/plink2/package.py index f1c2b439cf551c..498ef092b018cb 100644 --- a/var/spack/repos/builtin/packages/plink2/package.py +++ b/var/spack/repos/builtin/packages/plink2/package.py @@ -11,9 +11,20 @@ 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="^[virtuals=zlib-api] zlib") diff --git a/var/spack/repos/builtin/packages/ploticus/package.py b/var/spack/repos/builtin/packages/ploticus/package.py index c473a926dd2e1d..dc2b0345777433 100644 --- a/var/spack/repos/builtin/packages/ploticus/package.py +++ b/var/spack/repos/builtin/packages/ploticus/package.py @@ -9,12 +9,14 @@ 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 1035a45d254590..4e3d148399152e 100644 --- a/var/spack/repos/builtin/packages/plplot/package.py +++ b/var/spack/repos/builtin/packages/plplot/package.py @@ -9,7 +9,7 @@ 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 df734349c11549..2c7fa8de66ea1f 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 @@ def filter_gslcblas(self): 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 fde3b9787fc1ef..19c74c75d80c5b 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 ab6728754fd2dd..033e833d7a0b65 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 73d4cf99ab99b5..1c097540031486 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 5262493d5437e6..ce51a38c7445d7 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 2f8b0f1246f252..99d862a789b2a2 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 99850782780912..c1b41a78ac7065 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 @@ def find_external_lib_path(self, pkg_name, path_match_str=""): 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 @@ def configure_args(self): 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 2ff509ad0084f8..01fd746cf53dd0 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 e3d765f8cb2f4c..ae7530cabd2603 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 4d58346a98ba9b..1cbfd086586492 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 84bb9b3c38a5a4..e11fb3f121be96 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 331ca93767aeb5..c875fd9070a0df 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 1193865c68e669..cf9deefd35ecf7 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 da8ad4e6a69318..9e6035a5e26b5f 100644 --- a/var/spack/repos/builtin/packages/pocl/package.py +++ b/var/spack/repos/builtin/packages/pocl/package.py @@ -15,13 +15,13 @@ 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("3.0", sha256="a3fd3889ef7854b90b8e4c7899c5de48b7494bf770e39fba5ad268a5cbcc719d") version("1.8", sha256="0f63377ae1826e16e90038fc8e7f65029be4ff6f9b059f6907174b5c0d1f8ab2") version("1.7", sha256="5f6bbc391ba144bc7becc3b90888b25468460d5aa6830f63a3b066137e7bfac3") @@ -33,6 +33,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 @@ -44,7 +47,7 @@ class Pocl(CMakePackage): 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") @@ -77,7 +80,7 @@ def url_for_version(self, version): 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 e685f9bc13dc94..00000000000000 --- 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 15ec301b13984b..00000000000000 --- 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 0b57d533218379..8b76e75f998187 100644 --- a/var/spack/repos/builtin/packages/podio/package.py +++ b/var/spack/repos/builtin/packages/podio/package.py @@ -20,6 +20,9 @@ class Podio(CMakePackage): tags = ["hep", "key4hep"] version("master", branch="master") + version("1.1", sha256="2cb5040761f3da4383e1f126da25d68e99ecd8398e0ff12e7475a3745a7030a6") + version("1.0.1", sha256="915531a2bcf638011bb6cc19715bbc46d846ec8b985555a1afdcd6abc017e21b") + version("1.0", sha256="491f335e148708e387e90e955a6150e1fc2e01bf6b4980b65e257ab0619559a9") version("0.99", sha256="c823918a6ec1365d316e0a753feb9d492e28903141dd124a1be06efac7c1877a") version( "0.17.4", @@ -66,86 +69,8 @@ class Podio(CMakePackage): 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", - deprecated=True, - ) - version( - "0.13.2", - sha256="645f6915ca6f34789157c0a9dc8b0e9ec901e019b96eb8a68fb39011602e92eb", - deprecated=True, - ) - version( - "0.13.1", - sha256="2ae561c2a0e46c44245aa2098772374ad246c9fcb1956875c95c69c963501353", - deprecated=True, - ) - version( - "0.13", - sha256="e9cbd4e25730003d3706ad82e28b15cb5bdc524a78b0a26e90b89ea852101498", - deprecated=True, - ) - version( - "0.12", - sha256="1729a2ce21e8b307fc37dfb9a9f5ae031e9f4be4992385cf99dba3e5fdf5323a", - deprecated=True, - ) - version( - "0.11", - sha256="4b2765566a14f0ddece2c894634e0a8e4f42f3e44392addb9110d856f6267fb6", - deprecated=True, - ) - version( - "0.10", - sha256="b5b42770ec8b96bcd2748abc05669dd3e4d4cc84f81ed57d57d2eda1ade90ef2", - deprecated=True, - ) - version( - "0.9.2", - sha256="8234d1b9636029124235ef81199a1220968dcc7fdaeab81cdc96a47af332d240", - deprecated=True, - ) - version( - "0.9", - sha256="3cde67556b6b76fd2d004adfaa3b3b6173a110c0c209792bfdb5f9353e21076f", - deprecated=True, - ) - version( - "0.8", - sha256="9d035a7f5ebfae5279a17405003206853271af692f762e2bac8e73825f2af327", - deprecated=True, - ) + + depends_on("cxx", type="build") # generated variant( "cxxstd", @@ -156,13 +81,15 @@ 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.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"): @@ -171,39 +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"), when="@0.16.3:") + 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 06d14c6e61a711..00000000000000 --- 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:$ - 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 bbc739a3627657..1d39221de54a20 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 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 f9e24428ea2676..a3dbde71a1de4d 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 8fe14258749b3f..c8933eace7291f 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 00000000000000..658dbf3a6e3c5b --- /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 00000000000000..ac03c796765c23 --- /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 b71c5b30ff54fc..09d6ab47cfdde5 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 75cd3a348d4229..97f6ed023a6b66 100644 --- a/var/spack/repos/builtin/packages/popt/package.py +++ b/var/spack/repos/builtin/packages/popt/package.py @@ -9,15 +9,24 @@ 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 f4108565580a26..971ee1388e0ad4 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 7944a6ea355ca2..95df2d493ae665 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 699f4007ccf2e4..2ba749532b2e2f 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/postgis/package.py b/var/spack/repos/builtin/packages/postgis/package.py index 5fe76b8889d2cc..5bc68169291e5b 100644 --- a/var/spack/repos/builtin/packages/postgis/package.py +++ b/var/spack/repos/builtin/packages/postgis/package.py @@ -22,6 +22,9 @@ class Postgis(AutotoolsPackage): 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 fc13e3e1d521f0..3dafdc5ecd0c15 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 @@ def command(self): 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 @@ def install(self, spec, prefix): 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 d77bafd9d5cf9e..e2ce62d7d1643e 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 @@ def configure_args(self): # 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 @@ def configure_args(self): 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 @@ def configure_args(self): 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 9943a94d5a3d39..02bc31c81eac34 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 c0c918b11c90f6..72cc2a26a63d2f 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 17000ee5ba5064..1ce03db9af11c7 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 5fae5b5269dc24..ebeac298347541 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 20e2d01f6c6dda..6d26c656c6127b 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 afe2c21e92ff1c..235f3c308d187f 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 a61f9c9de897f3..2c35211ecb7a45 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 c9aa471a1d56dc..7199b196882620 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 2286b3f5cc50b7..a1036df34794d8 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 903254e683d556..9637d6b265c880 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 685d3ba3766630..cce600e0ef490d 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 5f7e964d12e4f4..dbe294a81588de 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 c9ff21b6660b0e..eb32035682de04 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 a04576cb487994..2a1c8376679671 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 6426fa51f31cb0..2c1db9878fd8d5 100644 --- a/var/spack/repos/builtin/packages/precice/package.py +++ b/var/spack/repos/builtin/packages/precice/package.py @@ -23,6 +23,7 @@ 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") @@ -46,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") diff --git a/var/spack/repos/builtin/packages/predixy/package.py b/var/spack/repos/builtin/packages/predixy/package.py index 834cdf2b52d798..6a9bb0a605ece1 100644 --- a/var/spack/repos/builtin/packages/predixy/package.py +++ b/var/spack/repos/builtin/packages/predixy/package.py @@ -20,6 +20,8 @@ class Predixy(MakefilePackage): 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 6bd9c53ba9b33b..c072adba3caf46 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 60a6dd20bd6157..811e262cf96900 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/price/package.py b/var/spack/repos/builtin/packages/price/package.py index 80941a12800fbb..248a3bd74439c1 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 8bee8d75294a98..c763db1555ae73 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 0737bb4a37d33a..97c22661cf31a5 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 080e387c9b26b8..ffa2b155f2e400 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 c194c1d975a25e..179a2a74a1abbb 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 b3d039283f69f2..5bba9faa042df6 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 6353022a160fb0..c0231f5e47ae06 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 b4be9e38627669..6df01c967def7c 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 283fd52064091a..e2775ea78fc1b3 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 e66376242f7a91..25624f8ea307d2 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 @@ 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 642aea70b1050e..55ee0c554be9fe 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") diff --git a/var/spack/repos/builtin/packages/prod-util/package.py b/var/spack/repos/builtin/packages/prod-util/package.py index 75764879d5fbfb..e7c5b37485713b 100644 --- a/var/spack/repos/builtin/packages/prod-util/package.py +++ b/var/spack/repos/builtin/packages/prod-util/package.py @@ -21,8 +21,17 @@ class ProdUtil(CMakePackage): 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("w3emc") + 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.builder.build_directory): diff --git a/var/spack/repos/builtin/packages/prodigal/package.py b/var/spack/repos/builtin/packages/prodigal/package.py index 1c670bd973077f..6d7693d10b6cac 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 b021c7e9571345..7848bfcafb3d21 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 18cc276502e44a..6347665a1a71a2 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 633ca182f8dbb0..d9ed3ef11d8403 100644 --- a/var/spack/repos/builtin/packages/proj/package.py +++ b/var/spack/repos/builtin/packages/proj/package.py @@ -25,6 +25,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 +45,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 +60,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, + ) + + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated - variant("tiff", default=True, description="Enable TIFF support") - variant("curl", default=True, description="Enable curl support") + 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)") @@ -87,16 +110,16 @@ class Proj(CMakePackage, AutotoolsPackage): 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"): - # CMake 3.19 refactored the FindTiff module interface, update older proj's - # to be compatible with this "new" interface - # patch replaces the TIFF_LIBRARY variable (no longer used) with TIFF_LIBRARIES - patch("proj-8.1-cmake-3.29-new-tiff-interface.patch", when="+tiff @:9.1.0 ^cmake@3.19:") - conflicts("cmake@3.19:", when="@:7") + # 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") @@ -138,6 +161,8 @@ def cmake_args(self): self.define_from_variant("ENABLE_TIFF", "tiff"), self.define_from_variant("ENABLE_CURL", "curl"), 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: 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 00000000000000..d6597a3e933675 --- /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 00000000000000..e223d860c96b26 --- /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/proj/proj-8.1-cmake-3.29-new-tiff-interface.patch b/var/spack/repos/builtin/packages/proj/proj-8.1-cmake-3.29-new-tiff-interface.patch deleted file mode 100644 index d278029aedf991..00000000000000 --- a/var/spack/repos/builtin/packages/proj/proj-8.1-cmake-3.29-new-tiff-interface.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake -index f2de1c10..a5697608 100644 ---- a/src/lib_proj.cmake -+++ b/src/lib_proj.cmake -@@ -405,7 +405,7 @@ endif() - 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}) -+ target_link_libraries(proj PRIVATE ${TIFF_LIBRARIES}) - endif() - - if(CURL_ENABLED) diff --git a/var/spack/repos/builtin/packages/prometheus/package.py b/var/spack/repos/builtin/packages/prometheus/package.py index 7b0f0fdb53f970..3e6c8baab10b03 100644 --- a/var/spack/repos/builtin/packages/prometheus/package.py +++ b/var/spack/repos/builtin/packages/prometheus/package.py @@ -21,6 +21,8 @@ class Prometheus(MakefilePackage): 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") diff --git a/var/spack/repos/builtin/packages/prophecy4f/package.py b/var/spack/repos/builtin/packages/prophecy4f/package.py index 4e9ce114ed09ce..be8ac6ed48af41 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 86f590b52589f7..953026c6fe4186 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 035eab572a922d..2ab08b01ff0195 100644 --- a/var/spack/repos/builtin/packages/protobuf/package.py +++ b/var/spack/repos/builtin/packages/protobuf/package.py @@ -16,6 +16,9 @@ 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") @@ -77,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", @@ -110,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", + "https://github.com/protocolbuffers/protobuf/commit/462964ed322503af52638d54c00a0a67d7133349.patch?full_index=1", when="@3.4:3.21", - sha256="cefc4bf4aadf9ca33a336b2aa6d0d82006b6563e85122ae8cfb70345f85321dd", + 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 30c8f5e73f1b81..1563fbeb0e25df 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 e233a5102df0b6..c882188f0f78b3 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 931eac995110be..f91ca34dc94f8e 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 84360da87822ad..cdc2a111099bbf 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 295f38b21ab277..be4bfc751182d8 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 03b08534d770eb..0e8b321630551d 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 497adbf65a20f2..b1ff4187fd262b 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 index e8f83999da111d..86fefdc6792154 100644 --- a/var/spack/repos/builtin/packages/psipred/package.py +++ b/var/spack/repos/builtin/packages/psipred/package.py @@ -19,6 +19,8 @@ class Psipred(MakefilePackage): 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") diff --git a/var/spack/repos/builtin/packages/pslib/package.py b/var/spack/repos/builtin/packages/pslib/package.py index 99031d78e792e8..7b591f60f9785d 100644 --- a/var/spack/repos/builtin/packages/pslib/package.py +++ b/var/spack/repos/builtin/packages/pslib/package.py @@ -9,12 +9,14 @@ 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 5946f552d1c85a..992ff39fa5fc37 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 2398433563c52b..2ab456639f6d23 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 df8cb88bd4e339..087f7410da63f3 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 f96a70cbd51f41..5298872bc01319 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 00000000000000..e2d3d62e70a579 --- /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 2fc2bdaa901188..21e69832bde3ab 100644 --- a/var/spack/repos/builtin/packages/pstreams/package.py +++ b/var/spack/repos/builtin/packages/pstreams/package.py @@ -10,7 +10,7 @@ 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 64f190e4d0aa07..5ccb439496af0a 100644 --- a/var/spack/repos/builtin/packages/pthreadpool/package.py +++ b/var/spack/repos/builtin/packages/pthreadpool/package.py @@ -15,7 +15,7 @@ class Pthreadpool(CMakePackage): license("BSD-2-Clause") version("master", branch="master") - version("2023-08-29", commit="4fe0e1e183925bf8cfa6aae24237e724a96479b8") # py-torch@2.2 + 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 @@ -23,6 +23,9 @@ class Pthreadpool(CMakePackage): 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") @@ -51,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") @@ -60,6 +62,10 @@ def cmake_args(self): "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 3cb7ae0e64c48f..dab9c1aa8a28ff 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 a8056319fcc28e..81e6db06b456ff 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 f06b0078336178..a2ce76b27ce621 100644 --- a/var/spack/repos/builtin/packages/pumi/package.py +++ b/var/spack/repos/builtin/packages/pumi/package.py @@ -45,6 +45,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 +69,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 +119,34 @@ def cmake_args(self): 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 00000000000000..3a2fdc7c7548ad --- /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 81dcbf63a3808e..9168d2177dc4cc 100644 --- a/var/spack/repos/builtin/packages/pv/package.py +++ b/var/spack/repos/builtin/packages/pv/package.py @@ -20,3 +20,5 @@ class Pv(AutotoolsPackage): 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 0000c87e810ff0..d546b4ce9c1bd8 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 dde641f0693699..6c36e5119a8f4b 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 8d49db024c85df..60af37c6faa39d 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 ffb1a78e43ab61..474c4ed2ac4187 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 46f226676a3521..da85b97d062e78 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 be61bec7719cbc..173e6df7e02d0f 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-aiohttp/package.py b/var/spack/repos/builtin/packages/py-aiohttp/package.py index 28fe3f58a33eb6..da787028e38103 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-alive-progress/package.py b/var/spack/repos/builtin/packages/py-alive-progress/package.py index 944dce0a95f557..31c011e687a8e6 100644 --- a/var/spack/repos/builtin/packages/py-alive-progress/package.py +++ b/var/spack/repos/builtin/packages/py-alive-progress/package.py @@ -19,7 +19,7 @@ class PyAliveProgress(PythonPackage): 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("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-altair/package.py b/var/spack/repos/builtin/packages/py-altair/package.py index af10abc209a286..4fcccc48164871 100644 --- a/var/spack/repos/builtin/packages/py-altair/package.py +++ b/var/spack/repos/builtin/packages/py-altair/package.py @@ -9,10 +9,11 @@ class PyAltair(PythonPackage): """Declarative statistical visualization library for Python""" - pypi = "altair/altair-5.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") @@ -23,6 +24,10 @@ class PyAltair(PythonPackage): 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", when="@:4") depends_on("py-entrypoints", type=("build", "run"), when="@2.0.0:4") @@ -30,11 +35,15 @@ class PyAltair(PythonPackage): 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: ^python@:3.10") + 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")) - depends_on("py-pandas@0.18:", type=("build", "run")) - depends_on("py-pandas@0.25:", type=("build", "run"), when="@5.1.0:") - depends_on("py-toolz", 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 7b6bac8e88daf0..731734daa599b1 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 cc9d0c069b6e0f..77f0f3fa823a08 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-amrex/package.py b/var/spack/repos/builtin/packages/py-amrex/package.py index a282b2095c7788..60f8687445d9b6 100644 --- a/var/spack/repos/builtin/packages/py-amrex/package.py +++ b/var/spack/repos/builtin/packages/py-amrex/package.py @@ -3,14 +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.04.tar.gz" + 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") @@ -18,10 +19,25 @@ class PyAmrex(PythonPackage, CudaPackage, ROCmPackage): license("BSD-3-Clause-LBNL") version("develop", branch="development") - version("24.04", sha256="ab85695bb9644b702d0fc84e77205d264d27ba94999cab912c8a3212a7eb77fc") - version("24.03", sha256="bf85b4ad35b623278cbaae2c07e22138545dec0732d15c4ab7c53be76a7f2315") + 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.04", "24.03"]: + 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( @@ -31,6 +47,9 @@ class PyAmrex(PythonPackage, CudaPackage, ROCmPackage): 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( @@ -40,18 +59,22 @@ 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("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-numpy@1.15.0:1", 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.11.1:", type="link") + depends_on("py-pybind11@2.12.0:", type=("build", "link")) + depends_on("py-wheel@0.40:", type="build") # AMReX options # required variants @@ -65,59 +88,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 setup_build_environment(self, env): - spec = self.spec - - # disable superbuilds: use external dependencies - env.set("AMREX_INTERNAL", "OFF") - env.set("PYAMREX_CCACHE", "OFF") - env.set("PYAMREX_IPO", "ON") - env.set("PYBIND11_INTERNAL", "OFF") - - # configure to require the exact AMReX configs provided by Spack - env.set("AMREX_SPACEDIM", ";".join(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 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("install") + @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 test(self): + def test_pytest(self): """Perform smoke tests on the installed package.""" - pytest = which("pytest") - pytest(join_path(install_test_root(self), self.tests_src_dir)) + 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 c1e5da3b2a80d3..4f0babecf5c920 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 00000000000000..f368a9c90c0df1 --- /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 6d65d9ae8cf775..00abc22c0efd8a 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-anuga/package.py b/var/spack/repos/builtin/packages/py-anuga/package.py index bae0e394e88927..97e83db416f160 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 00000000000000..2a6de3f404782d --- /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 00000000000000..d69572cb422631 --- /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 00000000000000..c752127384deb4 --- /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-argcomplete/package.py b/var/spack/repos/builtin/packages/py-argcomplete/package.py index e1b2a57c5ff87e..1340b9b48d82c7 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 fe684841fa0564..e65da55147752a 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-arm-pyart/package.py b/var/spack/repos/builtin/packages/py-arm-pyart/package.py index 433e7298fe6db7..3ed8511fb49e63 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 00000000000000..ade277aac21636 --- /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 d37264f82569b0..c6ba2131f1ec14 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-asdf-standard/package.py b/var/spack/repos/builtin/packages/py-asdf-standard/package.py index e31384bddc81a3..d6dfe2a80cabae 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 7593dae246d10c..d714dbb40940a8 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 @@ 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 cd5ddf25638db8..236d0894a239d7 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 00000000000000..c9aab6fa6c8fac --- /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-asgiref/package.py b/var/spack/repos/builtin/packages/py-asgiref/package.py index 1d2aa90d53756f..cc595f34185ce6 100644 --- a/var/spack/repos/builtin/packages/py-asgiref/package.py +++ b/var/spack/repos/builtin/packages/py-asgiref/package.py @@ -14,6 +14,7 @@ class PyAsgiref(PythonPackage): license("BSD-3-Clause") + version("3.8.1", sha256="c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590") version("3.7.2", sha256="9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed") version("3.5.2", sha256="4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424") version("3.5.0", sha256="2f8abc20f7248433085eda803936d98992f1343ddb022065779f37c5da0181d0") diff --git a/var/spack/repos/builtin/packages/py-astor/package.py b/var/spack/repos/builtin/packages/py-astor/package.py index 8b7703fc7eb5ad..6664b48b429a08 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 35a01f483c544e..68791eed29fe9c 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 bb88d9e98d8ccf..00b2d6a7a2af83 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 00000000000000..06345c0a21728f --- /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 7bb70a8fd9ae8a..b60afb07f285bc 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 6ccaabf25b8c7d..df4549681ba491 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 ac4c4717b365c3..80f38b89ce6179 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 bceb259e2489b1..a37ac3069080d4 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 60530d5c58e5e1..ade9b43b635263 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 66b216c3c00925..85fc947c1eac23 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 c3f76030db69c9..68773c366fbc26 100644 --- a/var/spack/repos/builtin/packages/py-autograd/package.py +++ b/var/spack/repos/builtin/packages/py-autograd/package.py @@ -36,3 +36,5 @@ class PyAutograd(PythonPackage): 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 316596abe3b3c5..b413f91e2823e6 100644 --- a/var/spack/repos/builtin/packages/py-autoray/package.py +++ b/var/spack/repos/builtin/packages/py-autoray/package.py @@ -15,6 +15,9 @@ 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") diff --git a/var/spack/repos/builtin/packages/py-avro/package.py b/var/spack/repos/builtin/packages/py-avro/package.py index d082432f55e037..6598787a917633 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 1f6402633be390..cc149dd981e81f 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 eac61100ab0afa..218c67b60a783d 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 490c99d4a38783..972477c77539eb 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-mgmt-storage/package.py b/var/spack/repos/builtin/packages/py-azure-mgmt-storage/package.py index 5e16d385184efb..9fccff50ac2df2 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 7153b8b926373e..e7b85a8cee7851 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 @@ 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-babel/package.py b/var/spack/repos/builtin/packages/py-babel/package.py index 1c73663fed2e34..c1a56e434b1366 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 00000000000000..c8579d87ac7e2a --- /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 d0fd466db745ef..5539e26a851598 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 546c9e993bb114..cebdb80ab4ce68 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-basemap/package.py b/var/spack/repos/builtin/packages/py-basemap/package.py index b5b4bae220a64e..424d696e460c86 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 9bfbd7839bef94..208f2ff90ab377 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 d2021ea9e066d6..ca94d6cc162b93 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 9c9ec496e849ec..1f9594defb320c 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 2906db7e3b5daa..072a987a733e81 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 00000000000000..cb945a9759c88f --- /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 +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 cae97858e1d599..3274c4357535a4 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 00000000000000..18b75e8b7fae01 --- /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 1044b752920734..83c35e24ae9554 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 8d893290fe5429..1dad47a3c444d4 100644 --- a/var/spack/repos/builtin/packages/py-billiard/package.py +++ b/var/spack/repos/builtin/packages/py-billiard/package.py @@ -20,4 +20,6 @@ class PyBilliard(PythonPackage): 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-biopython/package.py b/var/spack/repos/builtin/packages/py-biopython/package.py index fa3cdeefcc031b..822321ba889c06 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 00000000000000..4d78b7c4432a98 --- /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 00000000000000..e6fd921b115a2d --- /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 47ae50a3dcb8b4..0724fb3b49f252 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 b41636ab2d4fc0..357d9bbabefa66 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 d009d50c4e6b57..d510b7c766a6d0 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-blis/package.py b/var/spack/repos/builtin/packages/py-blis/package.py index e2a158a11e054d..46108428b26ac3 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 7d6b26ac6fcd19..ddd2f55732d292 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 238a963f362218..30964085df71a7 100644 --- a/var/spack/repos/builtin/packages/py-blosc2/package.py +++ b/var/spack/repos/builtin/packages/py-blosc2/package.py @@ -14,18 +14,19 @@ 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") # generated + 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("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")) 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 00000000000000..79d175cec449e7 --- /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-bokeh/package.py b/var/spack/repos/builtin/packages/py-bokeh/package.py index 8f79fb16c921c2..1384201b2dbe76 100644 --- a/var/spack/repos/builtin/packages/py-bokeh/package.py +++ b/var/spack/repos/builtin/packages/py-bokeh/package.py @@ -46,6 +46,8 @@ class PyBokeh(PythonPackage): 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:") 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 bd743760411a8e..4dff0fc12efb96 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-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py index 334975f9e19413..82599607ff3702 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 00000000000000..6da0bfbfc7ccb2 --- /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 00000000000000..28381e6f95dcb1 --- /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-breathe/package.py b/var/spack/repos/builtin/packages/py-breathe/package.py index 8bc1fc6db7910f..2b1b515fdd3c42 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 4b7888e3f5f7ee..32bf478f930ef4 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 911377cd8a36bf..b57f9f17951861 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 eece9c58daf1cc..49c91d980f6494 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 8cb3c407b3ad25..d526fb37c1377a 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 97db040831b86f..d13d3e149ebb5a 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 6d67ad3c077888..85a738316ce7a5 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 e37f48f4f77824..a96821f349302c 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-caliper-reader/package.py b/var/spack/repos/builtin/packages/py-caliper-reader/package.py new file mode 100644 index 00000000000000..018736812a30d4 --- /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 8e6ecf335dfc6f..00bfde67ce3916 100644 --- a/var/spack/repos/builtin/packages/py-carputils/package.py +++ b/var/spack/repos/builtin/packages/py-carputils/package.py @@ -19,6 +19,7 @@ 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") @@ -29,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")) diff --git a/var/spack/repos/builtin/packages/py-cartopy/package.py b/var/spack/repos/builtin/packages/py-cartopy/package.py index 941996aa09a76c..836a28b78981d9 100644 --- a/var/spack/repos/builtin/packages/py-cartopy/package.py +++ b/var/spack/repos/builtin/packages/py-cartopy/package.py @@ -10,13 +10,14 @@ 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") @@ -32,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", @@ -42,7 +45,9 @@ class PyCartopy(PythonPackage): # Based on wheel availability on PyPI with default_args(type=("build", "link", "run")): - depends_on("python@3.9:3.12", when="@0.23:") + 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") @@ -62,23 +67,28 @@ class PyCartopy(PythonPackage): depends_on("py-setuptools-scm", when="@0.19:") with default_args(type=("build", "link", "run")): - depends_on("py-numpy@1.21:", when="@0.23:") - depends_on("py-numpy@1.21:1", when="@0.22") - depends_on("py-numpy@1.18:1", when="@0.20:21") - depends_on("py-numpy@1.13.3:1", when="@0.19") - depends_on("py-numpy@1.10:1", when="@0.17:0.18") - depends_on("py-numpy@1.6:1", when="@0.16") + 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:") @@ -90,15 +100,19 @@ class PyCartopy(PythonPackage): 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:") @@ -123,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 f4f47b771c8dd1..0239dd4acae334 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-cellprofiler-core/package.py b/var/spack/repos/builtin/packages/py-cellprofiler-core/package.py new file mode 100644 index 00000000000000..f7729b8540754d --- /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 00000000000000..8c3010cce1ed64 --- /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 00000000000000..f89c66d71f234a --- /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 8638fb94804643..d303c66f0b839f 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-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py index a413a07e7d762a..6f312fd942fdf1 100644 --- a/var/spack/repos/builtin/packages/py-cffi/package.py +++ b/var/spack/repos/builtin/packages/py-cffi/package.py @@ -16,6 +16,8 @@ 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") @@ -26,20 +28,34 @@ class PyCffi(PythonPackage): version("1.10.0", sha256="b3b02911eb1f6ada203b0763ba924234629b51586f72a21faacc638269f4ced5") version("1.1.2", sha256="390970b602708c91ddc73953bb6929e56291c18a4d80f360afa00fad8b6f3339") + depends_on("c", type="build") # generated + # ./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")) + + # python 3.12 support was released in @1.16:, however the removal + # in python3.12 of distutils has resulted in an imperfect fix for prefix-based + # tools like spack, see: + # https://github.com/spack/spack/pull/46224 + # https://github.com/cython/cython/pull/5754#issuecomment-1752102480 + # until this is correctly fixed, do not enable 3.12 support + # depends_on("python@:3.12", type=("build", "run"), when="@1.16:") + depends_on("pkgconfig", type="build") depends_on("py-setuptools", type="build") + depends_on("py-setuptools@66.1:", type="build", when="@1.16:") depends_on("py-pycparser", type=("build", "run")) depends_on("libffi") - # Fix a bug in setup.py: on macOS, extra compiler flags - # extra_compile_args += ['-iwithsysroot/usr/include/ffi'] - # are added as a fallback to SDK's libffi, but this only - # works with "gcc" being clang, not with gnu gcc - patch("macos_gnu.patch", when="platform=darwin %gcc") + # 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:"): diff --git a/var/spack/repos/builtin/packages/py-cfgrib/package.py b/var/spack/repos/builtin/packages/py-cfgrib/package.py index e0f3ed0269e600..c091dc3c0a6dff 100644 --- a/var/spack/repos/builtin/packages/py-cfgrib/package.py +++ b/var/spack/repos/builtin/packages/py-cfgrib/package.py @@ -15,6 +15,7 @@ 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") @@ -29,8 +30,11 @@ class PyCfgrib(PythonPackage): depends_on("py-eccodes", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) - depends_on("py-xarray@0.15:", when="@0.9.10:+xarray", type=("build", "run")) - depends_on("py-xarray@0.12:", 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") diff --git a/var/spack/repos/builtin/packages/py-cftime/package.py b/var/spack/repos/builtin/packages/py-cftime/package.py index 7bc37434c1603e..7c343d92a3c44c 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 a1ab6819a13684..538a5604f71ce2 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,14 +52,14 @@ 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", python.path, mnist_file, "-o", "."] env["OMP_NUM_THREADS"] = "4" 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 00000000000000..2734f053d39ee2 --- /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-cheetah3/package.py b/var/spack/repos/builtin/packages/py-cheetah3/package.py index 373ae463f41781..2c387534fe64ac 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 5cb22d838e08df..ee03273c34e27d 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 b2dcfa5ee9620a..feef3a4a224aa3 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,26 +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.9:", type=("build", "run"), when="@0.1.85:") - depends_on("py-setuptools", type="build") - depends_on("py-absl-py@0.9.0:", type=("build", "run")) - depends_on("py-typing-extensions@4.2:", type=("build", "run"), when="@0.1.85:") - depends_on("py-jax@0.4.16:", type=("build", "run"), when="@0.1.85:") - 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.24.1:", type=("build", "run"), when="@0.1.85:") - depends_on("py-numpy@1.18.0:", type=("build", "run")) - depends_on("py-setuptools", type=("build", "run"), when="@0.1.85: ^python@3.12:") - depends_on("py-toolz@0.9.0:", type=("build", "run")) - - # Historical dependencies - depends_on("py-dm-tree@0.1.5:", type=("build", "run"), when="@:0.1.5") - # 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") + + 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 index 07a77f84c7523b..7058481de61505 100644 --- a/var/spack/repos/builtin/packages/py-cig-pythia/package.py +++ b/var/spack/repos/builtin/packages/py-cig-pythia/package.py @@ -25,6 +25,9 @@ class PyCigPythia(AutotoolsPackage, PythonExtension): 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") 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 00000000000000..283adbfeea71c2 --- /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 044f472b7d0887..5627cbafb9afeb 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 c97016e15a26ed..3d0ec8d7613664 100644 --- a/var/spack/repos/builtin/packages/py-cmake/package.py +++ b/var/spack/repos/builtin/packages/py-cmake/package.py @@ -15,7 +15,9 @@ 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" @@ -25,7 +27,7 @@ class PyCmake(PythonPackage): license("Apache-2.0") for v, sha in pycmake_versions.items(): - version(v, sha256=sha) + version(v, sha256=sha, deprecated=True) depends_on("ninja", type="build") depends_on("py-scikit-build@0.12:", type="build") diff --git a/var/spack/repos/builtin/packages/py-cmocean/package.py b/var/spack/repos/builtin/packages/py-cmocean/package.py index c8b235ebbfbd9d..2d20f5d1dcf722 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 00000000000000..e759919fd6add8 --- /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 342c3ce52a05db..542ebb2ed6accd 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 index a88d7b3c2d213a..fae9709c4cb7a8 100644 --- a/var/spack/repos/builtin/packages/py-codespell/package.py +++ b/var/spack/repos/builtin/packages/py-codespell/package.py @@ -15,6 +15,7 @@ class PyCodespell(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-colored/package.py b/var/spack/repos/builtin/packages/py-colored/package.py index e94f5d857d2e8b..4e8d1fe0347699 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 8c8810dd265d23..c9c85097a0a997 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-configspace/package.py b/var/spack/repos/builtin/packages/py-configspace/package.py index e02780b25c7b18..6a392b6276fea6 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" + 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-contourpy/package.py b/var/spack/repos/builtin/packages/py-contourpy/package.py index 9d13c9957aa25c..b51d9b9cbf6908 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 75e0d3e29d65b5..52784443899625 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 677e75fa8843d8..8757d244b07219 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 19d7d28d83a348..4a3995bf019c6c 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 77b755b1929773..df6441df33a6fd 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 f0763e4ab78bc5..29eecc2c6d4462 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 @@ 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 b109d349896d7b..dfa58142009ee6 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 bf74f60b6a733a..c8c46a8c4d1ab8 100644 --- a/var/spack/repos/builtin/packages/py-cryptography/package.py +++ b/var/spack/repos/builtin/packages/py-cryptography/package.py @@ -15,6 +15,8 @@ class PyCryptography(PythonPackage): license("Apache-2.0") + 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") @@ -40,6 +42,7 @@ 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@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")) with when("~rust_bootstrap"): diff --git a/var/spack/repos/builtin/packages/py-cudf/package.py b/var/spack/repos/builtin/packages/py-cudf/package.py index 0bf97fbfed0b91..36bc72bdc34dc0 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 4ad9862b893875..a3afb09999b1e0 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 1ba1c3b37b7b06..1e54a36779f39b 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 00000000000000..8197e8291e8936 --- /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-cvxopt/package.py b/var/spack/repos/builtin/packages/py-cvxopt/package.py index 2fcf1433e6b5f5..30b62012450b44 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 828982503dd57a..fcf3856aced39a 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 34c6b76002bccd..c93c005b575d82 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 ac9301f0ddcaa9..90b0254768439e 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 debfa13e6a49f1..11be0d688eeaa3 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 9320d12e3cbcc0..58978a14081977 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 840797b02a85b2..a7388c1827ff92 100644 --- a/var/spack/repos/builtin/packages/py-cython/package.py +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -17,6 +17,12 @@ class PyCython(PythonPackage): license("Apache-2.0") + version( + "3.0.11", + sha256="7146dd2af8682b4ca61331851e6aebce9fe5158e75300343f80c07ca80b1faff", + url="https://files.pythonhosted.org/packages/source/cython/cython-3.0.11.tar.gz", + ) + version("3.0.10", sha256="dcc96739331fb854dcf503f94607576cfe8488066c61ca50dfd55836f132de99") version("3.0.8", sha256="8333423d8fd5765e7cceea3a9985dd1e0a5dfeb2734629e1a2ed2d6233d39de6") version("3.0.7", sha256="fb299acf3a578573c190c858d49e0cf9d75f4bc49c3f24c5a63804997ef09213") version("3.0.6", sha256="399d185672c667b26eabbdca420c98564583798af3bc47670a8a09e9f19dd660") @@ -49,6 +55,9 @@ class PyCython(PythonPackage): version("0.23.5", sha256="0ae5a5451a190e03ee36922c4189ca2c88d1df40a89b4f224bc842d388a0d1b6") version("0.23.4", sha256="fec42fecee35d6cc02887f1eef4e4952c97402ed2800bfe41bbd9ed1a0730d8e") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + # https://github.com/cython/cython/issues/5751 (distutils not yet dropped) depends_on("python@:3.11", type=("build", "link", "run")) diff --git a/var/spack/repos/builtin/packages/py-cyvcf2/package.py b/var/spack/repos/builtin/packages/py-cyvcf2/package.py index f00894b9e50c8b..d8954dc6c3d74e 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 c8e89103b0c682..6931eef27e30da 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 bfa8bf0d80efbe..2eae218cde2c56 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 e059fb9411e1b5..906db1628f203e 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 c56773e98b4500..a51e98a7ca5c3d 100644 --- a/var/spack/repos/builtin/packages/py-damask/package.py +++ b/var/spack/repos/builtin/packages/py-damask/package.py @@ -10,13 +10,18 @@ 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-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" ) @@ -36,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 2f5d9c4ffe5626..9740c1022033c0 100644 --- a/var/spack/repos/builtin/packages/py-darshan/package.py +++ b/var/spack/repos/builtin/packages/py-darshan/package.py @@ -14,6 +14,9 @@ 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") @@ -21,6 +24,8 @@ class PyDarshan(PythonPackage): 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", when="@:3.4.4", type="build") depends_on("py-setuptools@64:", when="@3.4.5:", type="build") @@ -43,7 +48,7 @@ class PyDarshan(PythonPackage): # 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-dash-bootstrap-components/package.py b/var/spack/repos/builtin/packages/py-dash-bootstrap-components/package.py new file mode 100644 index 00000000000000..0872af0ee3f2e8 --- /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 00000000000000..c3e5cd7e8fba27 --- /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 00000000000000..b68ae73d5b542b --- /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/package.py b/var/spack/repos/builtin/packages/py-dask/package.py index 9567c459a981f2..179060419e1150 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") @@ -32,6 +33,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, @@ -57,6 +59,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:") @@ -66,6 +69,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") @@ -85,9 +90,12 @@ 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 @@ -102,6 +110,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 a85a40531c3a7a..03ecf1c792cc15 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-datrie/package.py b/var/spack/repos/builtin/packages/py-datrie/package.py index 9bb763aed512c3..e7a77f128b2562 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 cc4085cc65ff06..22589fcb86024c 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-deepspeed/package.py b/var/spack/repos/builtin/packages/py-deepspeed/package.py index e73d9552863d42..5b4321f24815d9 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-deeptoolsintervals/package.py b/var/spack/repos/builtin/packages/py-deeptoolsintervals/package.py index ac13c36108982f..c8b7c62907d8fd 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 941590e0e1e195..8b88231ba7a2a4 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 10c6cc2e3e3aa6..814041b93b90ef 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 @@ def cmake_args(self): 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-dipy/package.py b/var/spack/repos/builtin/packages/py-dipy/package.py index dfc95a71b76f46..23d5d4ff32f244 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 00000000000000..369dc26a62fecf --- /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 214471881bb0ae..447a0c9abe9559 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 664f6621aa36a8..91bb8bbbbdad84 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 2ee3139845a1db..54d53552dd5cdf 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 75411a79673fae..6d2a8c2cbe45b8 100644 --- a/var/spack/repos/builtin/packages/py-django/package.py +++ b/var/spack/repos/builtin/packages/py-django/package.py @@ -12,8 +12,10 @@ class PyDjango(PythonPackage): homepage = "https://www.djangoproject.com/" pypi = "Django/Django-5.0.1.tar.gz" - license("BSD-3-Clause") + license("BSD-3-Clause", checked_by="wdconinc") + 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") @@ -25,8 +27,10 @@ class PyDjango(PythonPackage): version("2.2.10", sha256="1226168be1b1c7efd0e66ee79b0e0b58b2caa7ed87717909cd8a57bb13a7079a") depends_on("python@3.10:", when="@5:", type=("build", "run")) - depends_on("py-setuptools@40.8:", when="@5:", type="build") + 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("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")) 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 9bb0f5dc08d2ae..4785092136aa49 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,27 +15,50 @@ class PyDlioProfilerPy(PythonPackage): license("MIT") - version("develop", branch="dev") - version("master", branch="master") - version("0.0.5", tag="v0.0.5", commit="08f1a43c67c8dbb458d547020674c86118c9742e") - version("0.0.4", tag="v0.0.4", commit="f9ba207f4c3e3789eb7759653a94013e6b76c91c") - version("0.0.3", tag="v0.0.3", commit="531f4475cf03312e121c78bf644445882b51ad57") - 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.3", when="@0.0.3:") + 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("brahma@0.0.3", when="@0.0.3:") + 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-tree/package.py b/var/spack/repos/builtin/packages/py-dm-tree/package.py index bd2d7e4eb3f130..c44acd8e308bcd 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-dnspython/package.py b/var/spack/repos/builtin/packages/py-dnspython/package.py index 5b4dc076109842..e445071890fbca 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 00000000000000..7a0c927469edba --- /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 537c0ea2ec4fe3..23cf1ef04f8cb5 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 00000000000000..1d14e0638cd391 --- /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 fdd111efcde30c..c99091254fb651 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 @@ 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-downhill/package.py b/var/spack/repos/builtin/packages/py-downhill/package.py index 26fdfb33648a50..601a8bd82163d4 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 @@ 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-dulwich/package.py b/var/spack/repos/builtin/packages/py-dulwich/package.py index 928e7d5eff0209..6e9c5027a16baa 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-ecmwflibs/package.py b/var/spack/repos/builtin/packages/py-ecmwflibs/package.py index 7ed64c30883385..5257a909e5f08e 100644 --- a/var/spack/repos/builtin/packages/py-ecmwflibs/package.py +++ b/var/spack/repos/builtin/packages/py-ecmwflibs/package.py @@ -18,6 +18,9 @@ class PyEcmwflibs(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-ecos/package.py b/var/spack/repos/builtin/packages/py-ecos/package.py index d1e44f9ff1eb7a..3eca689c11f051 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 00000000000000..6fcf40459ffbef --- /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 00000000000000..cb540ec79bafb4 --- /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 990b2db11fd668..8cc8f18bd9711d 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 ca627c31612796..7c717519c83c7a 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 f9f070eb7870f7..c4cf4feaaad92a 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 00000000000000..3a31cf77b3c25e --- /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 2a1282c38912d2..26fa4ce358c3ac 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 00000000000000..6a6c23dacd366d --- /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-elephant/package.py b/var/spack/repos/builtin/packages/py-elephant/package.py index 2b8a0abfc101f7..9190398cfc4468 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 00000000000000..dadf3aaecf5bcd --- /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-embedding-reader/package.py b/var/spack/repos/builtin/packages/py-embedding-reader/package.py new file mode 100644 index 00000000000000..5468cebc1114ae --- /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 74025e66cbaf24..659d344c3c2704 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 1d65cd5f6c97b3..ec965a1a25aaf3 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 c189bb45405f3a..ffa05d3a10ef86 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 ecb9512620cb3e..e52ffe7084e0ce 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 85b2f3a4edbf5f..a2dade451bace9 100644 --- a/var/spack/repos/builtin/packages/py-ete3/package.py +++ b/var/spack/repos/builtin/packages/py-ete3/package.py @@ -23,6 +23,8 @@ class PyEte3(PythonPackage): 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-evodiff/package.py b/var/spack/repos/builtin/packages/py-evodiff/package.py new file mode 100644 index 00000000000000..814f40510a276e --- /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 a4fde23a02cef4..9a3db4675f797f 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 cbb4fb6d430671..8ac56eb41ba96d 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-extension-helpers/package.py b/var/spack/repos/builtin/packages/py-extension-helpers/package.py index 298d78a8b259fa..4005310244be20 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 705cddc2e8c879..096defc24dd75f 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 00000000000000..a157ebbc0f0abc --- /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 c6475fd12b8b59..2383ae4bfee6c9 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 ad9927e94f886b..6946b25f6ecbb5 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-fastcache/package.py b/var/spack/repos/builtin/packages/py-fastcache/package.py index 0137184e1a734d..f0fa37406863a7 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 0eb63dc1a1b98c..824913fb23289d 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 @@ 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 a7dd56cd65eba7..6341b00db3e8a3 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 6d741ead6c8c6f..4a49c573df7443 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 a94b8d545fbc9c..44d97624d41e0c 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 index 71103a1375531d..4e3d1bb68344b4 100644 --- a/var/spack/repos/builtin/packages/py-fastremap/package.py +++ b/var/spack/repos/builtin/packages/py-fastremap/package.py @@ -17,6 +17,8 @@ class PyFastremap(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-fastrlock/package.py b/var/spack/repos/builtin/packages/py-fastrlock/package.py index e45bc5f3a75cbd..02081e1d506805 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 256dc429cbf171..b9b90c490ad036 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 2c31d59847686f..5752cffa2aea94 100644 --- a/var/spack/repos/builtin/packages/py-fenics-basix/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-basix/package.py @@ -17,30 +17,23 @@ 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", - deprecated=True, - ) - version( - "0.4.2", - sha256="a54f5e442b7cbf3dbb6319c682f9161272557bd7f42e2b8b8ccef88bc1b7a22f", - deprecated=True, - ) + + 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.9:", when="@0.8:", type=("build", "run")) @@ -48,9 +41,9 @@ class PyFenicsBasix(PythonPackage): 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 6234c03c22b936..7ccfd32ddbad62 100644 --- a/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py @@ -18,76 +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", - deprecated=True, - ) - version( - "0.5.0", - sha256="503c70c01a44d1ffe48e052ca987693a49f8d201877652cabbe2a44eb3b7c040", - deprecated=True, - ) - version( - "0.4.1", - sha256="68dcf29a26c750fcea5e02d8d58411e3b054313c3bf6fcbc1d0f08dd2851117f", - 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("hdf5", type="build") depends_on("pkgconfig", type="build") - depends_on("python@3.9:", when="@0.8", type=("build", "run")) - depends_on("python@3.8:", when="@0.6.1:0.7", 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 b5ddb2755808a0..f77114e9e2aa49 100644 --- a/var/spack/repos/builtin/packages/py-fenics-ffc/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-ffc/package.py @@ -28,6 +28,8 @@ class PyFenicsFfc(PythonPackage): ) version("2016.2.0", sha256="097c284780447ea7bb47d4d51956648a1efb2cb9047eb1382944421dde351ecb") + depends_on("cxx", type="build") # generated + depends_on("py-setuptools", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py b/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py index a9f6ef6b584e6a..b696a0abb4cbf9 100644 --- a/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py @@ -17,45 +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", - deprecated=True, - ) - version( - "0.4.2", - sha256="3be6eef064d6ef907245db5b6cc15d4e603762e68b76e53e099935ca91ef1ee4", - deprecated=True, - ) 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@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/package.py b/var/spack/repos/builtin/packages/py-fenics-ufl/package.py index b4e8cfe937dae6..418b875ad3fbe0 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,7 @@ 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" ) diff --git a/var/spack/repos/builtin/packages/py-fiona/package.py b/var/spack/repos/builtin/packages/py-fiona/package.py index 783ac6985a33b3..6d59878ab5375b 100644 --- a/var/spack/repos/builtin/packages/py-fiona/package.py +++ b/var/spack/repos/builtin/packages/py-fiona/package.py @@ -18,6 +18,8 @@ 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") @@ -30,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")) + 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")) - depends_on("py-setuptools", when="@:1.9.1,1.9.5", type="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 index 7aec6c6d020ae4..8d4c043cf9c155 100644 --- a/var/spack/repos/builtin/packages/py-flash-attn/package.py +++ b/var/spack/repos/builtin/packages/py-flash-attn/package.py @@ -11,27 +11,44 @@ class PyFlashAttn(PythonPackage): This package provides the official implementation of FlashAttention. """ - pypi = "flash-attn/flash_attn-2.5.4.tar.gz" + 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("py-setuptools", type="build") + 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-ninja") depends_on("py-einops") - depends_on("py-packaging") with default_args(type=("build", "link", "run")): depends_on("py-pybind11") - depends_on("py-psutil", type="build") + depends_on("python@3.7:", type=("build", "run"), when="@:2.5") + depends_on("python@3.8:", type=("build", "run"), when="@2.6:") - depends_on("python@3.7:", type=("build", "run")) + 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-sqlalchemy/package.py b/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py index 950351e578ca41..fd243f6332e275 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-flatbuffers/package.py b/var/spack/repos/builtin/packages/py-flatbuffers/package.py index d91f04e672a9de..3b2d6249bd05a1 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 56a6a80e3cb02b..c566daa7a2d224 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 @@ 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 index f1bbc9678edb11..108ddfcc654b4b 100644 --- a/var/spack/repos/builtin/packages/py-flax/package.py +++ b/var/spack/repos/builtin/packages/py-flax/package.py @@ -14,6 +14,7 @@ class PyFlax(PythonPackage): license("Apache-2.0") + version("0.8.5", sha256="4a9cb7950ece54b0addaa73d77eba24e46138dbe783d01987be79d20ccb2b09b") version("0.8.1", sha256="ce3d99e9b4c0d2e4d9fc28bc56cced8ba953adfd695aabd24f096b4c8a7e2f92") version("0.7.3", sha256="e9dbc7eb6c80d31277f97b626c07978d2a84f1bb635cf05957a02a3a496493e6") @@ -23,8 +24,11 @@ class PyFlax(PythonPackage): 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") 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 00000000000000..af76b817057ca8 --- /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 00000000000000..76ec14428e5195 --- /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 00000000000000..de0980d74fa4dc --- /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 00000000000000..2fb41dc98c1ff8 --- /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 00000000000000..83845330233910 --- /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 00000000000000..95b6382ace206e --- /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 00000000000000..d55c3845fc9ba8 --- /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 00000000000000..e674665785f39b --- /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 00000000000000..c6c86d0e23c7e5 --- /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 00000000000000..bf538c1772ed80 --- /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 8ec6ca4c9f46ff..83529bae78c6d2 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-ford/package.py b/var/spack/repos/builtin/packages/py-ford/package.py index 0bab66112a3636..43455c69cf860b 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 47e9aafed33af3..ccb5133bfb4bdd 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 7187cea8db8258..3e872f85abcad4 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-fparser/package.py b/var/spack/repos/builtin/packages/py-fparser/package.py index 7ac6bca213b987..c211c83a5bb83c 100644 --- a/var/spack/repos/builtin/packages/py-fparser/package.py +++ b/var/spack/repos/builtin/packages/py-fparser/package.py @@ -35,6 +35,8 @@ class PyFparser(PythonPackage): version("0.0.6", sha256="bf8a419cb528df1bfc24ddd26d63f2ebea6f1e103f1a259d8d3a6c9b1cd53012") version("0.0.5", sha256="f3b5b0ac56fd22abed558c0fb0ba4f28edb8de7ef24cfda8ca8996562215822f") + 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") diff --git a/var/spack/repos/builtin/packages/py-frozendict/package.py b/var/spack/repos/builtin/packages/py-frozendict/package.py index d526db84acb68b..c3f5de6d0144c4 100644 --- a/var/spack/repos/builtin/packages/py-frozendict/package.py +++ b/var/spack/repos/builtin/packages/py-frozendict/package.py @@ -9,7 +9,7 @@ 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") @@ -18,6 +18,8 @@ class PyFrozendict(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-frozenlist/package.py b/var/spack/repos/builtin/packages/py-frozenlist/package.py index 619c8981fb911f..b98a509c7043ed 100644 --- a/var/spack/repos/builtin/packages/py-frozenlist/package.py +++ b/var/spack/repos/builtin/packages/py-frozenlist/package.py @@ -19,6 +19,8 @@ class PyFrozenlist(PythonPackage): version("1.3.0", sha256="ce6f2ba0edb7b0c1d8976565298ad2deba6f8064d2bebb6ffce2ca896eb35b0b") version("1.2.0", sha256="68201be60ac56aff972dc18085800b6ee07973c49103a8aba669dee3d71079de") + depends_on("c", type="build") # generated + 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") diff --git a/var/spack/repos/builtin/packages/py-fsspec/package.py b/var/spack/repos/builtin/packages/py-fsspec/package.py index 0b46a7c951c71b..1e5bc5bad39821 100644 --- a/var/spack/repos/builtin/packages/py-fsspec/package.py +++ b/var/spack/repos/builtin/packages/py-fsspec/package.py @@ -17,6 +17,8 @@ class PyFsspec(PythonPackage): # Requires pytest skip_modules = ["fsspec.tests"] + 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") @@ -30,6 +32,8 @@ class PyFsspec(PythonPackage): variant("http", default=False, description="HTTPFileSystem support", when="@0.8.1:") - depends_on("py-setuptools", type="build") + 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 09c36a1b2d9ab5..681268df93839a 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 14a51ad53bcb94..9ed6394c0f256b 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 bd26134bc260ca..017346357cc548 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-gdown/package.py b/var/spack/repos/builtin/packages/py-gdown/package.py new file mode 100644 index 00000000000000..4c7e0cef988c49 --- /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 00000000000000..d368ca717b2980 --- /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 b548d374b1700c..dbaf2d715b4f7d 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 66c8de0fd05816..d9112609a5f194 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 c5ac143f0e59bc..c4d412425712f0 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 6f691751c6f2a1..ea34cf9ddccbb8 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 be699da3f59700..47194df24f17dc 100644 --- a/var/spack/repos/builtin/packages/py-geopandas/package.py +++ b/var/spack/repos/builtin/packages/py-geopandas/package.py @@ -22,6 +22,8 @@ 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") @@ -42,21 +44,27 @@ class PyGeopandas(PythonPackage): 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-pandas@1.4.0:", type=("build", "run"), when="@0.14:") - 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-shapely@1.8.0:", type=("build", "run"), when="@0.14:") - depends_on("py-fiona", type=("build", "run")) - depends_on("py-fiona@1.8:", type=("build", "run"), when="@0.9:") - depends_on("py-fiona@1.8.21:", 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-pyproj@3.3.0:", type=("build", "run"), when="@0.14:") - depends_on("py-packaging", type=("build", "run"), when="@0.11:") + 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 index e49f50aca17a8e..a67981826d4fa7 100644 --- a/var/spack/repos/builtin/packages/py-geopmdpy/package.py +++ b/var/spack/repos/builtin/packages/py-geopmdpy/package.py @@ -12,28 +12,43 @@ class PyGeopmdpy(PythonPackage): homepage = "https://geopm.github.io" git = "https://github.com/geopm/geopm.git" - url = "https://github.com/geopm/geopm/tarball/v3.0.1" + url = "https://github.com/geopm/geopm/tarball/v3.1.0" maintainers("bgeltz", "cmcantalupo") license("BSD-3-Clause") tags = ["e4s"] - version("develop", branch="dev") + 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" - build_directory = "service" + 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): - # @develop builds will have a version of 0.0.0 - if not self.spec.version.isdevelop(): - with working_dir(join_path("service", "geopmdpy")): + 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 00000000000000..7a7e13f7343b18 --- /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-gevent/cython.patch b/var/spack/repos/builtin/packages/py-gevent/cython.patch new file mode 100644 index 00000000000000..91e751f2f9fa0f --- /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 85b6d5ff209303..9aaab6a93f2554 100644 --- a/var/spack/repos/builtin/packages/py-gevent/package.py +++ b/var/spack/repos/builtin/packages/py-gevent/package.py @@ -20,6 +20,8 @@ class PyGevent(PythonPackage): version("21.8.0", sha256="43e93e1a4738c922a2416baf33f0afb0a20b22d3dba886720bc037cd02a98575") version("1.5.0", sha256="b2814258e3b3fb32786bb73af271ad31f51e1ac01f33b37426b66cb8491b4c29") + depends_on("c", type="build") # generated + depends_on("python@3.8:", when="@23.7.0:", type=("build", "run")) depends_on("python@:3.10", when="@:21.12", type=("build", "run")) @@ -43,6 +45,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 +61,6 @@ def flag_handler(self, name, flags): 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 2d14aca41e3640..4c9617994d7d1b 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-glean-parser/package.py b/var/spack/repos/builtin/packages/py-glean-parser/package.py new file mode 100644 index 00000000000000..515398f61cc817 --- /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 00000000000000..364df912784862 --- /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 00000000000000..8b6e5cbfe59146 --- /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 f4f11ce6112eb1..ed41241b827eea 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 3b3e3c28c1dd72..aeb694ac755254 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 03bc375a98ce32..ef2efd23df6073 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-gmsh/package.py b/var/spack/repos/builtin/packages/py-gmsh/package.py new file mode 100644 index 00000000000000..b1e3ce20bf2cb9 --- /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 5869d1ad4b3a4d..27f3f7bf935f10 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")) diff --git a/var/spack/repos/builtin/packages/py-gnuplot/package.py b/var/spack/repos/builtin/packages/py-gnuplot/package.py index 4b87213469e738..93edb94388edb7 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-crc32c/package.py b/var/spack/repos/builtin/packages/py-google-crc32c/package.py index a083dd9cbc3965..2926fce25a53ac 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-googleapis-common-protos/package.py b/var/spack/repos/builtin/packages/py-googleapis-common-protos/package.py index b3529b2ffc60a9..2adba921f76c54 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 @@ -14,7 +14,9 @@ class PyGoogleapisCommonProtos(PythonPackage): 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") @@ -26,14 +28,21 @@ class PyGoogleapisCommonProtos(PythonPackage): description="Enable support for gRPC Remote Procedure Call framework.", ) - with when("+grpc"): - depends_on("py-grpcio@1.44:1", when="@1.57:", type="run") - depends_on("py-grpcio@1", when="@1.56.2:", type="run") - depends_on("py-grpcio@1:", type="run") - 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") - ) - 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")) + + 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 22e8f70f15938b..fc6eff141da774 100644 --- a/var/spack/repos/builtin/packages/py-gosam/package.py +++ b/var/spack/repos/builtin/packages/py-gosam/package.py @@ -26,6 +26,10 @@ class PyGosam(Package): 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 6e4181afbdd486..c8e3c0a8e26b6c 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") diff --git a/var/spack/repos/builtin/packages/py-gpy/package.py b/var/spack/repos/builtin/packages/py-gpy/package.py index 172b79277ddaec..b2e8abf38dc381 100644 --- a/var/spack/repos/builtin/packages/py-gpy/package.py +++ b/var/spack/repos/builtin/packages/py-gpy/package.py @@ -19,6 +19,8 @@ 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") diff --git a/var/spack/repos/builtin/packages/py-gpytorch/package.py b/var/spack/repos/builtin/packages/py-gpytorch/package.py index c4a98153f60582..a8bdb28538737c 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-grapheme/package.py b/var/spack/repos/builtin/packages/py-grapheme/package.py index 2670c50dc58d61..02e67b05756ec9 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 50ad9904bedcb5..cd0534daf79d99 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 920fa2f4907946..71dcc219cdc427 100644 --- a/var/spack/repos/builtin/packages/py-greenlet/package.py +++ b/var/spack/repos/builtin/packages/py-greenlet/package.py @@ -29,5 +29,12 @@ 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") diff --git a/var/spack/repos/builtin/packages/py-griddataformats/package.py b/var/spack/repos/builtin/packages/py-griddataformats/package.py index d91e53a05edbbd..d6a807cbf6137a 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-grpcio-status/package.py b/var/spack/repos/builtin/packages/py-grpcio-status/package.py index ef05d860c9dbcf..7302b259cce86b 100644 --- a/var/spack/repos/builtin/packages/py-grpcio-status/package.py +++ b/var/spack/repos/builtin/packages/py-grpcio-status/package.py @@ -14,12 +14,18 @@ class PyGrpcioStatus(PythonPackage): 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 - depends_on("py-protobuf@4.21.6:", type=("build", "run")) - depends_on("py-grpcio@1.60.1:", when="@1.60.1", type=("build", "run")) - depends_on("py-googleapis-common-protos@1.5.5:", type=("build", "run")) + 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 b46a70255eb73b..55069ba1c55b52 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 00000000000000..f0c9813fad30d4 --- /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 02d06321236021..2163a87a0db1ee 100644 --- a/var/spack/repos/builtin/packages/py-grpcio/package.py +++ b/var/spack/repos/builtin/packages/py-grpcio/package.py @@ -14,9 +14,22 @@ class PyGrpcio(PythonPackage): license("Apache-2.0") + 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.52.0", sha256="a5d4a83d29fc39af429c10b9b326c174fec49b73398e4a966a1f2a4f30aa4fdb") - version("1.48.1", sha256="660217eccd2943bf23ea9a36e2a292024305aec04bf747fbcff1f5032b83610e") + 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") @@ -36,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 a87b2c93a6a675..85eaa50c5b23eb 100644 --- a/var/spack/repos/builtin/packages/py-gsd/package.py +++ b/var/spack/repos/builtin/packages/py-gsd/package.py @@ -15,13 +15,14 @@ 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") @@ -29,6 +30,8 @@ class PyGsd(PythonPackage): 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:") diff --git a/var/spack/repos/builtin/packages/py-gssapi/package.py b/var/spack/repos/builtin/packages/py-gssapi/package.py index 081196475338d7..a236f3f3450d07 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-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index 59acad200fd4c9..16d5506f8d0c5d 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -18,6 +18,8 @@ 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") @@ -40,34 +42,39 @@ 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.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:", type="build", when="@3.11:") - depends_on("py-cython@0.29.31:0", type="build", when="@3.9:") + 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") # Build and runtime dependencies - depends_on("py-numpy@1.17.3:", type=("build", "run"), when="@3.11:") - depends_on("py-numpy@1.17.3:1", type=("build", "run"), when="@3.9:3.10") - depends_on("py-numpy@1.19.3:1", type=("build", "run"), when="@3:3.5 ^python@3.9.0:") - depends_on("py-numpy@1.17.5:1", type=("build", "run"), when="@3:3.5 ^python@3.8.0:3.8") - depends_on("py-numpy@1.14.5:1", type=("build", "run"), when="@3:") - depends_on("py-numpy@1.7:1", type=("build", "run"), when="@:2") + 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") + # 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.10.4:1.14 +hl", when="@3.10:") + 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") 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 00000000000000..53a0d4f4f64b86 --- /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 00000000000000..2aa6b3b65da060 --- /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 0bd62053a1aa52..47d97c4d18809c 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 5648c0c24792ee..09f2be42831132 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-vcs/package.py b/var/spack/repos/builtin/packages/py-hatch-vcs/package.py index fe34688b98d2f5..8347b910723197 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 00000000000000..19b9f99d43ffb5 --- /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 1a3a69b543ad44..3360a7b439bc88 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 930a7067ae730e..dc6610f0a0b73e 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 eb7931bf2504ab..19fe0f5367f066 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 90e5bcaf4ce15b..babfb05e9dc854 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 d1b9fe2c4a889e..9512559ad2fd50 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-hiredis/package.py b/var/spack/repos/builtin/packages/py-hiredis/package.py index 03379ae6777f6a..0b783b1ce0fd43 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 cbb457b6e7f735..6eca677529464b 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-horovod/package.py b/var/spack/repos/builtin/packages/py-horovod/package.py index 56effd1982ec36..d7a2e9b3bbf36a 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 152da6f44ce982..ba1c0a8c6e7b16 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 8b90b775640b5c..0a524e543ae970 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 8a72e47aa05c06..45fbf4b22bb95e 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 efa08de8110fc7..f4ecbbe8d5fac9 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 d4708c117bdc99..cfba153d5210c2 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 4da435bbd3cc1c..37be8063c45923 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 d9ee1717de2b6a..2de20bed539bba 100644 --- a/var/spack/repos/builtin/packages/py-huggingface-hub/package.py +++ b/var/spack/repos/builtin/packages/py-huggingface-hub/package.py @@ -16,6 +16,8 @@ class PyHuggingfaceHub(PythonPackage): license("Apache-2.0") + 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") @@ -33,12 +35,12 @@ class PyHuggingfaceHub(PythonPackage): 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-packaging@20.9:", when="@0.10:", type=("build", "run")) + depends_on("py-pyyaml@5.1:", when="@0.10:", 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")) diff --git a/var/spack/repos/builtin/packages/py-humanize/package.py b/var/spack/repos/builtin/packages/py-humanize/package.py index d9efe5ef12cd9f..f12a12996cb836 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-hypothesis/package.py b/var/spack/repos/builtin/packages/py-hypothesis/package.py index e06e14ff8435a9..cbec4e5c5208a5 100644 --- a/var/spack/repos/builtin/packages/py-hypothesis/package.py +++ b/var/spack/repos/builtin/packages/py-hypothesis/package.py @@ -40,6 +40,8 @@ class PyHypothesis(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-igraph/package.py b/var/spack/repos/builtin/packages/py-igraph/package.py index 7d3b4b32266949..36708d10ee9264 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 00000000000000..ffee7c8af84b15 --- /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 7b55335768f406..16c8cd3679b418 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 bd425abe9b8b37..b6f1bb6c19dcfc 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")) diff --git a/var/spack/repos/builtin/packages/py-imageio/package.py b/var/spack/repos/builtin/packages/py-imageio/package.py index 950bb872643c2e..9e2f04478ce876 100644 --- a/var/spack/repos/builtin/packages/py-imageio/package.py +++ b/var/spack/repos/builtin/packages/py-imageio/package.py @@ -19,6 +19,7 @@ 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") @@ -35,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 45311c7595661e..b66aaa0938580e 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 22ddcdc7413db2..e2b53d484c8170 100644 --- a/var/spack/repos/builtin/packages/py-immutables/package.py +++ b/var/spack/repos/builtin/packages/py-immutables/package.py @@ -21,6 +21,8 @@ class PyImmutables(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-incremental/package.py b/var/spack/repos/builtin/packages/py-incremental/package.py index 8550e3759804bc..5e05689b842f45 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-intbitset/package.py b/var/spack/repos/builtin/packages/py-intbitset/package.py index 01a55114bc043e..93c72606f01032 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-interlap/package.py b/var/spack/repos/builtin/packages/py-interlap/package.py new file mode 100644 index 00000000000000..0990810990bf59 --- /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 53c54538aaacd0..91b01f47cdcbe1 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 80490e66f06505..02f2c943b4d58a 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") @@ -40,40 +50,42 @@ class PyIpykernel(PythonPackage): version("4.1.1", sha256="d8c5555386d0f18f1336dea9800f9f0fe96dcecc9757c0f980e11fdfadb661ff") version("4.1.0", sha256="e0e150ad55e487e49054efc9a4b0e2e17f27e1de77444b26760789077b146d86") - depends_on("python@3.8:", when="@6.22:", type=("build", "run")) 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.22:") + depends_on("py-debugpy@1.6.5:", when="@6.22:") + depends_on("py-debugpy@1:", when="@6.11:") + depends_on("py-debugpy@1.0:1", when="@6:6.10") + depends_on("py-ipython@7.23.1:", when="@6.5.1:") + depends_on("py-ipython@7.23.1:7", when="@6.0.0:6.5.0") + depends_on("py-ipython@5.0:", when="@5") + depends_on("py-ipython@4.0:", when="@:4") + 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.11:") + depends_on("py-traitlets@5.1.0:5", when="@6.5:6.10") + depends_on("py-traitlets@4.1.0:5", when="@6.0:6.4") + depends_on("py-traitlets@4.1.0:") + depends_on("py-jupyter-client@6.1.12:", when="@6.11:") + depends_on("py-jupyter-client@:7", when="@6.2:6.10") + depends_on("py-jupyter-client@:6", when="@6.0.2:6.1") + depends_on("py-jupyter-client") + 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:6", when="@6.10") + depends_on("py-tornado@4.2:6", when="@6:6.9") + depends_on("py-tornado@4.2:", when="@5") + depends_on("py-tornado@4:", when="@:4") + depends_on("py-matplotlib-inline@0.1:", when="@6.11:") + depends_on("py-matplotlib-inline@0.1.0:0.1", when="@6: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") diff --git a/var/spack/repos/builtin/packages/py-ipympl/package.py b/var/spack/repos/builtin/packages/py-ipympl/package.py index c83d6392b0c12c..a45799610def1b 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-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py index d1f1044e7674a5..25eafc5c6e41e0 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") @@ -38,25 +52,23 @@ class PyIpython(PythonPackage): version("5.1.0", sha256="7ef4694e1345913182126b219aaa4a0047e191af414256da6772cf249571b961") 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-exceptiongroup", when="@8.15: ^python@:3.10", type=("build", "run")) depends_on("py-jedi@0.16:", 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 +80,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-isal/package.py b/var/spack/repos/builtin/packages/py-isal/package.py index 1a8bbcb444f7b0..0d8ecf16595c25 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-janus/package.py b/var/spack/repos/builtin/packages/py-janus/package.py new file mode 100644 index 00000000000000..62f2771111f2fe --- /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 1ae633e44e139d..8974c1dc581a61 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 48bab7567841d9..beb3554e94802a 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 2394c0b9ae4b2d..499b9065733dd3 100644 --- a/var/spack/repos/builtin/packages/py-jax/package.py +++ b/var/spack/repos/builtin/packages/py-jax/package.py @@ -24,6 +24,10 @@ class PyJax(PythonPackage): 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") @@ -49,40 +53,35 @@ class PyJax(PythonPackage): version("0.4.5", sha256="1633e56d34b18ddfa7d2a216ce214fa6fa712d36552532aaa71da416aede7268") version("0.4.4", sha256="39b07e07343ed7c74492ee5e75db77456d3afdd038a322671f09fc748f6392cb") version("0.4.3", sha256="d43f08f940aa30eb339965cfb3d6bee2296537b0dc2f0c65ccae3009279529ae") - version( - "0.3.23", - sha256="bff436e15552a82c0ebdef32737043b799e1e10124423c57a6ae6118c3a7b6cd", - deprecated=True, - ) - version( - "0.2.25", - sha256="822e8d1e06257eaa0fdc4c0a0686c4556e9f33647fa2a766755f984786ae7446", - deprecated=True, - ) depends_on("py-setuptools", type="build") 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("python@3.8:", when="@0.4:") 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:") - depends_on("py-numpy@1.18:") + # 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:") - depends_on("py-scipy@1.2.1:") - depends_on("py-importlib-metadata@4.6:", when="@0.4.11: ^python@:3.9") # 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", @@ -108,11 +107,12 @@ class PyJax(PythonPackage): "0.4.5", "0.4.4", "0.4.3", - "0.3.23", ]: 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:") @@ -123,16 +123,7 @@ class PyJax(PythonPackage): 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:") - depends_on("py-jaxlib@0.3.22:", when="@0.3.24:") - depends_on("py-jaxlib@0.3.15:", when="@0.3.18:") - depends_on("py-jaxlib@0.3.14:", when="@0.3.15:") - depends_on("py-jaxlib@0.3.7:", when="@0.3.8:") - depends_on("py-jaxlib@0.3.2:", when="@0.3.7:") - depends_on("py-jaxlib@0.3.0:", when="@0.3.2:") - depends_on("py-jaxlib@0.1.74:", when="@0.2.26:") - depends_on("py-jaxlib@0.1.69:", when="@0.2.18:") # Historical dependencies - depends_on("py-absl-py", when="@:0.3") - depends_on("py-typing-extensions", when="@:0.3") - depends_on("py-etils+epath", when="@0.3") + 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 00000000000000..e96cc32e263969 --- /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 +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 ++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?= +++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 fcca93ad044374..3ba330388e2a02 100644 --- a/var/spack/repos/builtin/packages/py-jaxlib/package.py +++ b/var/spack/repos/builtin/packages/py-jaxlib/package.py @@ -5,10 +5,28 @@ 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" @@ -18,8 +36,12 @@ class PyJaxlib(PythonPackage, CudaPackage): buildtmp = "" license("Apache-2.0") - maintainers("adamjstewart") + 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") @@ -35,46 +57,40 @@ class PyJaxlib(PythonPackage, CudaPackage): version("0.4.6", sha256="2c9bf8962815bc54ef524e33dc8eda9d165d379fe87e0df210f316adead27787") version("0.4.4", sha256="881f402c7983b56b185e182d5315dd64c9f5320be96213d0415996ece1826806") version("0.4.3", sha256="2104735dc22be2b105e5517bd5bc6ae97f40e8e9e54928cac1585c6112a3d910") - version( - "0.3.22", - sha256="680a6f5265ba26d5515617a95ae47244005366f879a5c321782fde60f34e6d0d", - deprecated=True, - ) - version( - "0.1.74", - sha256="bbc78c7a4927012dcb1b7cd135c7521f782d7dad516a2401b56d3190f81afe35", - deprecated=True, - ) + + 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 - # jaxlib/setup.py + # 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("cuda@11.1:", when="@0.3") - depends_on("cuda@11.1:11.7.0", when="@0.1") - depends_on("cudnn@8.9:8", when="@0.4.26:") - depends_on("cudnn@8.8:", when="@0.4.11:") - depends_on("cudnn@8.2:", when="@0.4:0.4.7") - depends_on("cudnn@8.0.5:") + 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.1.2", when="@0.4.11:") + 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") - depends_on("bazel@5.1.0", when="@0.3.5") - depends_on("bazel@5.0.0", when="@0.3.0:0.3.2") - depends_on("bazel@4.2.1", when="@0.1.75:0.1.76") - depends_on("bazel@4.1.0", when="@0.1.70:0.1.74") # jaxlib/setup.py depends_on("py-setuptools") @@ -84,25 +100,38 @@ class PyJaxlib(PythonPackage, CudaPackage): with default_args(type=("build", "run")): # Based on PyPI wheels - depends_on("python@3.9:3.12", when="@0.4.17:") + depends_on("python@3.10:3.12", when="@0.4.31:") + depends_on("python@3.9:3.12", when="@0.4.17:0.4.30") depends_on("python@3.9:3.11", when="@0.4.14:0.4.16") depends_on("python@3.8:3.11", when="@0.4.6:0.4.13") # 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-numpy@1.18:") 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 - depends_on("py-absl-py", when="@:0.3") - depends_on("py-flatbuffers@1.12:2", when="@0.1") + # 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", @@ -154,17 +183,18 @@ def install(self, spec, prefix): 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 00000000000000..a64a87d158e18f --- /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 00000000000000..a13c134b3c57ce --- /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 4ac1c9574c4824..7074588beef056 100644 --- a/var/spack/repos/builtin/packages/py-jedi/package.py +++ b/var/spack/repos/builtin/packages/py-jedi/package.py @@ -39,6 +39,8 @@ class PyJedi(PythonPackage): ) version("0.9.0", sha256="3b4c19fba31bdead9ab7350fb9fa7c914c59b0a807dcdd5c00a05feb85491d31") + depends_on("c", type="build") # generated + depends_on("py-setuptools", type=("build", "run")) depends_on("py-parso@0.8", when="@0.18.0:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-jellyfish/package.py b/var/spack/repos/builtin/packages/py-jellyfish/package.py index d0ccd6ba3958a6..85e916c21f4274 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 07ac0c8acf5358..fe6afd07738810 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 00000000000000..466dff204c7306 --- /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-jproperties/package.py b/var/spack/repos/builtin/packages/py-jproperties/package.py new file mode 100644 index 00000000000000..df024a6ed604f1 --- /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 8c2f32f41a9bb3..aa12e7c9dec065 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-jsonlines/package.py b/var/spack/repos/builtin/packages/py-jsonlines/package.py new file mode 100644 index 00000000000000..f0a6fc5483539d --- /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 00000000000000..d595550b83aa8c --- /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 2ba338975bbe7b..e2c5e3c6fdf409 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 @@ 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 00000000000000..d6965674b8f4f1 --- /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 8303cadb9a94c9..c41bbd45d83076 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 e87818492b324d..f1bd940b9d79fb 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-server-mathjax/package.py b/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py index 18cf66199606a3..8a5da89cde2ade 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 @@ 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/package.py b/var/spack/repos/builtin/packages/py-jupyter-server/package.py index 669ef586d1e291..c8a4c422e19565 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,32 @@ 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") @@ -46,7 +61,9 @@ class PyJupyterServer(PythonPackage): 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")) @@ -54,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")) @@ -74,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 9569b16c0314c8..d71d6bd1a9dd39 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/package.py b/var/spack/repos/builtin/packages/py-jupyterlab/package.py index 08c57c99a9eda4..195ee27e292eca 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 742310fd4ec782..b7556f3648f9a2 100644 --- a/var/spack/repos/builtin/packages/py-jupytext/package.py +++ b/var/spack/repos/builtin/packages/py-jupytext/package.py @@ -23,6 +23,8 @@ class PyJupytext(PythonPackage): version("1.13.6", sha256="c6c25918ddb6403d0d8504e08d35f6efc447baf0dbeb6a28b73adf39e866a0c4") version("1.13.0", sha256="fb220af65d2bd32d01c779b0e935c4c2b71e3f5f2f01bf1bab10d5f23fe121d4") + 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") diff --git a/var/spack/repos/builtin/packages/py-keras/package.py b/var/spack/repos/builtin/packages/py-keras/package.py index 6a6497806d9d4f..c4c5aa558574f3 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 * @@ -22,6 +23,10 @@ class PyKeras(PythonPackage): maintainers("adamjstewart") license("Apache-2.0") + 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") @@ -83,6 +88,7 @@ class PyKeras(PythonPackage): 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") @@ -91,21 +97,30 @@ class PyKeras(PythonPackage): depends_on("py-protobuf", when="@3:") # requirements-tensorflow-cuda.txt - depends_on("py-tensorflow@2.16.1:2.16", when="@3.0: backend=tensorflow") + with when("backend=tensorflow"): + depends_on("py-tensorflow@2.17", when="@3.5:") + depends_on("py-tensorflow@2.16.1:2.16", when="@3.0:3.4") # requirements-jax-cuda.txt - depends_on("py-jax@0.4.23", when="@3.0.5: backend=jax") - depends_on("py-jax", when="@3: backend=jax") + 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 - depends_on("py-torch@2.2.1", when="@3.1.0: backend=torch") - depends_on("py-torch@2.1.2", when="@3.0.3:3.0.5 backend=torch") - depends_on("py-torch@2.1.1", when="@3.0.1:3.0.2 backend=torch") - depends_on("py-torch@2.1.0", when="@3.0.0 backend=torch") - depends_on("py-torchvision@0.17.1", when="@3.1.0: backend=torch") - depends_on("py-torchvision@0.16.2", when="@3.0.3:3.0.5 backend=torch") - depends_on("py-torchvision@0.16.1", when="@3.0.1:3.0.2 backend=torch") - depends_on("py-torchvision@0.16.0", when="@3.0.0 backend=torch") + with when("backend=torch"): + 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.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 with default_args(type="build"): @@ -115,6 +130,8 @@ class PyKeras(PythonPackage): 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") @@ -183,6 +200,5 @@ def install(self, spec, prefix): 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 f6f62be68179cc..e63f2859419205 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 b7ffca2bdf3034..d069f4c85d57de 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-kornia/package.py b/var/spack/repos/builtin/packages/py-kornia/package.py index 3fc1c0de7e54ff..4789984a2ecd78 100644 --- a/var/spack/repos/builtin/packages/py-kornia/package.py +++ b/var/spack/repos/builtin/packages/py-kornia/package.py @@ -23,6 +23,7 @@ class PyKornia(PythonPackage): "adamjstewart", ) + version("0.7.3", sha256="0eb861ea5d7e6c3891ae699a8b7103a5783af0a7c41888ca482420dd3d055306") version("0.7.2", sha256="f834ccd51188d071ed286a6727471c94344ea2a718903cc6f0e56a92f9c66ac5") version("0.7.1", sha256="65b54a50f70c1f88240b557fda3fdcc1ab866982a5d062e52213130f5a48465c") version("0.7.0", sha256="72cba6a0965a15caf10a664647654412effb7c0b9afcf40e458bc005f976ffac") 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 00000000000000..f87a1b7762fae2 --- /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-langsmith/package.py b/var/spack/repos/builtin/packages/py-langsmith/package.py index 2066c16a4a22eb..4c08c78aba0310 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 61202d4f97b734..b68ba7ef7247d3 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 00000000000000..82a95a462c68f0 --- /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 babd8bf528fd89..f78b90fa3c0f46 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-object-proxy/package.py b/var/spack/repos/builtin/packages/py-lazy-object-proxy/package.py index 89cbbfb72602d9..c8b247ad92a98a 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 b6386e0b7e328c..39ee3a8bc2a94b 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-libensemble/package.py b/var/spack/repos/builtin/packages/py-libensemble/package.py index 5b553912aea278..7c472b0b153d68 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.3.0.tar.gz" + pypi = "libensemble/libensemble-1.4.2.tar.gz" git = "https://github.com/Libensemble/libensemble.git" maintainers("shuds13", "jlnav") @@ -21,6 +21,9 @@ 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") @@ -48,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 @@ -87,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""" diff --git a/var/spack/repos/builtin/packages/py-libsonata/package.py b/var/spack/repos/builtin/packages/py-libsonata/package.py index d8ef9b9b8393e2..36937e902d8ec8 100644 --- a/var/spack/repos/builtin/packages/py-libsonata/package.py +++ b/var/spack/repos/builtin/packages/py-libsonata/package.py @@ -18,6 +18,8 @@ class PyLibsonata(PythonPackage): version("master", branch="master") version("0.1.25", sha256="b332efa718123ee265263e1583a5998eaa945a13b8a22903873764cf1d8173fa") + depends_on("cxx", type="build") # generated + depends_on("catch2@2.13:", type="test") depends_on("cmake@3.16:", type="build") depends_on("fmt@7.1:") diff --git a/var/spack/repos/builtin/packages/py-lightgbm/package.py b/var/spack/repos/builtin/packages/py-lightgbm/package.py index 0596e07ecc68b5..cb4a17d8ee5a0c 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 be9259fa78fd71..81fe84015f07ca 100644 --- a/var/spack/repos/builtin/packages/py-lightly/package.py +++ b/var/spack/repos/builtin/packages/py-lightly/package.py @@ -17,6 +17,7 @@ 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") @@ -34,39 +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") - depends_on("py-setuptools@21:", when="@1.4.8,1.4.15:1.4.25", type=("build", "run")) - depends_on("py-setuptools@21:65.5.1", when="@:1.4.1", type=("build", "run")) + 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.25.3:", when="@1.4.8:", type=("build", "run")) - depends_on("py-urllib3@1.15.1:", 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")) + 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/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")) + # 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") - # 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/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") # 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-uq-box/package.py b/var/spack/repos/builtin/packages/py-lightning-uq-box/package.py new file mode 100644 index 00000000000000..ec4eab6acccafc --- /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 f93c80f2eca55d..36502f236cdc52 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 cee444adfbf7f7..f48326981fb32c 100644 --- a/var/spack/repos/builtin/packages/py-lightning/package.py +++ b/var/spack/repos/builtin/packages/py-lightning/package.py @@ -17,6 +17,13 @@ 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") @@ -36,77 +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.13:3", when="@2.2:", 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.4:5", when="@2.2:", 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 0182330d79ad76..491c7468a4ec57 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/package.py b/var/spack/repos/builtin/packages/py-line-profiler/package.py index a8dc62c6565d0a..4001fef2e0fa50 100644 --- a/var/spack/repos/builtin/packages/py-line-profiler/package.py +++ b/var/spack/repos/builtin/packages/py-line-profiler/package.py @@ -21,6 +21,8 @@ class PyLineProfiler(PythonPackage): 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") @@ -30,7 +32,7 @@ class PyLineProfiler(PythonPackage): 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("py-ninja", 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:") 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 00c78994137622..89034f15c7bdbb 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 00000000000000..ac0de717a6e993 --- /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 d55adb4510cb73..4670788828baf5 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 73e8f568435f33..758e942337694b 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")) diff --git a/var/spack/repos/builtin/packages/py-lmdb/package.py b/var/spack/repos/builtin/packages/py-lmdb/package.py index 9a953753e38915..2707bda7f5e9e9 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 00000000000000..84472f699fc5c1 --- /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 d5d88abb93a3a6..2153da2db5c271 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 d35d5544325fde..42f55fb5a2061a 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 783fc91e008f81..25e778e6afbc99 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 7b6c31b08fa7cb..cda0bd25f67bd7 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 f3b889859dc223..79a7caea39b96b 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 ffddbafe0eb250..d76360b04e81ae 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 0c547d66d56ac5..cdc6091851472f 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 0a8badbe14c132..ff8406b5bb9c90 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 4b529cd9c5ec88..f07e5f22fc9410 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 1082fd0f42e774..a16727820379aa 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-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py index 1dee1e7b4c47fc..59a1099651e655 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 7007c88d0dbfd9..00000000000000 --- 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 033fc6de536711..04b5d63447367e 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,12 +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") @@ -60,80 +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", - deprecated=True, - ) - version( - "2.2.4", - sha256="029620799e581802961ac1dcff5cb5d3ee2f602e0db9c0f202a90495b37d2126", - deprecated=True, - ) - version( - "2.2.3", - sha256="7355bf757ecacd5f0ac9dd9523c8e1a1103faadf8d33c22664178e17533f8ce5", - deprecated=True, - ) - version( - "2.2.2", - sha256="4dc7ef528aad21f22be85e95725234c5178c0f938e2228ca76640e5e84d8cde8", - deprecated=True, - ) - version( - "2.0.2", - sha256="0ffbc44faa34a8b1704bc108c451ecf87988f900ef7ce757b8e2e84383121ff1", - deprecated=True, - ) - version( - "2.0.0", - sha256="36cf0985829c1ab2b8b1dae5e2272e53ae681bf33ab8bedceed4f0565af5f813", - deprecated=True, - ) + + depends_on("c", type="build") + depends_on("cxx", type="build") # https://matplotlib.org/stable/users/explain/figure/backends.html - # From `lib/matplotlib/rcsetup.py`: - interactive_bk = [ + # 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": @@ -158,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/users/installing/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")) @@ -168,15 +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:", when="@3.8.4:", type=("build", "link", "run")) - depends_on("py-numpy@1.21:1", when="@3.8.0:3.8.3", type=("build", "link", "run")) - depends_on("py-numpy@1.20:1", when="@3.7", type=("build", "link", "run")) - depends_on("py-numpy@1.19:1", when="@3.6", type=("build", "link", "run")) - depends_on("py-numpy@1.17:1", when="@3.5", type=("build", "link", "run")) - depends_on("py-numpy@1.16:1", when="@3.4", type=("build", "link", "run")) - depends_on("py-numpy@1.15:1", when="@3.3", type=("build", "link", "run")) - depends_on("py-numpy@1.11:1", when="@:3.2", 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")) @@ -189,15 +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") - # 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 @@ -211,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", @@ -226,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 @@ -253,15 +234,18 @@ 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 @@ -272,22 +256,21 @@ class PyMatplotlib(PythonPackage): 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": @@ -295,13 +278,62 @@ def flag_handler(self, name, flags): 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 spack.error.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. @@ -309,13 +341,19 @@ def setup_build_environment(self, env): 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") @@ -329,24 +367,3 @@ def configure(self): # 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") - 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"), - ) - 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"), - ) - - @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") - for toolkit in ["axes_grid1", "axisartist", "mplot3d"]: - python("-m", "pytest", "--pyargs", f"mpl_toolkits.{toolkit}.tests") diff --git a/var/spack/repos/builtin/packages/py-maturin/package.py b/var/spack/repos/builtin/packages/py-maturin/package.py index 783077ba0b2215..ab2858ec7d97e9 100644 --- a/var/spack/repos/builtin/packages/py-maturin/package.py +++ b/var/spack/repos/builtin/packages/py-maturin/package.py @@ -14,16 +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 31e6c2bd43d81a..5f91cb917e0319 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 69f5a0c85304ef..56edcbb7648a43 100644 --- a/var/spack/repos/builtin/packages/py-mdanalysis/package.py +++ b/var/spack/repos/builtin/packages/py-mdanalysis/package.py @@ -27,6 +27,9 @@ class PyMdanalysis(PythonPackage): 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, @@ -42,9 +45,11 @@ 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-griddataformats@0.4.0:", type=("build", "run")) depends_on("py-mmtf-python@1.0.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 87d28468fa9367..e794a7f874056c 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 d831c2d05617a8..4160aad0b46a19 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 @@ def cmake_args(self): @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 78358c4401dc00..f6b6b3c9c46421 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 c8f752729323ba..e5c6bbba0c8c6d 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 344b31ae575513..74a5cc70904b67 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 8e1832b114d14b..8d171f36f56c0c 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 c225cad54176a4..d9df736858955f 100644 --- a/var/spack/repos/builtin/packages/py-meson-python/package.py +++ b/var/spack/repos/builtin/packages/py-meson-python/package.py @@ -17,6 +17,7 @@ class PyMesonPython(PythonPackage): 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") @@ -25,12 +26,19 @@ 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")) 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 d6a6ae2caceb13..c9d35f1185108b 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 3be38a414c857b..59ab20a012b95f 100644 --- a/var/spack/repos/builtin/packages/py-metpy/package.py +++ b/var/spack/repos/builtin/packages/py-metpy/package.py @@ -20,20 +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")) - # 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")) + 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-mgmetis/package.py b/var/spack/repos/builtin/packages/py-mgmetis/package.py new file mode 100644 index 00000000000000..2d673853116506 --- /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 0a0b8e3e397730..60a383fe1dcb57 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-minkowskiengine/package.py b/var/spack/repos/builtin/packages/py-minkowskiengine/package.py index 41fa2afc87f241..6ae752d6fe970b 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 00000000000000..cd4835229f1312 --- /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 61d42fff953495..12f2433c6b06bf 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 5e3f85ab7b63a0..eed59d4fbccea6 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 b108dd9cf6b9b4..b1bd0831442133 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 015c8ded2a66fa..1d62e15c550745 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 00000000000000..453101527221db --- /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 ebf5d4a16f7751..05255703b51a8e 100644 --- a/var/spack/repos/builtin/packages/py-mne/package.py +++ b/var/spack/repos/builtin/packages/py-mne/package.py @@ -9,7 +9,7 @@ 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" @@ -17,6 +17,7 @@ class PyMne(PythonPackage): 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") @@ -30,10 +31,10 @@ 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")) @@ -41,6 +42,7 @@ class PyMne(PythonPackage): 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")) # * @@ -54,22 +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.6.1: ^python@:3.9", 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 db594d0051f58f..b353982e1e0bd3 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-monai/package.py b/var/spack/repos/builtin/packages/py-monai/package.py new file mode 100644 index 00000000000000..78f8771c75e388 --- /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 908a1188ffa9a2..15f269967fb8da 100644 --- a/var/spack/repos/builtin/packages/py-morphio/package.py +++ b/var/spack/repos/builtin/packages/py-morphio/package.py @@ -25,6 +25,8 @@ class PyMorphio(PythonPackage): 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 76e4891780a8e5..c447e700a142de 100644 --- a/var/spack/repos/builtin/packages/py-mpi4py/package.py +++ b/var/spack/repos/builtin/packages/py-mpi4py/package.py @@ -16,9 +16,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 +35,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): diff --git a/var/spack/repos/builtin/packages/py-mpmath/package.py b/var/spack/repos/builtin/packages/py-mpmath/package.py index f38a363292181d..9a10d0fb17bc11 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-msgpack/package.py b/var/spack/repos/builtin/packages/py-msgpack/package.py index 44e6e84ec0db68..961e8d0a451c5e 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-multidict/package.py b/var/spack/repos/builtin/packages/py-multidict/package.py index f37228dc1965e2..152becac958447 100644 --- a/var/spack/repos/builtin/packages/py-multidict/package.py +++ b/var/spack/repos/builtin/packages/py-multidict/package.py @@ -21,6 +21,8 @@ class PyMultidict(PythonPackage): version("5.1.0", sha256="25b4e5f22d3a37ddf3effc0710ba692cfc792c2b9edfb9c05aefe823256e84d5") version("4.7.6", sha256="fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430") + depends_on("c", type="build") # generated + depends_on("py-setuptools@40:", type="build") # Historical dependencies diff --git a/var/spack/repos/builtin/packages/py-multiecho/package.py b/var/spack/repos/builtin/packages/py-multiecho/package.py index f1b5e7e8e16a6e..f9619d0abaa317 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 161d46cb356783..0325b941f0c82f 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-murmurhash/package.py b/var/spack/repos/builtin/packages/py-murmurhash/package.py index ecd8d65d1ea7af..fb4e74b0d6149e 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 f247ea1b0ddc67..684903fadba57a 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 92df3ac7f2aa17..184247aef8c1fb 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 0b669e65294774..2716d8b9d24925 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 @@ 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 3c7164f651a355..18065a78802c4d 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 @@ 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 81f152e53b16cf..926d45d551c885 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 c864f5a32ba63d..ffc210d589f646 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 00000000000000..fc2a3bde157293 --- /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 8a332fa90f84b5..355aa30d9eaf3e 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-nanobind/package.py b/var/spack/repos/builtin/packages/py-nanobind/package.py index 6fb598acdcaabb..1147671f6f7533 100644 --- a/var/spack/repos/builtin/packages/py-nanobind/package.py +++ b/var/spack/repos/builtin/packages/py-nanobind/package.py @@ -23,6 +23,15 @@ class PyNanobind(PythonPackage): license("BSD-3-Clause") 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 ) @@ -51,12 +60,18 @@ 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): diff --git a/var/spack/repos/builtin/packages/py-nanomath/package.py b/var/spack/repos/builtin/packages/py-nanomath/package.py index f9db95f64aee7f..d67eefff526f7a 100644 --- a/var/spack/repos/builtin/packages/py-nanomath/package.py +++ b/var/spack/repos/builtin/packages/py-nanomath/package.py @@ -14,6 +14,7 @@ class PyNanomath(PythonPackage): maintainers("Pandapip1") + version("1.4.0", sha256="ed7a38fbb156d9a68a95c2570fe3c2035321d0a3e234580496750afca4927ced") version("1.3.0", sha256="c35a024b10b34dd8f539cefed1fd69e0a46d18037ca48bed63c7941c67ae028e") depends_on("py-setuptools", type=("build",)) diff --git a/var/spack/repos/builtin/packages/py-nanoplot/package.py b/var/spack/repos/builtin/packages/py-nanoplot/package.py index 080ae62bf0991f..c7a3ddeda73fbd 100644 --- a/var/spack/repos/builtin/packages/py-nanoplot/package.py +++ b/var/spack/repos/builtin/packages/py-nanoplot/package.py @@ -10,10 +10,11 @@ class PyNanoplot(PythonPackage): """Plotting scripts for long read sequencing data""" homepage = "https://github.com/wdecoster/NanoPlot" - pypi = "NanoPlot/NanoPlot-1.42.0.tar.gz" + 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",)) @@ -24,7 +25,7 @@ class PyNanoplot(PythonPackage): 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")) + 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-narwhals/package.py b/var/spack/repos/builtin/packages/py-narwhals/package.py new file mode 100644 index 00000000000000..48899ac9d0e350 --- /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-neobolt/package.py b/var/spack/repos/builtin/packages/py-neobolt/package.py index 6cf9fd00b5533d..7cc399be5a77da 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-nest-asyncio/package.py b/var/spack/repos/builtin/packages/py-nest-asyncio/package.py index 9cf65d6e334168..6bba7b02caf0dc 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 3316e69692d7d5..5d3c1396954198 100644 --- a/var/spack/repos/builtin/packages/py-netcdf4/package.py +++ b/var/spack/repos/builtin/packages/py-netcdf4/package.py @@ -10,12 +10,15 @@ 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") @@ -30,11 +33,14 @@ class PyNetcdf4(PythonPackage): 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") @@ -48,6 +54,21 @@ 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:"): diff --git a/var/spack/repos/builtin/packages/py-netifaces/package.py b/var/spack/repos/builtin/packages/py-netifaces/package.py index 5cf1394c7bb0b2..fb8096d1e2afb2 100644 --- a/var/spack/repos/builtin/packages/py-netifaces/package.py +++ b/var/spack/repos/builtin/packages/py-netifaces/package.py @@ -18,4 +18,6 @@ class PyNetifaces(PythonPackage): version("0.10.5", sha256="59d8ad52dd3116fcb6635e175751b250dc783fb011adba539558bd764e5d628b") + depends_on("c", type="build") # generated + 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 02f83773298118..a8322db54fc821 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 1b4c0bb01e5c3a..4eee7c0c7350aa 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 283ba61173980c..4f360c448495ee 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 09d123e0a36c3b..c8bf1ac0f93147 100644 --- a/var/spack/repos/builtin/packages/py-networkx/package.py +++ b/var/spack/repos/builtin/packages/py-networkx/package.py @@ -50,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-ninja/package.py b/var/spack/repos/builtin/packages/py-ninja/package.py index db6cbd2417117a..5153281d74db92 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 @@ 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 db9cc2c5b85941..35c9bc5cf9fdcd 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,12 +62,21 @@ 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", diff --git a/var/spack/repos/builtin/packages/py-nodeenv/package.py b/var/spack/repos/builtin/packages/py-nodeenv/package.py index ef8028d21f7b3b..6fddf220e42358 100644 --- a/var/spack/repos/builtin/packages/py-nodeenv/package.py +++ b/var/spack/repos/builtin/packages/py-nodeenv/package.py @@ -16,5 +16,6 @@ class PyNodeenv(PythonPackage): version("1.7.0", sha256="e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b") version("1.3.3", sha256="ad8259494cf1c9034539f6cced78a1da4840a4b157e23640bc4a0c0546b0cb7a") + depends_on("python +ssl", when="@1.5:", type=("build", "run")) depends_on("py-setuptools", when="@1.7:", type=("build", "run")) 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 00000000000000..d97e7868527847 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-non-regression-test-tools/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 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.2", tag="v1.1.2", preferred=True) + + depends_on("py-numpy", type="run") + depends_on("python@3.10:", type="run") + depends_on("py-setuptools", type="build") 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 00000000000000..c51300eafd9102 --- /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 2b5b29bba384ea..edab57b2c30980 100644 --- a/var/spack/repos/builtin/packages/py-numba/package.py +++ b/var/spack/repos/builtin/packages/py-numba/package.py @@ -28,6 +28,9 @@ 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")) 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 00000000000000..ab24f932375194 --- /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 5414661794c0a9..15da017a924b9d 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 a712d455843422..adb2f75115b62e 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: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 5162eca2a3d6d7..478ec2c5cb77f3 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-numpy-quaternion/package.py b/var/spack/repos/builtin/packages/py-numpy-quaternion/package.py index fffb983756b84c..e7e7e1a60a3c59 100644 --- a/var/spack/repos/builtin/packages/py-numpy-quaternion/package.py +++ b/var/spack/repos/builtin/packages/py-numpy-quaternion/package.py @@ -26,6 +26,8 @@ class PyNumpyQuaternion(PythonPackage): sha256="b0dc670b2adc8ff2fb8d6105a48769873f68d6ccbe20af6a19e899b1e8d48aaf", ) + depends_on("c", type="build") # generated + variant("scipy", default=True, description="Build with scipy support") variant("numba", default=True, description="Build with numba support") 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 827b52416214d2..559fa83fd47726 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 aa9496ba7ddc97..0497a133c3cade 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -22,6 +22,12 @@ 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") @@ -73,45 +79,56 @@ class PyNumpy(PythonPackage): version("1.17.4", sha256="f58913e9227400f1395c7b800503ebfdb0772f1c33ff8cb4d6451c06cabdf316") version("1.17.3", sha256="a0678793096205a4d784bd99f32803ba8100f639cf3b932dc63b21621390ea7e") + depends_on("c", type="build") + depends_on("cxx", type="build") + # Based on PyPI wheel availability - 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")) - - # Required to use --config-settings - depends_on("py-pip@23.1:", when="@1.26:", type="build") - - # Build dependencies (do not include upper bound unless known issues) - depends_on("py-cython@0.29.34:", 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-meson-python@0.15:", when="@1.26.4:", type="build") + 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 - depends_on("py-pyproject-metadata@0.7.1:", when="@1.26.0:1.26.3", type="build") - depends_on("py-tomli@1:", when="@1.26.0:1.26.3 ^python@:3.10", type="build") - depends_on("py-setuptools@60:", when="@1.26.0:1.26.3 ^python@3.12:", type="build") - 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.0:1.26.3 platform=windows", type="build") - depends_on("ninja@1.8.2:", when="@1.26.0:1.26.3", type="build") - depends_on("pkgconfig", when="@1.26.0:1.26.3", type="build") + 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") @@ -149,6 +166,7 @@ class PyNumpy(PythonPackage): # 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", @@ -167,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): @@ -410,10 +430,7 @@ def set_blas_lapack(self): @when("@1.26:") def setup_build_environment(self, env): - if self.spec.satisfies("%apple-clang@15:"): - # https://github.com/scipy/scipy/issues/19357 - env.append_flags("LDFLAGS", "-Wl,-ld_classic") - elif self.spec.satisfies("%msvc"): + 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}"') 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 d43371b80db941..248d78fc49d64c 100644 --- a/var/spack/repos/builtin/packages/py-nvidia-dali/package.py +++ b/var/spack/repos/builtin/packages/py-nvidia-dali/package.py @@ -23,10 +23,21 @@ class PyNvidiaDali(PythonPackage): 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", - preferred=True, 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, ) @@ -109,10 +120,21 @@ class PyNvidiaDali(PythonPackage): 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", - preferred=True, 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, ) @@ -196,6 +218,7 @@ class PyNvidiaDali(PythonPackage): ) cuda120_versions = ( + "@1.41.0-cuda120", "@1.36.0-cuda120", "@1.27.0-cuda120", "@1.26.0-cuda120", @@ -205,6 +228,7 @@ 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", diff --git a/var/spack/repos/builtin/packages/py-obspy/package.py b/var/spack/repos/builtin/packages/py-obspy/package.py index 318f9f8da8d5bf..956b80e830dabc 100644 --- a/var/spack/repos/builtin/packages/py-obspy/package.py +++ b/var/spack/repos/builtin/packages/py-obspy/package.py @@ -20,6 +20,9 @@ class PyObspy(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-okada-wrapper/package.py b/var/spack/repos/builtin/packages/py-okada-wrapper/package.py index 54f524516bc9b2..5d404f4677e698 100644 --- a/var/spack/repos/builtin/packages/py-okada-wrapper/package.py +++ b/var/spack/repos/builtin/packages/py-okada-wrapper/package.py @@ -20,6 +20,8 @@ class PyOkadaWrapper(PythonPackage): "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")) 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 00000000000000..6a36cb60498a94 --- /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/package.py b/var/spack/repos/builtin/packages/py-onnx/package.py index 023228b4ef27a5..446f6217fd37fe 100644 --- a/var/spack/repos/builtin/packages/py-onnx/package.py +++ b/var/spack/repos/builtin/packages/py-onnx/package.py @@ -19,8 +19,10 @@ 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") @@ -34,6 +36,8 @@ class PyOnnx(PythonPackage): version("1.6.0", sha256="3b88c3fe521151651a0403c4d131cb2e0311bd28b753ef692020a432a81ce345") version("1.5.0", sha256="1a584a4ef62a6db178c257fffb06a9d8e61b41c0a80bfd8bcd8a253d72c4b0b4") + depends_on("cxx", type="build") # generated + # CMakeLists.txt depends_on("cmake@3.1:", type="build") depends_on("py-pybind11@2.2:", type=("build", "link")) @@ -41,6 +45,7 @@ class PyOnnx(PythonPackage): # requirements.txt depends_on("py-setuptools@64:", type="build") depends_on("py-setuptools", type="build") + depends_on("protobuf") 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") @@ -52,10 +57,11 @@ class PyOnnx(PythonPackage): # https://github.com/protocolbuffers/protobuf/pull/8794, fixed in # https://github.com/onnx/onnx/pull/3112 depends_on("py-protobuf@:3.17", type=("build", "run"), when="@:1.8") - depends_on("py-protobuf+cpp", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) 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") @@ -64,3 +70,31 @@ class PyOnnx(PythonPackage): # '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 00000000000000..a48c1921828c37 --- /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 +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 ef20293fa0772a..a5d375f8169298 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 @@ -22,10 +23,17 @@ class PyOnnxruntime(CMakePackage, PythonExtension): license("MIT") + 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 @@ -46,6 +54,8 @@ class PyOnnxruntime(CMakePackage, PythonExtension): 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-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")) @@ -55,7 +65,8 @@ class PyOnnxruntime(CMakePackage, PythonExtension): depends_on("protobuf@:3.19", when="@:1.11") depends_on("py-cerberus", type=("build", "run")) depends_on("py-onnx", type=("build", "run")) - depends_on("py-onnx@:1.15.0", type=("build", "run"), when="@:1.17.1") + 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("cuda", when="+cuda") @@ -63,6 +74,35 @@ class PyOnnxruntime(CMakePackage, PythonExtension): depends_on("iconv", type=("build", "link", "run")) depends_on("re2+shared") + 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") @@ -81,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( @@ -95,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 @@ -133,11 +195,22 @@ def cmake_args(self): ) ) + 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 00000000000000..45fa3a0ee79b77 --- /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-openmc/package.py b/var/spack/repos/builtin/packages/py-openmc/package.py index 1ace8bc018cb56..3272eae617ac91 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 3dcd44e89020f4..09fc0273c3deff 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 16806c586ff933..12e29e4f24bb78 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 1547f1f152ed03..f96bc803b4f966 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 @@ 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 00000000000000..f8b0a07ae3bd01 --- /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-optree/package.py b/var/spack/repos/builtin/packages/py-optree/package.py index 14d0dd462db4c1..96e10b8fff50a7 100644 --- a/var/spack/repos/builtin/packages/py-optree/package.py +++ b/var/spack/repos/builtin/packages/py-optree/package.py @@ -16,6 +16,8 @@ class PyOptree(PythonPackage): 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") 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 a9debf9a3b33f9..8400f7ae217986 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 @@ def install(self, spec, prefix): 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 f53f97fd3834ee..3e50ac8da0c8d6 100644 --- a/var/spack/repos/builtin/packages/py-oracledb/package.py +++ b/var/spack/repos/builtin/packages/py-oracledb/package.py @@ -18,6 +18,8 @@ class PyOracledb(PythonPackage): version("1.2.2", sha256="dd9f63084e44642b484a46b2fcfb4fc921f39facf494a1bab00628fa6409f4fc") + depends_on("c", type="build") # generated + 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") diff --git a/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py b/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py index a74a1198f017f1..99d1af70c9812d 100644 --- a/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py +++ b/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py @@ -13,7 +13,7 @@ class PyOrbaxCheckpoint(PythonPackage): composable API which maximizes flexibility for diverse use cases. """ - homepage = "http://github.com/google/orbax" + homepage = "https://github.com/google/orbax" pypi = "orbax_checkpoint/orbax_checkpoint-0.5.3.tar.gz" license("Apache-2.0") 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 4ef84915c7574b..dc06702eb37333 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 4bddb15e5099ea..b3e966897e29b2 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 e23c1a9cbe7a4d..3c8f5fe8116e19 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 f7137d0288336e..f5203a22ce2270 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 47a9c79065a1f3..9cd6265bbe2618 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 240e8c489497da..ed01a543314fdd 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 00000000000000..6da8b1d9dc5721 --- /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 5ebb03667ec7ec..63c6597b51c173 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -17,10 +17,10 @@ class PyPandas(PythonPackage): skip_modules = ["pandas.tests", "pandas.plotting._matplotlib", "pandas.core._numba.kernels"] - maintainers("adamjstewart") - 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") @@ -72,84 +72,91 @@ class PyPandas(PythonPackage): variant("performance", default=True, description="Build recommended performance dependencies") variant("excel", when="@1.4:", default=False, description="Build with support for Excel") - # Based on PyPI wheel versions - 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")) - - 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@3.0.5", when="@2.2:", type="build") - depends_on("py-cython@0.29.33:2", when="@2.0:2.1", type="build") - depends_on("py-cython@0.29.32:2", when="@1.4.4:1", 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:1.4.2", type="build") - depends_on("py-cython@0.29.21:2", when="@1.1.3:1.3.3", type="build") - depends_on("py-cython@0.29.16:2", when="@1.1.0:1.1.2", type="build") - depends_on("py-cython@0.29.13:2", when="@1.0", type="build") - depends_on("py-versioneer+toml", when="@2:", type="build") - - depends_on("py-numpy@1.22.4:", when="@2.2.2:", type=("build", "run")) - depends_on("py-numpy@1.22.4:1", when="@2.1:2.2.1", type=("build", "run")) - depends_on("py-numpy@1.20.3:1", when="@1.5:2.0", type=("build", "run")) - depends_on("py-numpy@1.18.5:1", when="@1.4", type=("build", "run")) - depends_on("py-numpy@1.17.3:1", when="@1.3", type=("build", "run")) - depends_on("py-numpy@1.16.5:1", when="@1.2", type=("build", "run")) - depends_on("py-numpy@1.15.4:1", when="@1.1", type=("build", "run")) - depends_on("py-numpy@1.13.3:1", when="@1.0", type=("build", "run")) - # 'NUMPY_IMPORT_ARRAY_RETVAL' was removed in numpy@1.19 - depends_on("py-numpy@1.13.3: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")) - - with when("+performance"): - depends_on("py-bottleneck@1.3.4:", when="@2.1:", type="run") - depends_on("py-bottleneck@1.3.2:", when="@1.5:", type="run") - depends_on("py-bottleneck@1.3.1:", when="@1.4:", type="run") - depends_on("py-bottleneck@1.2.1:", when="@0.25:", type="run") - depends_on("py-numba@0.55.2:", when="@2.1:", type="run") - depends_on("py-numba@0.53.1:", when="@2.0:", type="run") - depends_on("py-numexpr@2.8.0:", when="@2.1:", type="run") - depends_on("py-numexpr@2.7.3:", when="@1.5:", type="run") - depends_on("py-numexpr@2.7.1:", when="@1.4:", type="run") - depends_on("py-numexpr@2.7.0:", when="@1.3:", type="run") - depends_on("py-numexpr@2.6.8:", when="@1.2:", type="run") - depends_on("py-numexpr@2.6.2:", when="@0.25:", type="run") - - with when("+excel"): - # Excel dependencies for 1.4+ (not coded up for earlier versions) - depends_on("py-odfpy@1.4.1:", type="run", when="@2.0:") - depends_on("py-openpyxl@3.1:", type="run", when="@2.2:") - depends_on("py-openpyxl@3.0.10:", type="run", when="@2.1:") - depends_on("py-openpyxl@3.0.7:", type="run", when="@1.5:") - depends_on("py-openpyxl@3.0.3:", type="run", when="@1.4:") - depends_on("py-python-calamine@0.1.7:", type="run", when="@2.2:") - depends_on("py-pyxlsb@1.0.10:", type="run", when="@2.2:") - depends_on("py-pyxlsb@1.0.9:", type="run", when="@2.1:") - depends_on("py-pyxlsb@1.0.8:", type="run", when="@1.5:") - depends_on("py-pyxlsb@1.0.6:", type="run", when="@1.4:") - depends_on("py-xlrd@2.0.1:", type="run", when="@2.2:") - depends_on("py-xlrd@2.0.1:", type="run", when="@1.4:") - depends_on("py-xlwt@1.3.0:", type="run", when="@1.4:1.5") - depends_on("py-xlsxwriter@3.0.5:", type="run", when="@2.2:") - depends_on("py-xlsxwriter@3.0.3:", type="run", when="@2.1:") - depends_on("py-xlsxwriter@1.4.3:", type="run", when="@1.5:") - depends_on("py-xlsxwriter@1.2.2:", type="run", when="@1.4:") - - # 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") + depends_on("c", 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 versions + depends_on("python@3.9:3.13", when="@2.2.3:") + depends_on("python@3.9:3.12", when="@2.1.1:") + depends_on("python@3.9:3.11", when="@2.1.0") + depends_on("python@3.8:3.11", when="@1.5:2.0") + depends_on("python@3.8:3.10", when="@1.4") + depends_on("python@:3.10", when="@1.3.3:1.3") + depends_on("python@:3.9", when="@1.1.3:1.3.2") + depends_on("python@:3.8", when="@0.25.2: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 52bff696fcc7de..4444026be7f50d 100644 --- a/var/spack/repos/builtin/packages/py-panel/package.py +++ b/var/spack/repos/builtin/packages/py-panel/package.py @@ -9,7 +9,7 @@ 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") diff --git a/var/spack/repos/builtin/packages/py-paramiko/package.py b/var/spack/repos/builtin/packages/py-paramiko/package.py index 2f2675656f60e1..3f586403d0098e 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 d7d281012fefd5..755d097f9932c2 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 edc2b4b0554901..2e128a25e90f3a 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 aea20abad21a73..ec01736ad67697 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,10 @@ 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 13fdca33dba3f3..19a507574cdf37 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 ab4aedaa66ec52..b2be054548b933 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-pbr/package.py b/var/spack/repos/builtin/packages/py-pbr/package.py index 41621f4a025e49..e5bac4262e7b1b 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 00000000000000..8cf360160bb3e1 --- /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 00000000000000..c3aebb38b76f76 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pdm-backend/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 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.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 488972ed509b20..59f4a6fff54a95 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 c2026641b628ae..ea98e2ce6a9c96 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 959482d141a678..4513912e67336e 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,6 +2,7 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack.build_systems.python import PythonPipBuilder from spack.package import * @@ -18,6 +19,8 @@ class PyPennylaneLightningKokkos(CMakePackage, PythonExtension, CudaPackage, ROC 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") @@ -28,9 +31,12 @@ class PyPennylaneLightningKokkos(CMakePackage, PythonExtension, CudaPackage, ROC 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:4.1", when="@0.31", type=("run", "build")) - depends_on("kokkos@4:4.2", when="@0.32:", 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 = { @@ -84,7 +90,7 @@ class PyPennylaneLightningKokkos(CMakePackage, PythonExtension, CudaPackage, ROC # 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-lightning~kokkos", type=("build", "run"), when="@:0.31") - for v in range(33, 36): + 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}") @@ -138,8 +144,7 @@ def build(self, pkg, spec, prefix): 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 e594e9fa681862..383e03a2d2f34b 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,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack.build_systems.python import PythonPipBuilder from spack.package import * @@ -12,13 +13,15 @@ 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.35.1.tar.gz" + url = "https://github.com/PennyLaneAI/pennylane-lightning/archive/refs/tags/v0.37.0.tar.gz" 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") @@ -29,6 +32,8 @@ class PyPennylaneLightning(CMakePackage, PythonExtension): 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", @@ -109,8 +114,7 @@ def build(self, pkg, spec, prefix): 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 3bf4b82c8c0ce4..9d8620e322014d 100644 --- a/var/spack/repos/builtin/packages/py-pennylane/package.py +++ b/var/spack/repos/builtin/packages/py-pennylane/package.py @@ -12,13 +12,15 @@ 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.35.1.tar.gz" + url = "https://github.com/PennyLaneAI/pennylane/archive/refs/tags/v0.37.0.tar.gz" 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") @@ -35,27 +37,30 @@ class PyPennylane(PythonPackage): depends_on("py-setuptools", type="build") depends_on("py-setuptools", type=("build", "run"), when="@0.33") - depends_on("py-numpy", 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.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"), 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")) 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, 36): + 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:") # The following packages are required by the `pl-device-test binary` depends_on("py-pytest", type="test") diff --git a/var/spack/repos/builtin/packages/py-petsc4py/package.py b/var/spack/repos/builtin/packages/py-petsc4py/package.py index 82f233b6c35534..df4522dabc399c 100644 --- a/var/spack/repos/builtin/packages/py-petsc4py/package.py +++ b/var/spack/repos/builtin/packages/py-petsc4py/package.py @@ -20,6 +20,13 @@ class PyPetsc4py(PythonPackage): license("BSD-2-Clause") version("main", branch="main") + 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") @@ -68,10 +75,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")) @@ -82,7 +93,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.21", "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 5a6346338ab527..d6b7759fef7100 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 @@ 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 3f88711942b9ab..3dfa74297cdb8c 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 a92e563e6102d9..770bc90c6777a9 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 c0b56c9ba434bb..455ebd3ec1d201 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 bd8e1826cc3640..3fafdb822a16a8 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-pickle5/package.py b/var/spack/repos/builtin/packages/py-pickle5/package.py index e5b6372aa7a929..f2c03dc1081ff0 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 bdcf00d81cd63a..b35dc0a4eef19b 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 13c1c1430c3c47..59dd312678a0f5 100644 --- a/var/spack/repos/builtin/packages/py-pillow-simd/package.py +++ b/var/spack/repos/builtin/packages/py-pillow-simd/package.py @@ -16,6 +16,9 @@ class PyPillowSimd(PyPillowBase): homepage = "https://github.com/uploadcare/pillow-simd" pypi = "Pillow-SIMD/Pillow-SIMD-7.0.0.post3.tar.gz" + version( + "9.5.0.post1", sha256="8c89b85c4085532752625f2cc066a28547cebb98529acf932d5d84c1a7ab2abc" + ) version( "9.0.0.post1", sha256="918541cfaa90ba3c0e1bae5da31ba1b1f52b09c0009bd90183b787af4e018263" ) @@ -26,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 59968f0551b705..1e0e5374200cfd 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 @@ class PyPillowBase(PythonPackage): """Base class for Pillow and its fork Pillow-SIMD.""" - maintainers("adamjstewart") license("HPND") + maintainers("adamjstewart") provides("pil") # These defaults correspond to Pillow defaults # https://pillow.readthedocs.io/en/stable/installation/building-from-source.html - VARIANTS_IN_SETUP_CFG = ( + VARIANTS = ( "zlib", "jpeg", "tiff", "freetype", + "raqm", "lcms", "webp", "webpmux", @@ -31,18 +32,20 @@ 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/stable/installation/python-support.html with default_args(type=("build", "link", "run")): - depends_on("python@3.8:3.12", when="@10.1:") + 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") @@ -53,6 +56,7 @@ class PyPillowBase(PythonPackage): # 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") @@ -62,21 +66,28 @@ class PyPillowBase(PythonPackage): 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") + @when("@10:") + def config_settings(self, spec, prefix): + settings = {"parallel": make_jobs} - def patch(self): - """Patch setup.py to provide library and include directories - for dependencies.""" + 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"): @@ -85,21 +96,40 @@ def patch(self): 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) + 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 + ) - def variant_to_cfg(variant): - able = "enable" if "+" + variant in self.spec else "disable" - return "{0}_{1}=1\n".format(able, variant) + if self.spec.satisfies("@:9"): - 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)) + def variant_to_cfg(variant): + able = "enable" if "+" + variant in self.spec else "disable" + return "{0}_{1}=1\n".format(able, variant) - setup.write("rpath={0}\n".format(":".join(self.rpath))) - setup.write("[install]\n") + 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", make_jobs) @@ -113,6 +143,8 @@ class PyPillow(PyPillowBase): homepage = "https://python-pillow.org/" 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") @@ -133,7 +165,11 @@ 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", diff --git a/var/spack/repos/builtin/packages/py-pip/package.py b/var/spack/repos/builtin/packages/py-pip/package.py index 111e50911b87b1..7f63c25837bd3e 100644 --- a/var/spack/repos/builtin/packages/py-pip/package.py +++ b/var/spack/repos/builtin/packages/py-pip/package.py @@ -5,6 +5,7 @@ import os import sys +from spack.build_systems.python import PythonPipBuilder from spack.package import * @@ -48,11 +49,20 @@ class PyPip(Package, PythonExtension): name="pip-bootstrap", url="https://bootstrap.pypa.io/pip/zipapp/pip-22.3.1.pyz", checksum="c9363c70ad91d463f9492a8a2c89f60068f86b0239bd2a6aa77367aab5fefb3e", - when="platform=windows", + 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"): @@ -67,15 +77,14 @@ def install(self, spec, prefix): # itself, see: # https://discuss.python.org/t/bootstrapping-a-specific-version-of-pip/12306 whl = self.stage.archive_file - args = std_pip_args + ["--prefix=" + prefix, whl] 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. - args.insert(0, os.path.join(self.stage.source_path, "pip.pyz")) + script = os.path.join(self.stage.source_path, "pip.pyz") else: - args.insert(0, os.path.join(whl, "pip")) - python(*args) + script = os.path.join(whl, "pip") + python(script, *PythonPipBuilder.std_args(self), f"--prefix={prefix}", whl) 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 1df73c9419fbfa..95c5ab871b49d1 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 00000000000000..a232da9a56a8eb --- /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-pluggy/package.py b/var/spack/repos/builtin/packages/py-pluggy/package.py index 2efde37f3b4662..4c68dc482a7009 100644 --- a/var/spack/repos/builtin/packages/py-pluggy/package.py +++ b/var/spack/repos/builtin/packages/py-pluggy/package.py @@ -14,6 +14,7 @@ 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") @@ -23,10 +24,13 @@ class PyPluggy(PythonPackage): version("0.7.1", sha256="95eb8364a4708392bae89035f45341871286a333f749c3141c20573d2b3876e1") version("0.6.0", sha256="7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff") - depends_on("python@3.8:", when="@1.3:", type=("build", "run")) - depends_on("python@3.7:", when="@1.1:", type=("build", "run")) - depends_on("py-setuptools@45:", when="@1.1:", type="build") - depends_on("py-setuptools", type="build") - depends_on("py-setuptools-scm@6.2.3:+toml", when="@1.1:", 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"): + 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") + + 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 83454d9ee74a0f..9e82b28a786332 100644 --- a/var/spack/repos/builtin/packages/py-poetry-core/package.py +++ b/var/spack/repos/builtin/packages/py-poetry-core/package.py @@ -22,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 1386413016a2e2..c2baa0b5cbf8fb 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/package.py b/var/spack/repos/builtin/packages/py-poetry/package.py index b3e005e9ba2411..0191c806bb2542 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")) diff --git a/var/spack/repos/builtin/packages/py-pomegranate/package.py b/var/spack/repos/builtin/packages/py-pomegranate/package.py index 00055adcd24ad7..0a5af32a44616e 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-pot/package.py b/var/spack/repos/builtin/packages/py-pot/package.py index 4f7c63b602c2fa..5468559b7a7a97 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 00000000000000..9a4dcf5d56443d --- /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 d6011ec5cec698..9a3c1fe27d1d96 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-projectq/package.py b/var/spack/repos/builtin/packages/py-projectq/package.py index eac6aec7f09bbf..488e540cd66b97 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 00000000000000..9bca54cbfff9b6 --- /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 70146e632ac177..e0f2933f60d45f 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-protobuf/package.py b/var/spack/repos/builtin/packages/py-protobuf/package.py index f3ed5a097101ad..dbd674eac1bea6 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") @@ -60,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 fa68b56dae151f..8c62abeef1c210 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 9302655371795f..98a464a2c6f787 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 a35d1e08a38203..b9f2e4a9e97bca 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 4441e530034f11..78f0e9802b6556 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 ce5b26621f7e00..a2a41482d4b4ea 100644 --- a/var/spack/repos/builtin/packages/py-psyclone/package.py +++ b/var/spack/repos/builtin/packages/py-psyclone/package.py @@ -34,6 +34,8 @@ class PyPsyclone(PythonPackage): 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")) diff --git a/var/spack/repos/builtin/packages/py-psycopg2/package.py b/var/spack/repos/builtin/packages/py-psycopg2/package.py index cc6e805592912e..ca4d21ca8ac0f1 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 c150d6e9476bc4..a13c6d4e09a44c 100644 --- a/var/spack/repos/builtin/packages/py-py-spy/package.py +++ b/var/spack/repos/builtin/packages/py-py-spy/package.py @@ -17,6 +17,8 @@ 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. diff --git a/var/spack/repos/builtin/packages/py-py2bit/package.py b/var/spack/repos/builtin/packages/py-py2bit/package.py index ea15abb9e10417..08ad9f8ebc6a50 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 17a251913bbe3f..26b4076f4509ae 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-pyaml-env/package.py b/var/spack/repos/builtin/packages/py-pyaml-env/package.py new file mode 100644 index 00000000000000..298fc9f778397e --- /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 99d7c8adc8fe34..3d6bf8acded8a1 100644 --- a/var/spack/repos/builtin/packages/py-pyarrow/package.py +++ b/var/spack/repos/builtin/packages/py-pyarrow/package.py @@ -20,6 +20,8 @@ class PyPyarrow(PythonPackage, CudaPackage): 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") @@ -35,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") @@ -61,7 +65,11 @@ class PyPyarrow(PythonPackage, CudaPackage): depends_on("py-pip@:23.0", type="build") depends_on("py-numpy@1.16.6:", type=("build", "run"), when="@3:") - depends_on("py-numpy@1.14:", type=("build", "run"), when="@0.15:") + # 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", @@ -78,6 +86,8 @@ class PyPyarrow(PythonPackage, CudaPackage): "@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 28a5a69dc07936..b0690d4d30e288 100644 --- a/var/spack/repos/builtin/packages/py-pybedtools/package.py +++ b/var/spack/repos/builtin/packages/py-pybedtools/package.py @@ -26,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 814fa8d37fefee..cab48156ac11c3 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 8f04cae03bcc07..f4218428e14696 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 f7c298309b6967..b14b50a8e64252 100644 --- a/var/spack/repos/builtin/packages/py-pybind11/package.py +++ b/var/spack/repos/builtin/packages/py-pybind11/package.py @@ -27,6 +27,12 @@ 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") @@ -53,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") @@ -71,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,7 +100,10 @@ def patch(self): class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): def cmake_args(self): - return [self.define("PYBIND11_TEST", self.pkg.run_tests)] + return [ + self.define("PYBIND11_TEST", self.pkg.run_tests), + self.define("prefix_for_pc_file", self.prefix), + ] def install(self, pkg, spec, prefix): super().install(pkg, spec, prefix) diff --git a/var/spack/repos/builtin/packages/py-pybrain/package.py b/var/spack/repos/builtin/packages/py-pybrain/package.py index 17d34438a0e995..0fc1558d43f742 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 00000000000000..97caab42ec9be3 --- /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 c9eccce8077566..1f8d0e61066485 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 e8dba26fb7d74b..c13e54cdeff154 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 4deba1e1491330..11984b1abb47f9 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 @@ 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 9d9474cf7b7a6c..8262fca5bc3306 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-pycocotools/package.py b/var/spack/repos/builtin/packages/py-pycocotools/package.py index a751e5e935e42f..f082d4bcbfffb0 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 b749b164c58e61..559cb5f0e70147 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 9817e95d5de6c2..261af67f219003 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 e5f085dee1b069..3626a5f75528c2 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 acfd315a041660..a047548c0806a7 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 73298b196d199d..4ebcb3ae67df46 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 00000000000000..63edbb2a70bf5d --- /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 3cb89290b84d74..2115934ea60830 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 79a95c85735425..2a2e0993132f55 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 00000000000000..ec7dd02dfa9d1e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pydantic-core/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 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.18.4", sha256="ec3beeada09ff865c344ff3bc2f427f5e6c26401cc6113d77e372c3fdac73864") + + 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/package.py b/var/spack/repos/builtin/packages/py-pydantic/package.py index 1819998e46486c..bfc6aa639bbc0e 100644 --- a/var/spack/repos/builtin/packages/py-pydantic/package.py +++ b/var/spack/repos/builtin/packages/py-pydantic/package.py @@ -14,6 +14,7 @@ class PyPydantic(PythonPackage): license("MIT") + 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 +22,15 @@ 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.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.4.0:", type=("build", "run"), when="@2.7.4:") + 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 00000000000000..2b34fbfa985d40 --- /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 9822d78d68bb0b..68c369909c22b9 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 @@ 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 83f9bc1a6f63e1..01627e5c18157b 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-pyelftools/package.py b/var/spack/repos/builtin/packages/py-pyelftools/package.py index 5699b1b14ecd8f..bbaf9d8b44889e 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 00000000000000..a97afb66ecb06b --- /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 6b7e51ed2e4022..719fd60d75a4fd 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 205f4e6a7f5619..3c3ebf2bf76b72 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-pyfftw/package.py b/var/spack/repos/builtin/packages/py-pyfftw/package.py index 4b8184cafca1e7..56ed3b16cdc923 100644 --- a/var/spack/repos/builtin/packages/py-pyfftw/package.py +++ b/var/spack/repos/builtin/packages/py-pyfftw/package.py @@ -10,29 +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("python@3.8:", type=("build", "run"), when="@0.13.1:") + 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@0.29.18:0", type="build", when="@0.13:") + + 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@1.20:1", type=("build", "run"), when="@0.13.1:") + 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 8abe148fdb72df..cc21bd31a92890 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 48c328be64184e..e1a9962c1c02be 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 2e995e8bbeaf8d..50fef6a1ce401d 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 773d42c94d67f9..2b4a843dbdfc88 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 f5cf5c4e3fffca..0ce4e292d887bf 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 3b661527f1ac8b..c2837796e689d4 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 00000000000000..66480f2602d7af --- /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-pygobject/package.py b/var/spack/repos/builtin/packages/py-pygobject/package.py index cb926dcd9f54f7..a853bf860dbcd7 100644 --- a/var/spack/repos/builtin/packages/py-pygobject/package.py +++ b/var/spack/repos/builtin/packages/py-pygobject/package.py @@ -31,6 +31,8 @@ class PyPygobject(PythonPackage): deprecated=True, ) + depends_on("c", type="build") # generated + extends("python") depends_on("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-pygpu/package.py b/var/spack/repos/builtin/packages/py-pygpu/package.py index f0457335956f04..3a92491d5b05ca 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 ef723799c38ba0..6e9fe6d7da6c83 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 index 40a3e8c66c25f7..e1059e20971e20 100644 --- a/var/spack/repos/builtin/packages/py-pyhdf/package.py +++ b/var/spack/repos/builtin/packages/py-pyhdf/package.py @@ -22,12 +22,14 @@ class PyPyhdf(PythonPackage): version("master", branch="master") version("0.10.4", sha256="ea09b2bdafc9be0f7f43d72ff122d8efbde61881f4da3a659b33be5e29215f93") + depends_on("c", type="build") # generated + # Python versions - depends_on("python@3.2:", type=("build", "run")) + depends_on("py-setuptools", type="build") # Dependencies depends_on("zlib-api", type=("build", "run")) - depends_on("hdf", type=("build", "run")) + depends_on("hdf@4.2", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) depends_on("jpeg", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-pyheadtail/package.py b/var/spack/repos/builtin/packages/py-pyheadtail/package.py index a64d591b242656..35ed6f6c320d26 100644 --- a/var/spack/repos/builtin/packages/py-pyheadtail/package.py +++ b/var/spack/repos/builtin/packages/py-pyheadtail/package.py @@ -17,6 +17,9 @@ class PyPyheadtail(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-pyhull/package.py b/var/spack/repos/builtin/packages/py-pyhull/package.py index 3db784d4d89047..307416ddf58ac3 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 83bbdedd5bf89e..c10fea144f875c 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 39a2048a4e86f7..6c2a128fbb31f1 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 1368dd718573c6..865c03ce9b77be 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 729216c85c0cec..a3be907887c0c5 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 6bf307a58eee00..2428793eb4012b 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" ) diff --git a/var/spack/repos/builtin/packages/py-pylev/package.py b/var/spack/repos/builtin/packages/py-pylev/package.py index 5eebc9e1094c5c..cc005f40ceb899 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 @@ 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 b76aa855fa758a..58cb767071b764 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 00000000000000..1af4498832a647 --- /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-pylith/package.py b/var/spack/repos/builtin/packages/py-pylith/package.py index 3ce7c217a7cca0..401a5e5eff6930 100644 --- a/var/spack/repos/builtin/packages/py-pylith/package.py +++ b/var/spack/repos/builtin/packages/py-pylith/package.py @@ -18,6 +18,8 @@ class PyPylith(AutotoolsPackage, PythonExtension): version("4.0.0", sha256="31e0131683292ee2e62f2c818cc2777f026104ae73d7a8368975dd6560292689") + depends_on("cxx", type="build") # generated + depends_on("py-setuptools") depends_on("py-cig-pythia") depends_on("spatialdata") diff --git a/var/spack/repos/builtin/packages/py-pymatreader/package.py b/var/spack/repos/builtin/packages/py-pymatreader/package.py index dd8984964410e1..19973fb46b5a71 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 a4ab0b522d8491..1889677b20512e 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 diff --git a/var/spack/repos/builtin/packages/py-pymongo/package.py b/var/spack/repos/builtin/packages/py-pymongo/package.py index 7c7469e628f576..234b6119672d8c 100644 --- a/var/spack/repos/builtin/packages/py-pymongo/package.py +++ b/var/spack/repos/builtin/packages/py-pymongo/package.py @@ -25,6 +25,8 @@ class PyPymongo(PythonPackage): 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("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-pymoo/package.py b/var/spack/repos/builtin/packages/py-pymoo/package.py index 023f81d859b25e..51bed567428187 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 3931bab4953d5c..4284aec21d4247 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-pynacl/package.py b/var/spack/repos/builtin/packages/py-pynacl/package.py index 8c564b421c77a2..2e2a0c632a9ef5 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 59ea20288f45c0..a7e4b5f1a3f648 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 8b7e40fed7e749..67949ae15ef9e7 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-pynucleus/package.py b/var/spack/repos/builtin/packages/py-pynucleus/package.py index 9664e7ce9f37bd..a70fb4dfd68a6b 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 @@ def setup_build_environment(self, env): @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 86065133e703c4..15c25c30ad8256 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 05cc05cf01b7e6..ad2e8d9c5be5a8 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 00000000000000..2c0a7c8766b091 --- /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 a1c83b415dba2a..212a50eb0b5d5e 100644 --- a/var/spack/repos/builtin/packages/py-pyomo/package.py +++ b/var/spack/repos/builtin/packages/py-pyomo/package.py @@ -18,6 +18,7 @@ class PyPyomo(PythonPackage): # 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") @@ -45,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( @@ -94,7 +98,8 @@ class PyPyomo(PythonPackage): 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")) - depends_on("py-numpy", when="@6.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 @@ -102,7 +107,8 @@ class PyPyomo(PythonPackage): depends_on("py-ipython", 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")) diff --git a/var/spack/repos/builtin/packages/py-pyopencl/package.py b/var/spack/repos/builtin/packages/py-pyopencl/package.py index 48cf56912e1001..5e2c6ed30f686a 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 00000000000000..0f973c7b8bc193 --- /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 49d9d4fba555d9..804b25c862d7fd 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-pypdf/package.py b/var/spack/repos/builtin/packages/py-pypdf/package.py new file mode 100644 index 00000000000000..7a9896d17d85b9 --- /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-pyprecice/package.py b/var/spack/repos/builtin/packages/py-pyprecice/package.py index 19b81e062801b6..7df2a049f330ed 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 60839d2733481a..706477724930b1 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 00e27c994e3bd5..1c28fd8b243576 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") 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 e93543146b0d52..c6612970b3c132 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 1f74582a44b271..4f1c904396f75d 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 36a42e13170e50..5b853be73f43d9 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 6e6de0ead7c89a..ac4701048709f4 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 index 8b82f99a5ff50a..a457935443bfce 100644 --- a/var/spack/repos/builtin/packages/py-pyqtgraph/package.py +++ b/var/spack/repos/builtin/packages/py-pyqtgraph/package.py @@ -10,7 +10,7 @@ class PyPyqtgraph(PythonPackage): """PyQtGraph is a pure-python graphics and GUI library intended for use in mathematics, scientific, and engineering applications""" - homepage = "http://www.pyqtgraph.org/" + homepage = "https://www.pyqtgraph.org/" pypi = "pyqtgraph/pyqtgraph-0.13.3.tar.gz" license("MIT", checked_by="A-N-Other") diff --git a/var/spack/repos/builtin/packages/py-pyrevolve/package.py b/var/spack/repos/builtin/packages/py-pyrevolve/package.py index 12c053a1577f9c..c72a3f22646fca 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 7d1c1e992a64d4..c4840f84091f45 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 9ba34d0ecab521..68441e21e925f8 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 index e93dbdf753b33b..4b9ad7292ec7b1 100644 --- a/var/spack/repos/builtin/packages/py-pyrocko/package.py +++ b/var/spack/repos/builtin/packages/py-pyrocko/package.py @@ -20,6 +20,8 @@ class PyPyrocko(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-pyrsistent/package.py b/var/spack/repos/builtin/packages/py-pyrsistent/package.py index 9ef98a0f4dc5da..f305f5f5dab063 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 42993ca040a23e..7e83b7f0bfd00e 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 2262c825c30ca3..c94a68252a953e 100644 --- a/var/spack/repos/builtin/packages/py-pyscf/package.py +++ b/var/spack/repos/builtin/packages/py-pyscf/package.py @@ -18,6 +18,10 @@ class PyPyscf(PythonPackage): 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") @@ -29,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") @@ -37,6 +43,7 @@ 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:1.10", type=("build", "run"), when="@:2.0") depends_on("py-scipy@0.19:1.10", type=("build", "run"), when="@2.1:2.2") diff --git a/var/spack/repos/builtin/packages/py-pyscipopt/package.py b/var/spack/repos/builtin/packages/py-pyscipopt/package.py index a7a23dd147757a..ac333be5ad3d85 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 00000000000000..53c7c7fc0c76da --- /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-pyside/package.py b/var/spack/repos/builtin/packages/py-pyside/package.py index 16e95b4f7197b6..bb33a8d495b5b5 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 a1bbd619aef878..2443694adab4ea 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 @@ def install_options(self, spec, prefix): # "--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 48685e6dc9fcd1..885b96721c929b 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 058ac47bf77a95..b7097230fa0d43 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", 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 00000000000000..071bd61a902b00 --- /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 8a8d218743c094..dc309fd3b920f8 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 c7d57dd2e35d41..efab982077db6e 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-pytest-allclose/package.py b/var/spack/repos/builtin/packages/py-pytest-allclose/package.py new file mode 100644 index 00000000000000..9b96c44bc05e4c --- /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-cpp/package.py b/var/spack/repos/builtin/packages/py-pytest-cpp/package.py index a277ffc310caed..5503cfbbd530c5 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/package.py b/var/spack/repos/builtin/packages/py-pytest/package.py index 5a4ef2d5f0d4e6..1e50386ac63ea3 100644 --- a/var/spack/repos/builtin/packages/py-pytest/package.py +++ b/var/spack/repos/builtin/packages/py-pytest/package.py @@ -14,7 +14,9 @@ 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") @@ -39,53 +41,56 @@ class PyPytest(PythonPackage): version("3.0.7", sha256="b70696ebd1a5e6b627e7e3ac1365a4bc60aaf3495e843c1e70448966c5224cab") version("3.0.2", sha256="64d8937626dd2a4bc15ef0edd307d26636a72a3f3f9664c424d78e40efb1e339") - # python_requires - depends_on("python@3.8:", when="@8:", type=("build", "run")) - 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@1.3:1", when="@8:", type=("build", "run")) - depends_on("py-pluggy@0.12:1", when="@6.2:7", 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 0139a94ea7fa79..02fa6b74167741 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-crfsuite/package.py b/var/spack/repos/builtin/packages/py-python-crfsuite/package.py index 6c8fd4fd69ac18..f61a582959321c 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-fmask/package.py b/var/spack/repos/builtin/packages/py-python-fmask/package.py index 2184768325b2ca..d475e3641468fd 100644 --- a/var/spack/repos/builtin/packages/py-python-fmask/package.py +++ b/var/spack/repos/builtin/packages/py-python-fmask/package.py @@ -24,6 +24,8 @@ class PyPythonFmask(PythonPackage): 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 172ceb9eb5ef55..debdad7c59a180 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 f418761f49532a..5447a212f927df 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 @@ 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 e5ce437c83c225..424c9c6c637200 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 a5e675e069f396..3d1126d469697b 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 db5641154d863c..d834a0ec44a10f 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 44ccf7db162904..4678079a97a46d 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-lzo/package.py b/var/spack/repos/builtin/packages/py-python-lzo/package.py index 4b0c83fa670e34..482c74ad12e6c6 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 71a6fb25f238b5..fc34c262e4b1c7 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 199f20295bae34..fb042f45f95377 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-pptx/package.py b/var/spack/repos/builtin/packages/py-python-pptx/package.py index fa83144501b468..db22fec768ec86 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 @@ 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 5f9260bb27fcb3..94273241f6570d 100644 --- a/var/spack/repos/builtin/packages/py-python-ptrace/package.py +++ b/var/spack/repos/builtin/packages/py-python-ptrace/package.py @@ -16,4 +16,6 @@ class PyPythonPtrace(PythonPackage): version("0.9.8", sha256="1e3bc6223f626aaacde8a7979732691c11b13012e702fee9ae16c87f71633eaa") + depends_on("c", type="build") # generated + depends_on("py-setuptools", type="build") 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 0925652e6032e3..ed6c3f3de16224 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 f596a79460fa2e..f6e1561a3c1973 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 c8f427f873de9c..1603ea1dce4727 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 @@ 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") diff --git a/var/spack/repos/builtin/packages/py-pythran/package.py b/var/spack/repos/builtin/packages/py-pythran/package.py index 9c79174967f619..beb00f353b4cfc 100644 --- a/var/spack/repos/builtin/packages/py-pythran/package.py +++ b/var/spack/repos/builtin/packages/py-pythran/package.py @@ -20,6 +20,8 @@ class PyPythran(PythonPackage): 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.1", sha256="702c2701187cfb38f66c0c20cc85d04d0e156d260a8d92892da65947faa5360e") @@ -37,9 +39,11 @@ class PyPythran(PythonPackage): version("0.9.4", sha256="ec9c91f5331454263b064027292556a184a9f55a50f8615e09b08f57a4909855") version("0.9.3", sha256="217427a8225a331fdc8f3efe57871aed775cdf2c6e847a0a83df0aaae4b02493") + 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") - depends_on("py-setuptools", type="build") + 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 @@ -49,6 +53,8 @@ class PyPythran(PythonPackage): 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")) @@ -76,6 +82,8 @@ class PyPythran(PythonPackage): 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 d499861c064691..6a1f605db674ad 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 de9c0bcb190748..133f882e378592 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 00000000000000..362e4f0b094702 --- /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-pyuwsgi/package.py b/var/spack/repos/builtin/packages/py-pyuwsgi/package.py index 17ddbb007534bf..d5f059604bf705 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 a8bd256f0db3ab..358e417dffb5d7 100644 --- a/var/spack/repos/builtin/packages/py-pyvista/package.py +++ b/var/spack/repos/builtin/packages/py-pyvista/package.py @@ -19,13 +19,17 @@ class PyPyvista(PythonPackage): 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")) diff --git a/var/spack/repos/builtin/packages/py-pywavelets/package.py b/var/spack/repos/builtin/packages/py-pywavelets/package.py index 88fb7879391185..bcbd942707435b 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 8b4ca6624aef0a..a6c1c39bce9209 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 da6f0d74399c42..c00666169979e2 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 5f6f6562523bf0..e8b20d7acf9533 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 1e995439a2dbaf..7093ec8dd88f76 100644 --- a/var/spack/repos/builtin/packages/py-pyyaml/package.py +++ b/var/spack/repos/builtin/packages/py-pyyaml/package.py @@ -10,11 +10,19 @@ 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") @@ -38,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 63956fb6e99b1b..660c658e9039d6 100644 --- a/var/spack/repos/builtin/packages/py-pyzmq/package.py +++ b/var/spack/repos/builtin/packages/py-pyzmq/package.py @@ -33,6 +33,9 @@ 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 diff --git a/var/spack/repos/builtin/packages/py-qdldl/package.py b/var/spack/repos/builtin/packages/py-qdldl/package.py index acd5cc9b99816b..3609976d89a8aa 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 0d5d5a0d9a796f..2c1a2b4011551c 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 566edca7d4fae1..be640acc06aced 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 01bad9ce4c5792..d938ef1fc1a784 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 3fc90ef8056bea..f825b75f8775de 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-quantum-blackbird/package.py b/var/spack/repos/builtin/packages/py-quantum-blackbird/package.py index adf5ab6dbdcdf9..d4d1baa6790b36 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-quast/package.py b/var/spack/repos/builtin/packages/py-quast/package.py index 46032d7dd1fcf9..c6ddc7f9fd1272 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 2b3237341d3d85..fce20b2198612e 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-gtod/package.py b/var/spack/repos/builtin/packages/py-radical-gtod/package.py index 5c6679f63be8d9..1b5ec630078482 100644 --- a/var/spack/repos/builtin/packages/py-radical-gtod/package.py +++ b/var/spack/repos/builtin/packages/py-radical-gtod/package.py @@ -45,6 +45,8 @@ class PyRadicalGtod(PythonPackage): deprecated=True, ) + depends_on("c", type="build") # generated + depends_on("py-radical-utils", type=("build", "run"), when="@1.13:") depends_on("python@3.6:", 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 37c7925f8d8871..189c3e448476f6 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-rasterio/package.py b/var/spack/repos/builtin/packages/py-rasterio/package.py index cf4ed73c450e34..606b983401f950 100644 --- a/var/spack/repos/builtin/packages/py-rasterio/package.py +++ b/var/spack/repos/builtin/packages/py-rasterio/package.py @@ -17,11 +17,14 @@ 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.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") @@ -39,31 +42,43 @@ 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@3.0.2:", when="@1.3.10:", type="build") - depends_on("py-cython@0.29.29:", when="@1.3.3:1.3.9", 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-importlib-metadata", when="@1.3.10: ^python@:3.9", type=("build", "run")) - depends_on("py-numpy@1.18:", when="@1.3.10:", type=("build", "link", "run")) - depends_on("py-numpy@1.18:1", when="@1.3.0:1.3.9", type=("build", "link", "run")) - depends_on("py-numpy@1.15:1", 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") diff --git a/var/spack/repos/builtin/packages/py-ray/package.py b/var/spack/repos/builtin/packages/py-ray/package.py index b434096c4388d6..c79a391c4946e4 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-referencing/package.py b/var/spack/repos/builtin/packages/py-referencing/package.py new file mode 100644 index 00000000000000..cdf0fad6592fd8 --- /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 57d7619b240f44..7f5d2c99e37677 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 00000000000000..fd91af1214ce20 --- /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 b4595518ce7b8d..30b2e6aeb87d6e 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 3c35eb0e0f22a8..a104a57ec19ec1 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 @@ 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 00000000000000..61c9645469c921 --- /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 4b88746a5358c8..1ca04979ce6e78 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-resize-right/package.py b/var/spack/repos/builtin/packages/py-resize-right/package.py new file mode 100644 index 00000000000000..4e737f2d83e3e5 --- /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-rich-argparse/package.py b/var/spack/repos/builtin/packages/py-rich-argparse/package.py new file mode 100644 index 00000000000000..efc24f7b6a08eb --- /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 51ef332d7f19bb..fe40bdf31e3977 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 a91712e25e586a..7b2830201e92c7 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 0eba71e8a70f57..720937c102c68a 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 02550c3dd32a37..26eac0748ed8a0 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") diff --git a/var/spack/repos/builtin/packages/py-rmm/package.py b/var/spack/repos/builtin/packages/py-rmm/package.py index f5f7df552d9070..f5ed07409f2418 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-rotary-embedding-torch/package.py b/var/spack/repos/builtin/packages/py-rotary-embedding-torch/package.py new file mode 100644 index 00000000000000..c307b827bee74c --- /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 00000000000000..5c948bafbe5f08 --- /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 9c84fb749f05fc..ef0dde2854a4e6 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 ef3939311363f6..4f86b692f66658 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 51f0a1420a40cf..cff9e27399817e 100644 --- a/var/spack/repos/builtin/packages/py-rtree/package.py +++ b/var/spack/repos/builtin/packages/py-rtree/package.py @@ -10,12 +10,13 @@ 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") @@ -30,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 b29f6a1441a09d..6d1916affa7d94 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 2ae9ad5f568522..e54bce3a9573ef 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 @@ -20,6 +20,8 @@ class PyRuamelYamlClib(PythonPackage): version("0.2.4", sha256="f997f13fd94e37e8b7d7dbe759088bb428adc6570da06b64a913d932d891ac8d") version("0.2.0", sha256="b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c") + depends_on("c", type="build") # generated + 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")) 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 00000000000000..efda0e4bf44efb --- /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 44bab1167eaa21..f38b08a4d772a8 100644 --- a/var/spack/repos/builtin/packages/py-ruff/package.py +++ b/var/spack/repos/builtin/packages/py-ruff/package.py @@ -16,18 +16,17 @@ class PyRuff(PythonPackage): license("MIT") maintainers("adamjstewart") + 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", - deprecated=True, - ) - 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.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 314e7a153a9d03..0e9c7515fc5031 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 206b2387cfd077..565f22c630ec0d 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 @@ 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-safetensors/package.py b/var/spack/repos/builtin/packages/py-safetensors/package.py index 70df04ceccd773..f0f11247c55c2a 100644 --- a/var/spack/repos/builtin/packages/py-safetensors/package.py +++ b/var/spack/repos/builtin/packages/py-safetensors/package.py @@ -12,7 +12,9 @@ class PySafetensors(PythonPackage): homepage = "https://github.com/huggingface/safetensors" pypi = "safetensors/safetensors-0.3.1.tar.gz" + 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") + depends_on("py-maturin", type="build", when="@0.4.3") diff --git a/var/spack/repos/builtin/packages/py-scandir/package.py b/var/spack/repos/builtin/packages/py-scandir/package.py index fe1b75317bb043..df09535c75f94b 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 cce05b7730ceb9..ae66aa9aaf8864 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 14e3de34e34bbe..c5bbdea26e617f 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 fbe3ed171299e4..f680202bcd6957 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 e1396d17e9f402..1965141616ef9e 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 e97e8d4489ec11..d412207954d051 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 33645e257547dc..9f78e611bc32a5 100644 --- a/var/spack/repos/builtin/packages/py-scikit-image/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py @@ -24,6 +24,7 @@ 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") @@ -37,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 @@ -45,7 +49,7 @@ class PyScikitImage(PythonPackage): # @:0.13 from requirements.txt, DEPENDS.txt with default_args(type=("build", "run")): - depends_on("python@3.10:", when="@0.23:") + depends_on("python@3.10:", when="@0.23") depends_on("python@3.9:", when="@0.22:") with default_args(type=("build", "link", "run")): @@ -58,6 +62,8 @@ class PyScikitImage(PythonPackage): 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:") @@ -99,6 +105,7 @@ class PyScikitImage(PythonPackage): 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:") 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 2aab648a082929..d6935fb7801d08 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,13 @@ class PyScikitLearnExtra(PythonPackage): version("0.2.0", sha256="3b1bb5fedde47920eb4b3fa0a0c18f80cc7359d9d0496720178788c6153b8019") + depends_on("cxx", type="build") # generated + # 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 f12a6e171bfcdd..4fb94f843f70a0 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,17 @@ 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") + maintainers("adamjstewart", "rgommers") - version("master", branch="master") + 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") @@ -46,7 +49,8 @@ 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 with default_args(type=("build", "link", "run")): @@ -58,24 +62,25 @@ class PyScikitLearn(PythonPackage): depends_on("python@:3.9", when="@0.24:1.0.1") depends_on("python@:3.8", when="@0.22:0.23") - # pyproject.toml with default_args(type="build"): - depends_on("py-setuptools") - depends_on("py-setuptools@:59", when="@:1.2.1") + 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") - # sklearn/_min_dependencies.py with default_args(type=("build", "link", "run")): - depends_on("py-numpy@1.19.5:", when="@1.4.2:") - depends_on("py-numpy@1.19.5:1", when="@1.4.0:1.4.1") - depends_on("py-numpy@1.17.3:1", when="@1.1:1.3") - depends_on("py-numpy@1.14.6:1", when="@1.0") - depends_on("py-numpy@1.13.3:1", when="@0.23:0.24") - depends_on("py-numpy@1.11.0:1", when="@0.21:0.22") + 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:") @@ -87,44 +92,31 @@ class PyScikitLearn(PythonPackage): 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@2.0.0:", when="@0.23:") - depends_on("llvm-openmp", when="%apple-clang +openmp") - - # Test dependencies - with default_args(type="test"): - depends_on("py-matplotlib@3.3.4:") - depends_on("py-scikit-image@0.17.2:") - depends_on("py-pandas@1.1.5:") - depends_on("py-pytest@7.1.2:") - depends_on("py-pyamg@4:") - depends_on("py-polars@0.19.12:", when="@1.4:") - depends_on("py-pyarrow@12:", when="@1.4:") - depends_on("py-pooch@1.6:", when="@1.2:") - - # 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") + 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 a348d9407328c1..a96abf60f0f513 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 73643d80318050..725af79875ab6a 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 9e2a1e7007e189..3c2201130eb4df 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -18,6 +18,9 @@ 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") @@ -51,9 +54,15 @@ 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 with default_args(type=("build", "link", "run")): - depends_on("python@3.9:3.12", when="@1.11.2:") + 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") @@ -91,7 +100,8 @@ class PyScipy(PythonPackage): # Run dependencies with default_args(type=("build", "link", "run")): - depends_on("py-numpy@1.22.4:2.2", when="@1.13:") + 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") @@ -126,7 +136,8 @@ class PyScipy(PythonPackage): # 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( @@ -135,6 +146,8 @@ class PyScipy(PythonPackage): 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") @@ -224,18 +237,21 @@ def setup_build_environment(self, env): 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-scs/package.py b/var/spack/repos/builtin/packages/py-scs/package.py index e5f2f5e4facda9..4970a55504aa94 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 62226eaf7b7e77..49333345d4ed6d 100644 --- a/var/spack/repos/builtin/packages/py-seaborn/package.py +++ b/var/spack/repos/builtin/packages/py-seaborn/package.py @@ -39,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 b001a1960cee97..ad772ca833dc68 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 ec9668422dd297..839da2955e6ad9 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 6c90fecee8bad4..fdd13fbd650403 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 f955d19ccd49bc..2a1fdff88f5a27 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 00000000000000..5f863540da0947 --- /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 5d5ffa01d14bda..369d0c58d78ecb 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 485fe170e2a39c..5114228df90773 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") @@ -25,13 +28,17 @@ 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("rust", when="~rust_bootstrap", type="run") depends_on("rust-bootstrap", when="+rust_bootstrap", type="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/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index bdfc00a9e15d8d..677c4c06d2cef4 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 * @@ -95,5 +96,4 @@ def install(self, spec, prefix): # # 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 93d2812d70ed16..da0ced6e3a9e5d 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 6c6bf451103f47..859a6640f4d22a 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 a28756c28266d8..1858422f97a28c 100644 --- a/var/spack/repos/builtin/packages/py-shapely/package.py +++ b/var/spack/repos/builtin/packages/py-shapely/package.py @@ -21,6 +21,8 @@ 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") @@ -34,19 +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:2", when="@2.0.4:", type=("build", "link", "run")) - depends_on("py-numpy@1.14:1", when="@2.0.0:2.0.3", type=("build", "link", "run")) - depends_on("py-numpy@:1", when="@1", 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:") @@ -74,7 +86,7 @@ def url_for_version(self, version): 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 @@ -100,13 +112,3 @@ def setup_run_environment(self, env): 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 d8faeac4b76648..0899a10a353624 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-shroud/package.py b/var/spack/repos/builtin/packages/py-shroud/package.py index 1a6c64d9627f75..ca5b7a838c5c97 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-simplejson/package.py b/var/spack/repos/builtin/packages/py-simplejson/package.py index dcac15ee93f8bf..63b35bae3e994a 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 index 8a9310196ad613..a3b5430203032a 100644 --- a/var/spack/repos/builtin/packages/py-simpletraj/package.py +++ b/var/spack/repos/builtin/packages/py-simpletraj/package.py @@ -17,6 +17,8 @@ class PySimpletraj(PythonPackage): # 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")) diff --git a/var/spack/repos/builtin/packages/py-sip/package.py b/var/spack/repos/builtin/packages/py-sip/package.py index 966f8766fbcd68..703fce900c1ff9 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 59fd8fc378a727..41d65e294e4504 100644 --- a/var/spack/repos/builtin/packages/py-slepc4py/package.py +++ b/var/spack/repos/builtin/packages/py-slepc4py/package.py @@ -18,6 +18,10 @@ class PySlepc4py(PythonPackage): license("BSD-2-Clause") version("main", branch="main") + 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") @@ -45,19 +49,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.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("slepc") depends_on("slepc@main", when="@main") - for ver in ["3.21", "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 f45b38572c4c88..b1a6186499e29f 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 8014fe9da11b35..482b71c983491d 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-snakemake-executor-plugin-cluster-generic/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-cluster-generic/package.py index 54e8d64dee44e4..cd7944bb93e333 100644 --- 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 @@ -13,15 +13,19 @@ class PySnakemakeExecutorPluginClusterGeneric(PythonPackage): homepage = "https://github.com/snakemake/snakemake-executor-plugin-cluster-generic" pypi = ( "snakemake_executor_plugin_cluster_generic/" - "snakemake_executor_plugin_cluster_generic-1.0.7.tar.gz" + "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@8.1:8", 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 index afbf359c6800d8..820568fa6a4f45 100644 --- 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 @@ -13,15 +13,19 @@ class PySnakemakeExecutorPluginClusterSync(PythonPackage): homepage = "https://github.com/snakemake/snakemake-executor-plugin-cluster-sync" pypi = ( "snakemake_executor_plugin_cluster_sync/" - "snakemake_executor_plugin_cluster_sync-0.1.3.tar.gz" + "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@8.1:8", 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-slurm-jobstep/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-slurm-jobstep/package.py index 15593ccf5b4c8b..83d1ce32da5b02 100644 --- 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 @@ -14,15 +14,21 @@ class PySnakemakeExecutorPluginSlurmJobstep(PythonPackage): homepage = "https://github.com/snakemake/snakemake-executor-plugin-slurm-jobstep" pypi = ( "snakemake_executor_plugin_slurm_jobstep/" - "snakemake_executor_plugin_slurm_jobstep-0.1.9.tar.gz" + "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@8.2:8", 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 index 1b15b631b73c4f..ecfeaec56d4d31 100644 --- 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 @@ -11,17 +11,36 @@ 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.3.1.tar.gz" + 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@8.2:8", type=("build", "run")) - depends_on("py-snakemake-executor-plugin-slurm-jobstep@0.1.10:0.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-interface-common/package.py b/var/spack/repos/builtin/packages/py-snakemake-interface-common/package.py index 017b928098bab2..51ec9cf546a0a7 100644 --- a/var/spack/repos/builtin/packages/py-snakemake-interface-common/package.py +++ b/var/spack/repos/builtin/packages/py-snakemake-interface-common/package.py @@ -11,10 +11,12 @@ 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.1.tar.gz" + 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")) 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 index e0932eb1a9cec5..7c95062efe8f75 100644 --- 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 @@ -12,10 +12,12 @@ class PySnakemakeInterfaceExecutorPlugins(PythonPackage): executor plugins.""" homepage = "https://github.com/snakemake/snakemake-interface-executor-plugins" - pypi = "snakemake_interface_executor_plugins/snakemake_interface_executor_plugins-8.2.0.tar.gz" + 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")) 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 index e9ba417de471a8..1ff4436daef4e7 100644 --- 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 @@ -12,10 +12,12 @@ class PySnakemakeInterfaceStoragePlugins(PythonPackage): plugins.""" homepage = "https://github.com/snakemake/snakemake-interface-storage-plugins" - pypi = "snakemake_interface_storage_plugins/snakemake_interface_storage_plugins-3.1.0.tar.gz" + 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")) diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py index 802be084b43807..7dfe7ce2f8112c 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-sonlib/package.py b/var/spack/repos/builtin/packages/py-sonlib/package.py index 73c2457b61f1f1..1095819687ab4c 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-spacy/package.py b/var/spack/repos/builtin/packages/py-spacy/package.py index d0c4badc8ba53c..cf4620953b4961 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-spdlog/package.py b/var/spack/repos/builtin/packages/py-spdlog/package.py index ec4282228631b8..79204b0381d8a9 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 eb65819c927b18..dda1f57ecadbf5 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 00000000000000..d39d10f5de8f84 --- /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 11853e7b495665..61d56886ef8e14 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 00000000000000..dc67326bb26268 --- /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 a198b6ada8d040..be4781dd11f840 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-tabs/package.py b/var/spack/repos/builtin/packages/py-sphinx-tabs/package.py index 4db49895c1c6b4..ddad8ad063efba 100644 --- a/var/spack/repos/builtin/packages/py-sphinx-tabs/package.py +++ b/var/spack/repos/builtin/packages/py-sphinx-tabs/package.py @@ -17,6 +17,7 @@ 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") diff --git a/var/spack/repos/builtin/packages/py-sphinx/package.py b/var/spack/repos/builtin/packages/py-sphinx/package.py index dfdb82fd755c3b..911040046c9b4a 100644 --- a/var/spack/repos/builtin/packages/py-sphinx/package.py +++ b/var/spack/repos/builtin/packages/py-sphinx/package.py @@ -16,6 +16,21 @@ 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") @@ -90,25 +105,34 @@ class PySphinx(PythonPackage): depends_on("py-flit-core@3.7:", when="@5.2:", type="build") 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-jsmath", 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-sphinxcontrib-qthelp", 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.18.1:0.21", when="@7.3:") + 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") @@ -116,22 +140,26 @@ class PySphinx(PythonPackage): 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:0.7", when="@7.3:") - depends_on("py-alabaster@0.7") + 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-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-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") @@ -139,6 +167,9 @@ class PySphinx(PythonPackage): depends_on("py-setuptools", when="@4.4:5.1", type="build") 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") 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 e84d9762baadb4..b7a5a518c651b9 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 5821a4002bb3dc..40586bb8b840f9 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 036c046c8270d9..82942bc32cb639 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 d81e143c07664e..04aba1ae5cf225 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 00000000000000..19e0de61b66264 --- /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-sqlalchemy-migrate/package.py b/var/spack/repos/builtin/packages/py-sqlalchemy-migrate/package.py index 1666f904ebcc37..d6f4acc1222c30 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 @@ 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 2d52fdf57a31e8..189600e195684c 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 d545991b31fb6c..2163eea77442d9 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 00000000000000..5a73c74ff83e16 --- /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 def3f0f10dd2f0..765803aab0a338 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-statsmodels/package.py b/var/spack/repos/builtin/packages/py-statsmodels/package.py index d4ea3153fc2223..b9d4d55600028d 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 1f344b74ace03a..60458f92ebdb89 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 05fbe674c8eea1..690cb190e1df7c 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 00000000000000..7e8dea330e226c --- /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 a8d3eab8fa1aec..da2fb77f426e13 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-symengine/package.py b/var/spack/repos/builtin/packages/py-symengine/package.py index 771264075042e4..074b2264add0c7 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 188c158025f6b8..9145b6041184e3 100644 --- a/var/spack/repos/builtin/packages/py-sympy/package.py +++ b/var/spack/repos/builtin/packages/py-sympy/package.py @@ -13,6 +13,7 @@ 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") @@ -37,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-systemd-python/package.py b/var/spack/repos/builtin/packages/py-systemd-python/package.py index b1f01c0dc1e2b3..4130a852e58fbb 100644 --- a/var/spack/repos/builtin/packages/py-systemd-python/package.py +++ b/var/spack/repos/builtin/packages/py-systemd-python/package.py @@ -17,6 +17,8 @@ class PySystemdPython(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-tables/package.py b/var/spack/repos/builtin/packages/py-tables/package.py index 262e7e4b82f3b2..e2242acf8cc348 100644 --- a/var/spack/repos/builtin/packages/py-tables/package.py +++ b/var/spack/repos/builtin/packages/py-tables/package.py @@ -27,6 +27,9 @@ 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") @@ -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")) diff --git a/var/spack/repos/builtin/packages/py-tabulate/package.py b/var/spack/repos/builtin/packages/py-tabulate/package.py index 07ed086d6401a6..d27fdb52bdc27c 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 @@ 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-tensorboard-data-server/package.py b/var/spack/repos/builtin/packages/py-tensorboard-data-server/package.py index e778ecf5e13f9e..5a2b3043c20ca7 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 * @@ -60,5 +61,4 @@ def install(self, spec, prefix): ) 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/package.py b/var/spack/repos/builtin/packages/py-tensorboard/package.py index b77439185c86d8..83f3f1a464c6ed 100644 --- a/var/spack/repos/builtin/packages/py-tensorboard/package.py +++ b/var/spack/repos/builtin/packages/py-tensorboard/package.py @@ -21,6 +21,7 @@ class PyTensorboard(PythonPackage): license("Apache-2.0") + version("2.17.0", sha256="859a499a9b1fb68a058858964486627100b71fcb21646861c61d31846a6478fb") version("2.16.2", sha256="9f2b4e7dad86667615c0e5cd072f1ea8403fc032a299f0072d6f74855775cc45") version("2.16.1", sha256="928b62567911a8eeb2ebeb7482a9e4599b35f6713a6f2c56655259c18a139569") version("2.16.0", sha256="263b909a2009cb3a79daa6abe64c1785cc317c25a54e4db2fecb6429ffc54c58") @@ -50,32 +51,39 @@ class PyTensorboard(PythonPackage): version("2.3.0", sha256="d34609ed83ff01dd5b49ef81031cfc9c166bba0dabd60197024f14df5e8eae5e") version("2.2.0", sha256="bb6bbc75ad2d8511ba6cbd49e4417276979f49866e11841e83da8298727dbaed") - 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-markdown@2.6.8:", type=("build", "run")) - depends_on("py-numpy@1.12.0:", type=("build", "run")) - depends_on("py-protobuf@3.19.6:4.23,4.24.1:", type=("build", "run"), when="@2.15.2:") - depends_on("py-protobuf@3.19.6:4.23", type=("build", "run"), when="@2.12:2.15.1") - 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-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-werkzeug@1.0.1:", type=("build", "run"), when="@2.9:") - depends_on("py-werkzeug@0.11.15:", type=("build", "run")) + 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.0:") + # https://github.com/tensorflow/tensorboard/pull/6871 + depends_on("py-numpy@:1") + # https://github.com/tensorflow/tensorboard/pull/5138 + depends_on("py-numpy@:1.23", when="@:2.5") + depends_on("py-protobuf@3.19.6:4", when="@2.17:") + depends_on("py-protobuf@3.19.6:", when="@2.15.2:2.16") + 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.0.0:") + depends_on("py-six@1.10.0:", 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:") - # Historical dependencies - depends_on("py-google-auth@1.6.3:2", type=("build", "run"), when="@2.7:2.15") - depends_on("py-google-auth@1.6.3:1", type=("build", "run"), when="@:2.6") - depends_on("py-google-auth-oauthlib@0.5:1", type=("build", "run"), when="@2.15") - depends_on("py-google-auth-oauthlib@0.5:1.0", type=("build", "run"), when="@2.12.1:2.14") - depends_on("py-google-auth-oauthlib@0.4.1:0.4", type=("build", "run"), when="@:2.12.0") - depends_on("py-requests@2.21.0:2", type=("build", "run"), when="@:2.15") - depends_on("py-tensorboard-plugin-wit@1.6.0:", type=("build", "run"), when="@:2.13") - depends_on("py-wheel@0.26:", type="build", when="@:2.13") + # 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") + + 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 eba0f1dbe98481..d3308b15b3abf0 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 @@ def install(self, spec, prefix): 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 58916a38d03dda..b126d8a455ed25 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 * @@ -78,8 +79,7 @@ def install(self, spec, prefix): ) 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 9f8360d432dcc6..4c73617d39c3ee 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 * @@ -118,7 +119,6 @@ def install(self, spec, prefix): 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/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 6668507186e2ae..f9844ac1945711 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -3,27 +3,67 @@ # # 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" + git = "https://github.com/tensorflow/tensorflow.git" maintainers("adamjstewart", "aweits") import_modules = ["tensorflow"] license("Apache-2.0") + 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") @@ -83,6 +123,9 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): version("2.2.1", sha256="e6a28e64236d729e598dbeaa02152219e67d0ac94d6ed22438606026a02e0f88") version("2.2.0", sha256="69cd836f87b8c53506c4f706f655d423270f5a563b76dc1cfa60fbc3184185a3") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + 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") @@ -114,144 +157,144 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): extends("python") - # Python support based on wheel availability - depends_on("python@3.9:3.12", when="@2.16:", type=("build", "run")) - depends_on("python@3.9:3.11", when="@2.14:2.15", 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.5.0", type="build", when="@2.16:") - depends_on("bazel@6.1.0", type="build", when="@2.14:2.15") - 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@3.10:", type=("build", "run"), when="@2.16:") - depends_on("py-h5py@2.9:", type=("build", "run"), when="@2.7:2.15") - 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.3.1:0.3", type=("build", "run"), when="@2.15.1:") - depends_on("py-ml-dtypes@0.2", type=("build", "run"), when="@2.15.0") - 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-requests@2.21:2", type=("build", "run"), when="@2.16:") - depends_on("py-requests", type=("build", "run")) - 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:", type=("build", "run"), when="@2.7:2.11,2.13,2.16:") - depends_on("py-wrapt@1.11:1.14", type=("build", "run"), when="@2.12,2.14:2.15") - 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, 17): - 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 - - # tensorflow/tools/pip_package/build_pip_package.sh - depends_on("patchelf", when="@2.13: platform=linux", type="build") - # 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-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-libclang@13:", when="@2.9:") + depends_on("py-libclang@9.0.1:", when="@2.7:2.8") + 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") + depends_on("py-numpy@1.23.5:", when="@2.14:") + 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") + 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:4", when="@2.12:") + 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, 18): + depends_on("py-tensorboard@2.{}".format(minor_ver), when="@2.{}".format(minor_ver)) + + # TODO: support circular run-time dependencies + # depends_on('py-tensorflow-estimator') + # depends_on('py-keras') + + # 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") @@ -271,12 +314,12 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): depends_on("cuda@:11.4", when="@2.4:2.7") depends_on("cuda@:10.2", when="@:2.3") - depends_on("cudnn@8.9:", when="@2.15:") - depends_on("cudnn@8.7:", when="@2.14:") - depends_on("cudnn@8.6:", when="@2.12:") - depends_on("cudnn@8.1:", when="@2.5:") - depends_on("cudnn@8.0:", when="@2.4:") - depends_on("cudnn@7.6:", when="@2.1:") + 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') @@ -286,20 +329,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") @@ -308,11 +340,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( @@ -335,32 +362,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,2.11.0-rocm-enhanced") - conflicts("+rocm", when="@:2.7.4-a,2.7.4.0:2.11.0-a,2.11.0.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") @@ -403,8 +427,46 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): # and https://github.com/abseil/abseil-cpp/issues/1665 patch("absl_neon.patch", when="@2.16.1: 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 @@ -512,6 +574,14 @@ def setup_build_environment(self, env): # 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") @@ -577,10 +647,8 @@ def setup_build_environment(self, env): # 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)) else: env.set("TF_NEED_CUDA", "0") @@ -605,7 +673,7 @@ def setup_build_environment(self, env): # Please specify optimization flags to use during compilation when # bazel option '--config=opt' is specified - env.set("CC_OPT_FLAGS", spec.architecture.target.optimization_flags(spec.compiler)) + env.set("CC_OPT_FLAGS", optimization_flags(self.compiler, spec.target)) # Would you like to interactively configure ./WORKSPACE for # Android builds? @@ -658,6 +726,14 @@ def configure(self, spec, prefix): 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( @@ -704,6 +780,18 @@ def post_configure_fixes(self): 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") @@ -769,23 +857,42 @@ def build(self, spec, prefix): 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 index 61fdd3b919303c..2df1af67b02af2 100644 --- a/var/spack/repos/builtin/packages/py-tensorstore/package.py +++ b/var/spack/repos/builtin/packages/py-tensorstore/package.py @@ -16,6 +16,8 @@ class PyTensorstore(PythonPackage): version("0.1.54", sha256="e1a9dcb0be7c828f752375409537d4b39c658dd6c6a0873fe21a24a556ec0e2a") + depends_on("cxx", type="build") # generated + # .bazelversion depends_on("bazel@6.4.0", type="build") 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 00000000000000..96d8d50294a65f --- /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 feb1848bf5f2e8..3cdebb3b7a8176 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 * @@ -29,5 +31,20 @@ class PyTesorter(PythonPackage): 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-textx/package.py b/var/spack/repos/builtin/packages/py-textx/package.py new file mode 100644 index 00000000000000..03911b530ea9d6 --- /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 ac747b3f36a82f..d910096cfdbe93 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") @@ -37,8 +41,7 @@ def cmake_args(self): 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 a9ba9cc9e93eac..e2595f4e18f24e 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 1dbfac1e074032..35e0eb8f47886a 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-tifffile/package.py b/var/spack/repos/builtin/packages/py-tifffile/package.py index ed0942d8dbdb15..0d7893262e508d 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 c477f3cdb1e7fd..dbf659b68c89c1 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 1267ff0b60a5bc..8a57abe08048a6 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 8a5b4a88a9f6ca..4ff2c87d319725 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 3940c9a9dbf349..ffbd7416d08008 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-torch-cluster/package.py b/var/spack/repos/builtin/packages/py-torch-cluster/package.py index 02eabb6f3302f3..2843481d150af5 100644 --- a/var/spack/repos/builtin/packages/py-torch-cluster/package.py +++ b/var/spack/repos/builtin/packages/py-torch-cluster/package.py @@ -17,16 +17,8 @@ class PyTorchCluster(PythonPackage): maintainers("adamjstewart") version("1.6.3", sha256="78d5a930a5bbd0d8788df8c6d66addd68d6dd292fe3edb401e3dacba26308152") - version( - "1.5.8", - sha256="a0a32f63faac40a026ab1e9da31f6babdb4d937e53be40bd1c91d9b5a286eee6", - deprecated=True, - ) - version( - "1.5.7", - sha256="62a3ec1bebadda1a4a2c867203f4c957b9c0b9d11ffb03b40b8ea9f95a0a4d3b", - deprecated=True, - ) + + depends_on("cxx", type="build") # generated depends_on("python", type=("build", "link", "run")) depends_on("py-setuptools", type="build") @@ -35,26 +27,12 @@ class PyTorchCluster(PythonPackage): # Undocumented dependencies depends_on("py-torch", 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") - def setup_build_environment(self, env): - if self.spec.satisfies("@1.5.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) + 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: - 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) + 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 00000000000000..df20602e79c3f8 --- /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 be0cc9a790692f..4d5c5dcff4776a 100644 --- a/var/spack/repos/builtin/packages/py-torch-geometric/package.py +++ b/var/spack/repos/builtin/packages/py-torch-geometric/package.py @@ -18,48 +18,20 @@ class PyTorchGeometric(PythonPackage): maintainers("adamjstewart") version("2.5.3", sha256="ad0761650c8fa56cdc46ee61c564fd4995f07f079965fe732b3a76d109fd3edc") - version( - "2.1.0.post1", - sha256="32347402076ccf60fa50312825178f1e3e5ce5e7b3b3a8b2729ac699da24525d", - deprecated=True, - ) - version( - "1.6.3", - sha256="347f693bebcc8a621eda4867dafab91c04db5f596d7ed7ecb89b242f8ab5c6a1", - deprecated=True, - ) - version( - "1.6.0", - sha256="fbf43fe15421c9affc4fb361ba4db55cb9d3c64d0c29576bb58d332bf6d27fef", - deprecated=True, - ) - depends_on("py-flit-core@3.2:3", when="@2.4:", type="build") + 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", when="@2.5:") + depends_on("py-fsspec") depends_on("py-jinja2") - depends_on("py-aiohttp", when="@2.5:") + depends_on("py-aiohttp") depends_on("py-requests") - depends_on("py-pyparsing", when="@1.7.2:") + depends_on("py-pyparsing") depends_on("py-scikit-learn") - depends_on("py-psutil@5.8:", when="@2.2:") + depends_on("py-psutil@5.8:") # Undocumented dependencies depends_on("py-torch") - - # Historical dependencies - depends_on("py-setuptools", type="build", when="@:2.3") - 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")) 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 08c0ecad6d0aa9..a0ca87cd8b725a 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,44 +13,171 @@ 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-packaging", 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("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) + self.torch_cuda_arch_list(env) else: env.unset("CUDA_HOME") - @when("^python@:3.10") + 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("^python@3.11:") + @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": "--cpp_ext --cuda_ext", + "--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 cd9c395d68433f..0e9589618d3fff 100644 --- a/var/spack/repos/builtin/packages/py-torch-scatter/package.py +++ b/var/spack/repos/builtin/packages/py-torch-scatter/package.py @@ -17,11 +17,8 @@ class PyTorchScatter(PythonPackage): maintainers("adamjstewart") version("2.1.2", sha256="69b3aa435f2424ac6a1bfb6ff702da6eb73b33ca0db38fb26989c74159258e47") - version( - "2.0.5", - sha256="148fbe634fb9e9465dbde2ab337138f63650ed8abbac42bb3f565e3fe92e9b2f", - deprecated=True, - ) + + depends_on("cxx", type="build") # generated depends_on("python", type=("build", "link", "run")) depends_on("py-setuptools", type="build") @@ -29,23 +26,12 @@ class PyTorchScatter(PythonPackage): # Undocumented dependencies depends_on("py-torch", type=("build", "link", "run")) - # Historical dependencies - depends_on("py-pytest-runner", type="build", when="@:2.0.7") - def setup_build_environment(self, env): - if self.spec.satisfies("@2.0.6:"): - 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) + 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: - 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) + 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 cac8ffff3bd8b4..c05ce351095153 100644 --- a/var/spack/repos/builtin/packages/py-torch-sparse/package.py +++ b/var/spack/repos/builtin/packages/py-torch-sparse/package.py @@ -21,6 +21,8 @@ class PyTorchSparse(PythonPackage): version("0.6.8", sha256="312fb5ae6e4e575fca4bbc0bd092af85e7679d5b8e53459f24492fc2a073c7b6") version("0.6.7", sha256="f69b2ed35baf2a9853234756a2b19e6f7ce88d2c1f029d1c7ca166d91e1adbd0") + 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-torch-spline-conv/package.py b/var/spack/repos/builtin/packages/py-torch-spline-conv/package.py index 537a31739ab954..c91b4538206804 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 @@ -17,11 +17,8 @@ class PyTorchSplineConv(PythonPackage): maintainers("adamjstewart") version("1.2.2", sha256="ed45a81da29f774665dbdd4709d7e534cdf16d2e7006dbd06957f35bd09661b2") - version( - "1.2.0", - sha256="b7a1788004f6c6143d47040f2dd7d8a579a0c69a0cb0b5d7537416bf37c082a5", - deprecated=True, - ) + + depends_on("cxx", type="build") # generated depends_on("python", type=("build", "link", "run")) depends_on("py-setuptools", type="build") @@ -29,23 +26,12 @@ class PyTorchSplineConv(PythonPackage): # Undocumented dependencies depends_on("py-torch", type=("build", "link", "run")) - # Historical dependencies - depends_on("py-pytest-runner", type="build", when="@:1.2.1") - def setup_build_environment(self, env): - if self.spec.satisfies("@1.2.1:"): - 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) + 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: - 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) + 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 e7824283fd3040..e2bc15b64e614a 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -17,15 +17,19 @@ 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("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") @@ -55,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. @@ -76,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", @@ -139,7 +138,8 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # Required dependencies # Based on PyPI wheel availability with default_args(type=("build", "link", "run")): - depends_on("python@3.8:3.12", when="@2.2:") + 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") @@ -162,12 +162,13 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("py-networkx", when="@2:") depends_on("py-jinja2", when="@2:") depends_on("py-fsspec", when="@2.1:") - depends_on("mkl@2021.1.1:2021.4.0", when="@2.3: platform=windows") # 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:") @@ -187,7 +188,9 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # 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@2023-11-04", when="@2.3:") + 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") @@ -202,6 +205,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): 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") @@ -230,28 +234,32 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): 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.12.0", when="@2.3:") - 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.5.1_2020-12-22", when="@1.8:") + 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:+cuda") + 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("cudnn@8.5:", when="@2.3:+cudnn") - 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") @@ -274,6 +282,8 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("miopen-hip") depends_on("rocminfo") depends_on("mpi", when="+mpi") + depends_on("ucc", when="+ucc") + depends_on("ucx", when="+ucc") depends_on("mkl", when="+mkldnn") # Test dependencies @@ -284,6 +294,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # 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") @@ -475,10 +486,10 @@ def patch(self): def torch_cuda_arch_list(self, env): if "+cuda" in self.spec: - torch_cuda_arch = ";".join( - "{0:.1f}".format(float(i) / 10.0) for i in self.spec.variants["cuda_arch"].value + torch_cuda_arch = CudaPackage.compute_capabilities( + self.spec.variants["cuda_arch"].value ) - env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch) + env.set("TORCH_CUDA_ARCH_LIST", ";".join(torch_cuda_arch)) def setup_build_environment(self, env): """Set environment variables used to control the build. @@ -520,6 +531,7 @@ def enable_or_disable(variant, keyword="USE", var=None): 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 self.torch_cuda_arch_list(env) @@ -556,6 +568,11 @@ def enable_or_disable(variant, keyword="USE", var=None): 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") @@ -587,6 +604,7 @@ def enable_or_disable(variant, keyword="USE", var=None): 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") @@ -657,21 +675,15 @@ def enable_or_disable(variant, keyword="USE", var=None): env.set("USE_SYSTEM_PTHREADPOOL", "ON") env.set("USE_SYSTEM_PYBIND11", "ON") env.set("USE_SYSTEM_SLEEF", "ON") - # env.set("USE_SYSTEM_TBB", "ON") - # env.set("USE_SYSTEM_UCC", "ON") + env.set("USE_SYSTEM_UCC", "ON") # https://github.com/pytorch/pytorch/issues/60332 # env.set("USE_SYSTEM_XNNPACK", "ON") - # env.set("USE_SYSTEM_ZSTD", "ON") if self.spec.satisfies("+custom-protobuf"): env.set("BUILD_CUSTOM_PROTOBUF", "ON") else: env.set("BUILD_CUSTOM_PROTOBUF", "OFF") - # https://github.com/pytorch/pytorch/issues/111086 - if self.spec.satisfies("%apple-clang@15:"): - env.append_flags("LDFLAGS", "-Wl,-ld_classic") - def setup_run_environment(self, env): self.torch_cuda_arch_list(env) diff --git a/var/spack/repos/builtin/packages/py-torchaudio/package.py b/var/spack/repos/builtin/packages/py-torchaudio/package.py index d1fa9f4f788df3..2ac903565f308e 100644 --- a/var/spack/repos/builtin/packages/py-torchaudio/package.py +++ b/var/spack/repos/builtin/packages/py-torchaudio/package.py @@ -18,6 +18,11 @@ class PyTorchaudio(PythonPackage): 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") @@ -47,15 +52,24 @@ class PyTorchaudio(PythonPackage): version("0.5.0", tag="v0.5.0", commit="09494ea545738538f9db2dceeffe10d421060ee5") version("0.4.0", tag="v0.4.0", commit="8afed303af3de41f3586007079c0534543c8f663") + 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.8:3.12", when="@2.2:") + 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") @@ -96,6 +110,21 @@ class PyTorchaudio(PythonPackage): depends_on("pkgconfig", type="build") depends_on("sox") + # 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 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) diff --git a/var/spack/repos/builtin/packages/py-torchdata/package.py b/var/spack/repos/builtin/packages/py-torchdata/package.py index 244621dac61f61..63ee044740097e 100644 --- a/var/spack/repos/builtin/packages/py-torchdata/package.py +++ b/var/spack/repos/builtin/packages/py-torchdata/package.py @@ -18,6 +18,8 @@ class PyTorchdata(PythonPackage): license("BSD-3-Clause") version("main", branch="main") + 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") @@ -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 b3a630274d99b2..294c237b33842d 100644 --- a/var/spack/repos/builtin/packages/py-torchgeo/package.py +++ b/var/spack/repos/builtin/packages/py-torchgeo/package.py @@ -13,11 +13,12 @@ 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") @@ -36,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.26.1:+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 122fb8c485aed9..16b272e7a992f9 100644 --- a/var/spack/repos/builtin/packages/py-torchmetrics/package.py +++ b/var/spack/repos/builtin/packages/py-torchmetrics/package.py @@ -12,14 +12,21 @@ 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.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") + 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") @@ -44,6 +51,8 @@ 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("py-setuptools", type="build") @@ -60,7 +69,13 @@ class PyTorchmetrics(PythonPackage): 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:") - depends_on("py-pretty-errors@1.2.25", when="@1.4:") + + depends_on("py-scipy@1.0.1:", when="+image") + depends_on("py-torchvision@0.8:", when="+image") + depends_on("py-torch-fidelity", when="+image") # 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") + + depends_on("py-lpips", when="@:1.2.0+image") 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 00000000000000..e8f7a2cebce369 --- /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 5369401bba3ade..95fde8068ac14e 100644 --- a/var/spack/repos/builtin/packages/py-torchtext/package.py +++ b/var/spack/repos/builtin/packages/py-torchtext/package.py @@ -42,6 +42,9 @@ class PyTorchtext(PythonPackage): version("0.6.0", tag="0.6.0", commit="3a54c7f52584f201c17ca7489b52b812152612dc") version("0.5.0", tag="0.5.0", commit="0169cde2f1d446ae886ef0be07e9a673585ed256") + 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:") diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index 96994a5b7a4445..4fe32d63cce910 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -19,6 +19,11 @@ 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") @@ -50,16 +55,26 @@ class PyTorchvision(PythonPackage): version("0.6.0", sha256="02de11b3abe6882de4032ce86dab9c7794cbc84369b44d04e667486580f0f1f7") version("0.5.0", sha256="eb9afc93df3d174d975ee0914057a9522f5272310b4d56c150b955c287a4d74d") + 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")) + + # 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.8:3.12", when="@0.17:") + depends_on("python@3.9:3.12", 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") @@ -67,6 +82,11 @@ class PyTorchvision(PythonPackage): # 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") @@ -103,15 +123,24 @@ class PyTorchvision(PythonPackage): # setup.py depends_on("py-setuptools", type="build") depends_on("py-numpy", 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-requests", when="@0.12:0.17.0", type=("build", "run")) @@ -136,6 +165,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 @@ -154,7 +190,8 @@ def setup_build_environment(self, env): 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 61765112fed6f8..3106ffb01b63bb 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 dd379e923d8d06..f4dce81b48563b 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 77537822c6e475..3a6178ce8db092 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 404c73b8e931db..8bccce306bf779 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 index a09e4c1f40fbb1..175b3336261e2b 100644 --- a/var/spack/repos/builtin/packages/py-transformer-engine/package.py +++ b/var/spack/repos/builtin/packages/py-transformer-engine/package.py @@ -22,6 +22,8 @@ class PyTransformerEngine(PythonPackage): 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") diff --git a/var/spack/repos/builtin/packages/py-transformers/package.py b/var/spack/repos/builtin/packages/py-transformers/package.py index e1b34bb65deb2a..fc4a35ae492a00 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 00000000000000..01772b1c568f85 --- /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-triangle/package.py b/var/spack/repos/builtin/packages/py-triangle/package.py index f54aa8641c23f8..d236b1f5c1caf1 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 00000000000000..3abbc319e9b9ce --- /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 index 2740063ef69b0d..0c326c44d4c4f1 100644 --- a/var/spack/repos/builtin/packages/py-triton/package.py +++ b/var/spack/repos/builtin/packages/py-triton/package.py @@ -11,14 +11,25 @@ class PyTriton(PythonPackage): 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-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py index 91fd4b4b6e56ea..ca95de3d40c456 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 9b38e896687261..56424091a3dbca 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 @@ 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-tweedledum/package.py b/var/spack/repos/builtin/packages/py-tweedledum/package.py index 9e4be8b77cc45f..f46ccf8bdefce0 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 905983e2bdd302..c35061d4c6067b 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 45f96fdddfd409..62d15f6978bbda 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 aef21d66be91a0..b1d8c9134589e9 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-ucx-py/package.py b/var/spack/repos/builtin/packages/py-ucx-py/package.py index d8bcd05a5fe744..233eb1d6de7178 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 ced9b7d3a8d01f..e237f75f95f0d6 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 1b50fb9c2ebb6a..5c5c2140c57af7 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 bf737721f26f37..f3461e3a34197c 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 00000000000000..c6b0aadbb0738e --- /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 00000000000000..e3f1fec1713922 --- /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 a0a521d84703bf..24de27c9dc9a68 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 c80b6f8b2c25e6..5811d0644fbacd 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 4f9155b8e3d00d..e310c215926035 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 b2b98cb77701c7..6c3d6eb4e7324c 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 f7d62a92bbbff0..ec56a961db840a 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 00000000000000..c872d974c83789 --- /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 bc05d7e2207444..1465d116a8ed8c 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 10c875940c75f2..7bdacaad781d9f 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 2783c910071c58..96ffc84e448911 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-validators/package.py b/var/spack/repos/builtin/packages/py-validators/package.py index b2baef6d013cd2..657a8959fd671c 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-vector/package.py b/var/spack/repos/builtin/packages/py-vector/package.py index 7a5ec7749de26d..fb9fe5aa95a045 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/package.py b/var/spack/repos/builtin/packages/py-versioneer/package.py index 5eb5ae59e5e7f2..f7b50a4760f4eb 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 4b720793a41cb4..fbb2d7734f4a30 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 index 14187dd2d26843..115e7ca251518f 100644 --- a/var/spack/repos/builtin/packages/py-vl-convert-python/package.py +++ b/var/spack/repos/builtin/packages/py-vl-convert-python/package.py @@ -10,10 +10,20 @@ 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-0.13.1.tar.gz" - - version("1.3.0", sha256="de1462151dfbba7b2a17881dac1d2269662012c252f1e9d1537a4daed5e36067") - version("0.13.1", sha256="d70a608257dd6b5b782d96cccebfe7289992e522e47a8bebb7d928253ca8b396") + 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")) diff --git a/var/spack/repos/builtin/packages/py-warpx/package.py b/var/spack/repos/builtin/packages/py-warpx/package.py index 17483e1c30c83c..6119ba4e8191d4 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 @@ 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 cb9bcfb44be7dd..e18bbff581b2ae 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 834ba71967344f..4114f988309929 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 00000000000000..7f4af5a9e88782 --- /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 7302c5e2b9b4f9..eaf6bd6c06be24 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 b82bc1572984d8..eb5ddafbb6b9fc 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 c820112eb517a8..e8f6344102519c 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 a454e8b6b5c6f4..475db93c4f01e2 100644 --- a/var/spack/repos/builtin/packages/py-werkzeug/package.py +++ b/var/spack/repos/builtin/packages/py-werkzeug/package.py @@ -13,8 +13,9 @@ 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.0.4", sha256="34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306") version("3.0.0", sha256="3ffff4dcc32db52ef3cc94dff3000a3c2846890f3a5a51800a27b909c5e770f0") version("2.3.7", sha256="2b8c0e447b4b9dbcc85dd97b6eeb4dcbaf6c8b6c3be0bd654e25553e0a2157d8") version("2.3.4", sha256="1d5a58e0377d1fe39d061a5de4469e414e78ccb1e1e59c0f5ad6fa1c36c52b76") diff --git a/var/spack/repos/builtin/packages/py-whatshap/package.py b/var/spack/repos/builtin/packages/py-whatshap/package.py index d2141255b8e0bb..1229823c2782f2 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 38e4c3062d690a..582918513d73f4 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 * @@ -43,5 +44,4 @@ def install(self, spec, prefix): # 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 aba30c805eb395..9e6f36cdf55d93 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 05ee82d1bc21ce..28e707b44df6e4 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 4c22c0676fe375..b6bde1a38cc6d2 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-wxpython/package.py b/var/spack/repos/builtin/packages/py-wxpython/package.py index 87d1e314ebfe2b..6fceaa583d3a7e 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 00000000000000..9dfcfda16ca37f --- /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-xarray/package.py b/var/spack/repos/builtin/packages/py-xarray/package.py index e8cdc8dec62f74..598fa653ff6776 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 1ef69e00b28675..98cdea6e7bf795 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-xgboost/add-lib64.patch b/var/spack/repos/builtin/packages/py-xgboost/add-lib64.patch new file mode 100644 index 00000000000000..11adbdc0bc0e47 --- /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 2fa4b187ed61ab..2c14f5bc30bea5 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-xpyb/package.py b/var/spack/repos/builtin/packages/py-xpyb/package.py index 27afdad8d92387..c590f3eca865b0 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 fe82333f2d02f1..f2020a984b8d3e 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 @@ 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-xtb/package.py b/var/spack/repos/builtin/packages/py-xtb/package.py index 589e45aa853450..1bc19445148ae4 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 6b2110d85deed0..581d657b7732b2 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 6eae1130195731..abd3b491b7325d 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 27df06fa84bf97..d07f7f8a7ac6b6 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 00000000000000..f226bff0b31f26 --- /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 183362dfe365d2..f42db02498dfb0 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 eefccd11079ad6..96f03473a40667 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 b4431367936271..dee48ed6696c66 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 bbd74462c35582..851ed124fb3b3f 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 6d3dbf9b2d47c0..7da4fce325ca6d 100644 --- a/var/spack/repos/builtin/packages/py-zarr/package.py +++ b/var/spack/repos/builtin/packages/py-zarr/package.py @@ -31,6 +31,8 @@ class PyZarr(PythonPackage): 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:") 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 fdeb2965dc8cac..4858f4267ebe1d 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 deec70d19eb508..db68fb119b406d 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 5ac69637f1164d..349c1b04421b1e 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 00000000000000..36d1bbe3ce545a --- /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 31095ec8db9f91..bd04f292aae63d 100644 --- a/var/spack/repos/builtin/packages/pygmo/package.py +++ b/var/spack/repos/builtin/packages/pygmo/package.py @@ -21,6 +21,8 @@ class Pygmo(CMakePackage): version("master", branch="master") version("2.18.0", sha256="9f081cc973297894af09f713f889870ac452bfb32b471f9f7ba08a5e0bb9a125") + depends_on("cxx", type="build") # generated + 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 9917ff34c33dad..d05aca50017ae6 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 b44516b870ebe8..e0380753335d05 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 00000000000000..9d69f87adb5a2d --- /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/package.py b/var/spack/repos/builtin/packages/pythia6/package.py index c3e358f2cadedd..f28bf5c970de27 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.") diff --git a/var/spack/repos/builtin/packages/pythia8/package.py b/var/spack/repos/builtin/packages/pythia8/package.py index 0086f2b7309a47..b483dd036258ae 100644 --- a/var/spack/repos/builtin/packages/pythia8/package.py +++ b/var/spack/repos/builtin/packages/pythia8/package.py @@ -58,6 +58,8 @@ class Pythia8(AutotoolsPackage): deprecated=True, ) + depends_on("cxx", type="build") # generated + variant( "cxxstd", default="11", @@ -134,6 +136,13 @@ def setup_cxxstd(self): 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 + @when("@:8.311") + def patch(self): + filter_file( + r"[/]examples[/]Makefile[.]inc\|;n' \\", "/examples/Makefile.inc|' \\", "configure" + ) + def configure_args(self): args = [] diff --git a/var/spack/repos/builtin/packages/python-venv/package.py b/var/spack/repos/builtin/packages/python-venv/package.py index a814f472210949..390b26c198bfbc 100644 --- a/var/spack/repos/builtin/packages/python-venv/package.py +++ b/var/spack/repos/builtin/packages/python-venv/package.py @@ -93,6 +93,9 @@ def setup_dependent_run_environment(self, env, dependent_spec): 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.""" diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index e8689a04fb613f..fb470b3af2a5ae 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -21,6 +21,25 @@ from spack.util.prefix import Prefix +def make_pyvenv_cfg(python_spec: "spack.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.""" @@ -28,7 +47,7 @@ class Python(Package): url = "https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz" list_url = "https://www.python.org/ftp/python/" list_depth = 1 - tags = ["windows", "build-tools"] + tags = ["windows"] maintainers("skosukhin", "scheibelp") @@ -40,13 +59,16 @@ 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.7", - sha256="068c05f82262e57641bd93458dfa883128858f5f4997aad7a36fd25b13b29209", - 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") @@ -54,6 +76,7 @@ class Python(Package): 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 +91,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 +111,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") @@ -197,6 +222,9 @@ class Python(Package): deprecated=True, ) + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + extendable = True # Variants to avoid cyclical dependencies for concretizer @@ -236,7 +264,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") @@ -612,10 +639,11 @@ def configure_args(self): 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( @@ -646,6 +674,9 @@ def configure_args(self): ) ) + 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): @@ -834,14 +865,14 @@ def command(self): # * 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 @@ -850,8 +881,9 @@ def command(self): 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): @@ -1000,8 +1032,13 @@ def find_library(self, library): 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) @@ -1044,14 +1081,16 @@ def libs(self): # 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 @@ -1167,7 +1206,6 @@ def setup_dependent_build_environment(self, env, dependent_spec): """Set PYTHONPATH to include the site-packages directory for the extension and any other python extensions it depends on. """ - # 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 @@ -1243,6 +1281,33 @@ def setup_dependent_package(self, module, dependent_spec): 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): + """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""" # do not use self.command because we are also testing the run env 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 92593111c7d556..93ac1cccceabbd 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") @@ -82,7 +80,7 @@ def cmake_args(self): "-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 cf73be4670ac04..522f32ad6d4c28 100644 --- a/var/spack/repos/builtin/packages/qb3/package.py +++ b/var/spack/repos/builtin/packages/qb3/package.py @@ -16,6 +16,8 @@ class Qb3(CMakePackage): version("master", branch="master") + depends_on("cxx", type="build") # generated + depends_on("cmake@3.5:", type="build") depends_on("libicd") diff --git a/var/spack/repos/builtin/packages/qca/package.py b/var/spack/repos/builtin/packages/qca/package.py index 1313a3558b109e..30247fc324af46 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 5328f8dc2f92a4..68bb80a8df7537 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 a6ebd8ae4b8751..5ccaf8d4090eb0 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 index 8933381653e545..51f66823e5d513 100644 --- a/var/spack/repos/builtin/packages/qctool/package.py +++ b/var/spack/repos/builtin/packages/qctool/package.py @@ -23,6 +23,10 @@ class Qctool(WafPackage): 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 aaa6fd1b343684..452ca12d1d8ca5 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 e5fdd5fd107838..8ac1e92bf78b3e 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 196a52622f1f44..83d12423576416 100644 --- a/var/spack/repos/builtin/packages/qgis/package.py +++ b/var/spack/repos/builtin/packages/qgis/package.py @@ -60,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") diff --git a/var/spack/repos/builtin/packages/qgraf/package.py b/var/spack/repos/builtin/packages/qgraf/package.py index 722d97b8fa0de1..72b311a5980352 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 c612e8e8163915..20f168d22da1e9 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 15605094e8c734..15e64bc56fa4e8 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 33e1580946fe2d..5b9996e04f7427 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", diff --git a/var/spack/repos/builtin/packages/qmd-progress/package.py b/var/spack/repos/builtin/packages/qmd-progress/package.py index f3b0580d581770..02edafb729ed70 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 8acd47432103f4..072dbfc1572205 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 2cf3db6dcbf5b9..23f3a542f56944 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 00000000000000..2fb7bf314ce7e7 --- /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 eb4344129828d4..695dd55daef6e1 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 index ca081ad1c72b28..11dce1d20f9759 100644 --- a/var/spack/repos/builtin/packages/qrmumps/package.py +++ b/var/spack/repos/builtin/packages/qrmumps/package.py @@ -20,6 +20,9 @@ class Qrmumps(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/qrupdate/package.py b/var/spack/repos/builtin/packages/qrupdate/package.py index bdb85917bafe23..a7cbb2631aa096 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 ce39d02d45d65e..b61c9d529520b7 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") @@ -135,11 +137,12 @@ def make_qsci_python(self): make("install", "-C", "build/") def test_python_import(self): - if "+python" in self.spec: - 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") - else: - print("qscintilla ins't built with python, skipping import test") + """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 00000000000000..811bfc4551ecba --- /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 add485f251392a..ca3acad6543bf7 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 re import shutil import sys +import tempfile import llnl.util.tty as tty @@ -31,7 +32,7 @@ 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 +83,45 @@ def install_config_summary(self): # 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 +133,9 @@ 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") @@ -112,6 +155,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." diff --git a/var/spack/repos/builtin/packages/qt-declarative/package.py b/var/spack/repos/builtin/packages/qt-declarative/package.py index 8956e58cccc797..4f70ef7883ef60 100644 --- a/var/spack/repos/builtin/packages/qt-declarative/package.py +++ b/var/spack/repos/builtin/packages/qt-declarative/package.py @@ -16,6 +16,9 @@ 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") @@ -35,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 aea6e37f06c31d..3af4540ba5d27e 100644 --- a/var/spack/repos/builtin/packages/qt-quick3d/package.py +++ b/var/spack/repos/builtin/packages/qt-quick3d/package.py @@ -16,6 +16,9 @@ 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") @@ -35,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 f3458625439644..cb60aad12e2f2b 100644 --- a/var/spack/repos/builtin/packages/qt-quicktimeline/package.py +++ b/var/spack/repos/builtin/packages/qt-quicktimeline/package.py @@ -16,6 +16,9 @@ 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") @@ -35,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 d8d39e91869677..43ba9b87171322 100644 --- a/var/spack/repos/builtin/packages/qt-shadertools/package.py +++ b/var/spack/repos/builtin/packages/qt-shadertools/package.py @@ -18,6 +18,9 @@ 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") @@ -37,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 26a20bb33c90a1..a2f44fc2e63f6c 100644 --- a/var/spack/repos/builtin/packages/qt-svg/package.py +++ b/var/spack/repos/builtin/packages/qt-svg/package.py @@ -18,6 +18,9 @@ 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") @@ -33,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") @@ -45,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/package.py b/var/spack/repos/builtin/packages/qt/package.py index 2916255f24cc9c..f02c0a96748fea 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -15,6 +15,7 @@ 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,12 @@ 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") @@ -57,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.") @@ -66,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") @@ -125,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", @@ -174,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:") @@ -266,32 +311,6 @@ def determine_version(cls, exe): conflicts("%oneapi", when="@:5.15.13") patch("qt51514-oneapi.patch", when="@5.15.14: %oneapi") - # 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", - ) - # Mapping for compilers/systems in the QT 'mkspecs' compiler_mapping = { "intel": ("icc",), @@ -305,7 +324,7 @@ def determine_version(cls, exe): "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 @@ -355,7 +374,8 @@ def url_for_version(self, version): 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 @@ -382,6 +402,10 @@ def setup_dependent_build_environment(self, env, dependent_spec): 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) @@ -582,18 +606,25 @@ def common_config_args(self): 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") @@ -737,7 +768,7 @@ def configure(self, spec, prefix): # 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") @@ -777,6 +808,9 @@ def configure(self, spec, prefix): 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"]) @@ -794,10 +828,11 @@ def configure(self, spec, prefix): # 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. @@ -810,13 +845,22 @@ def configure(self, spec, prefix): # 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/qt515_masm_python.patch b/var/spack/repos/builtin/packages/qt/qt515_masm_python.patch new file mode 100644 index 00000000000000..af599bd1825ee9 --- /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 ed5d649dcbee1a..78aff2df9a3f97 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 391afc70f357bd..d840c19ffd76bd 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 @@ def configure_args(self): 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 b6ebbf2379f97f..3909afe98ab9eb 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 b9393e8721bf1e..71388a715afb14 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 bfa8af70600088..69a327b5521e77 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 a2ee3d7f11484f..ea8715a64dbbdc 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,7 @@ 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") @@ -48,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", @@ -296,6 +301,19 @@ 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" @@ -329,6 +347,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" diff --git a/var/spack/repos/builtin/packages/qucs/package.py b/var/spack/repos/builtin/packages/qucs/package.py index 7d948dac68136f..8e9ee739c0d0e5 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 69347260894212..40b6deb3f137f0 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 81dfebea653a51..61357eed447601 100644 --- a/var/spack/repos/builtin/packages/quicksilver/package.py +++ b/var/spack/repos/builtin/packages/quicksilver/package.py @@ -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 52ab8be754eae5..6bb6bd8ed414b7 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 0e2fe920281991..0b41bbfbea6695 100644 --- a/var/spack/repos/builtin/packages/quota/package.py +++ b/var/spack/repos/builtin/packages/quota/package.py @@ -9,12 +9,14 @@ 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 d9540fdf795235..542ac58769f1c5 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 7e6fa96220a21f..0ade4950765dbd 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 52b9b30bce92e7..57a724e1410c06 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 28353cb981e31a..32eda730e5b710 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 4ff4c218c4fee3..14d7d2fc8fff19 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 4e8b08b81e613b..24eb557dd215d9 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 343b8c468d85a3..1f489a0c5bd9b8 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 00e03cb21ae1a5..3e98e658e158cd 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 50ab73ce474140..446132448816f3 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 1048a74d065fdc..a83b2cce4d9bcc 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 225b8bc1cfdce0..f113150a303429 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 7fe07cbf9ecb7a..dbd61e3dc83305 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 8a582acb5376d0..b2d58a8cf56f3d 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 8e4e5b57027973..013efef3cbe7ef 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 8d837804708020..1cf3e17b72d987 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 543556040ab382..8dd71d08e0821f 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 5fe87012da9dca..30dd0e578905d8 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 b32ca1b9443ff8..d8cd59aad64602 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 b760df5b0206d2..b1b685e85a5074 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 b440581cced234..70f1a10a92c94a 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 ac363443653c3e..d2a70da851ad7b 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 386fcac2a07211..b192ed5e60633f 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 a4ef4ec68a064c..dda959bf5a051f 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 292e55f637caf6..c6e03b157efa82 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 bb1c02ed208009..230890b99d68f4 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 79c01e29ef56da..7ab951511fa02a 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 a13354904ec241..537d9efc7550a6 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 fbacffb18313e8..758c817412887a 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 00000000000000..c451ac36e19d21 --- /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 e45989522be1ff..34c186409c06b1 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 44ff67e71e8de3..de2ec6bb691fb0 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 8c7d5a5d3ee88b..76563eb0efe205 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-assertive-code/package.py b/var/spack/repos/builtin/packages/r-assertive-code/package.py index 81b3036035ef93..cfab4f28a21d34 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 45f7f2edd6a58b..9fa8a9c63d7d64 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 87e8bb932928ed..2911316cc24873 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 452015432cca48..f733104ad4f7d1 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 faebd2b48d6b2d..6af5198de1b65c 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 adec1f7bebb528..3910a5bca320be 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 1affd66f3c4c3c..7354c642d5ddce 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 32afab212951bb..1eb9ae6668001a 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 dc105aa4a7dfa8..b4abbf665f6e30 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 7d933ac4ab813f..fd394995648290 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 98a96e20b9e8e5..0a9e961c88b077 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 ec028b901db5d5..5745307b54dc54 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 9b626313ab0e13..4efc158c227c7a 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 741c9a4ca2443b..229d37cdbb44cc 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 00000000000000..9fd2391596f2fa --- /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 80deb2b010e4ce..780050cf95248f 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 caeca61193a357..24f9e0ec3bad7b 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 8bb8749e9957a2..dc804e6f7b7cfe 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 ebd95fd3656059..a93794734e4583 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 bdc2abc2ff3fbd..cc525ccaa51d68 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 8bf3a70367d48d..40c1b0dc44710f 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 c9b62f26a2ca6b..e2118563c1b818 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 3f61181f28f860..5caab131cb78b6 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 4546a53020a6c6..382eda5e3a424f 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 cef67089bb4cdf..cc61ee3ef53e41 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 796a66344f01b0..6164529db2b465 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 d2f16d9104cf3a..a5cf3b4eed9b62 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 c386c3b77b47ea..5975ecd8271fc6 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 a7e9027e821b00..717700888fe483 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 07d2a29ad29e26..7cfcdeb49bb03b 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 5858afc3246bf0..c6e8ec7059fbc3 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 bc330e7b024276..a8fc9d5846caa1 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 da733833a5025d..367682bbb7739a 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 b798a80533ab1a..2346bd0d8644cc 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 ae81554a166608..1d7b2442cba173 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 1e2398a8ea0e41..df202638bc1f7b 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 61a5c61511e2ea..501306d0d00ad9 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 c4feef388bd3a2..310d3f655b639c 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 e1ce9accb9fbff..45567c81d85fff 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 00000000000000..ac7b5314beae70 --- /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 0f48847a4c438b..f755b886c9eb82 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 f664c309595d6e..d277073d6ab0ed 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 27fd2500d5bc0f..8285f4545aff17 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 85a8808096db96..159401ee9c577b 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 76ef1fa69747f6..955bc7b1cf0c42 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 b12ed8ef58ff60..7e5d9cc36ea52c 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 8f025f25711620..f852fcb5fb764f 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 33abeee94dda7b..6e0b3731df7045 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 fea4048e4ef3cd..ab1edfe599ffd9 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 400ff9f35c8e94..6966be3fb0b7df 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 ca64c4c695088d..38f5118a2dc0ac 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 a3114fbd68ace9..8423e8ff99ac32 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 a4db03a3608980..ec7b9872f210f8 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 db3c6466e8cde2..1d4a163a9f8bf3 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 c33b4e205c0b17..d6929127836ff9 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 ac294085f09e84..92cbecec4f401f 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 fac0b96c3e44e6..be933d41dffa02 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 bad1c3369226c4..9980a4e6ff8fdb 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 fbce82e224f0a4..eb9105173b6998 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 2409a909fa5ac3..e480f4d031c79d 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 00000000000000..8c78cdb0e87d5f --- /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 + (). 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 8516aabd74339f..a55127d71da348 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 5eec1170fb0079..ebc37fb90d13bf 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 ff4540746592ae..95dd64f635eea6 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 89ddd6dd78c8f9..628d6fd076636d 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 ded46e1b06dce7..a7dd171c0947b7 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 096fb45278e77f..f1e39c92bf6c65 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 603effe4592e1f..7a15cdce707579 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 bdfd6383ed3567..6b897405dfd70c 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 4824988bbbc910..28d673c5b7bbcd 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 a4c600538894b7..03c20803e6b947 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 0ea41175c6c825..857799c03dd7a2 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 0bcc256bd38ff8..f0c3b42f1c85f1 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 157c0f0d1c70e1..f95a51ac3d3972 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 e06c44e2ace496..63ca1a3691e1ee 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 03906a4d14925f..435acef76ce519 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 1e45e86015363c..8dd2294e8184d4 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 83045c8164676c..422156ccb2e09a 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 00000000000000..239fde3bd397ce --- /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 14f97e5aeaac70..3b81c3cdc7b86b 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 6dbcbc60cf8bb3..4f660abb02c5f2 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 79f7bee3610390..c4ca7bbfcd9f71 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 dd132968c1ab4d..8313ed99b37ff4 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 f0a9746bc72f6d..e6fe87390dc26e 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 70d3c8adc89a3c..b989c17a9f81b8 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 a70068b2f3d8c6..3666e21891ece6 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 4a36d4ce113448..5bbad8485e760f 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 23db2f98c1a514..087de49d926ef8 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 8ac8114ba6a88c..42f4e0ea427aa2 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 1009261d8ce7d9..352064eb784a87 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 c7e94bb9af06da..ac399ca1e4713e 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 23a01172eb0065..d00dfb9d66a437 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 1a753e92853b01..5467bc8701a8e1 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 c688656ad03620..c9a7978dd28100 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 20ace982f7755c..d12dc088cf45ed 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 8f4d0e7e444fb5..8f6be657091da9 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 425c739112781e..c80fffb70863d6 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 bab7446c766bc7..1eafed4f136ba7 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 5841bc5e46143a..566669b469d76d 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 d17b8edc7477a6..f74474f44401b3 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 f04955e0c0b7e6..fe7f930cab630b 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 c5e6108253439c..31f81e18964b12 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 4bc422d960cefa..32d433d942d9b0 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 6099cff50c7db3..7a1d66c6121b02 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 9e44e7d04ae986..af382d43234ca0 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 d2de5443815614..8fcfa4dfa7a701 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 2fb79bce33298f..c56459871e19b8 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 cfdf5f47cc2a66..4dca7fd96c36a5 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 d646aa2f5761d3..5bb4ffe19da6fb 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 45407eb75ae902..2b64e6e85b1f13 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 c3cd1d416daf10..16816d766f66b7 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 4e71673b051285..76de9e965df287 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 1e91e9ecb03f0e..23d4333e68e2e1 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 e6c2cb2b65b277..b34eab29aac028 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 48150288b8933d..e41ec4e9dfd3d0 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 c862c0b74dbd63..30f2f17795fbeb 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 b6af1bebb652bd..569468a4b0b43a 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 93aedbad8f5705..0e2778904d45d0 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 524f21bd63874b..7daba35a5cbb47 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 4b3d646833192c..9960ba3b24c41f 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 f1b23120c3731c..3f6cd7391df172 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 8c7015b84464a4..9f989aca41cd1f 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 5c78fcd8358243..7a7a3864f9f14f 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 5a2e92028e3ebc..a6930c886134dd 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 edd2e01091e8c2..85d7aff1f78b78 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 51a7793a1b342a..f85215b4c79aa9 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 188e324ae46256..9fb917dece1b12 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 3fd34dff09e433..db589f34335ce1 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 ba2f720d91cf61..518ea8392b5774 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 b2e66ec2aebcf4..dfeed53f3b378e 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 92e3c072bb9b80..3fae5b8896208a 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 4be0874887a8d0..99c2366a0377ed 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 d61d3979d157fa..bb57f5be6aba83 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 ed1b5341819a84..7aec827a94f122 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 2e0345e4891948..074ac32b4a5585 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 7c791bf1b5db54..e798ce3b2b66b6 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 f0b9ea8882172e..8ad707ebe368f5 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 bf2a67120a07ba..150e26a6496be0 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 2948c5e1f24198..a3ce0ada52cdaa 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 6a03accb0d17c2..58fae609b76cca 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 b5434cfa37b655..f30fe867777458 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 545001ea96da06..9a246b6ec6a3a9 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 64a9c094626f88..082450f3c9e538 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 86aeb872a928c8..bb16d16b85b129 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 09a3a103566d78..5737dac4e00dac 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 28eb6fe05f63c0..a9a6e5b05899d3 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 893d6c28b265eb..3138155652f66d 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 b16b9089bef11f..1fec40d8ab73b7 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 944d12211ff647..c1ece1ae786473 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 39b8379a45a501..d1dab128f04a46 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 11d4708e17ef0a..74f31d835c3a2a 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 e7d36ca104c4c7..980cb7118eb652 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 bdc1f96110fb45..685ab3f3993557 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 aa1aea798887eb..b6fe0390d79008 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 00000000000000..44ff1bb9982993 --- /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 9c64c3130cfe5d..a22516c3b12f62 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 a97657a321fe86..3d50ab69ba3b09 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 e95677e309d607..3d5773182b04bf 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 c086bcc21e1cb0..27102cdc092b2a 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 0f5aa30a7f3f83..93a4d3a3d05bdd 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 04017a2835a3ce..ad2bec47239335 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 3072b692e56b6a..f6655e079ea717 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 a4b092cdf9cbf4..9efe984cfb780c 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 27cb884cc0d33f..9cb19fc61483cf 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 3c931a8239a848..a4cc9c8297b388 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 3aba76da0895bd..18bd42a6d440a9 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 5602ed82aa10b0..9dcf4e3b4c9b4e 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 0bd9a53583970c..24845b619afc06 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 bbc9fff7000e54..5566dbaf222ce6 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 c9e235eb4dcf0a..96565f2e33a4b6 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 90a63abb63170b..8709192c266922 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 713c688d18cd1c..0a502898804931 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 18e6d6ac46ac42..65ef468cb2d7ab 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 7b29d95d0fb7a3..9ef1e36324eb2d 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 ac7209584ba049..fe3009ec5e6448 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 01da707587f2e4..03481f2bd0ad51 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 43d35b3845b46a..7854e9a90cf52f 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 5cdaa6a99430cc..3cc6d0ecc884f0 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 327f62a42ea766..da3363959306e1 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 46a8f63ad000cd..dc7b3e2380d3a0 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 b052d0e2dc7a78..4ab3444a07606e 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 9f396884521579..9e65e185270fa3 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 6204c12b686f29..2c6bed64576bc3 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 e44000f09e38d6..39d79da7326703 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 869d0f98486f96..3156c6ad247a7d 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 125dafba92f0de..671c68f93728d8 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 51ff21edf0d933..1c24477f549ead 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 b2f85fbc0c74f2..d429d3d37bb986 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 62d8a896cd7c74..3cfefe918250c4 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 74936d9ab5a0a6..0000d78ac34a4d 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 3a79f63b99feee..dd339468929c1a 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 dde99a8f618eeb..22091935c7cd04 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 3a4364713d0606..7b5b9083c90a48 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 ca13cefcbfca3b..a439fe10653d30 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 7402c6808fc250..96402ef9a7036a 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 8307479d69d31a..92e9a8980cfaab 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 68728af1d3adf2..7c262ea9eb8c39 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 855612ecc9ab83..5ff51298d1f709 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 6cce7f23134a71..d4144663fb4bb0 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 60cc131b92cec1..9ac4d6fd8b8ad9 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 c9079b02a4a68c..79e82e106fecfe 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 3ac439d4207bab..1f603de052fbb8 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 79b26170f133a6..a2d60d3cedcf59 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 dac799bacf2cfd..8a2907206754e0 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 5915714aff0413..d8738700faaf25 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 657d9a4d49f566..21bfda18c262aa 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 0c73a818132577..cf8063a2423eb8 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 9c73c7fa48e7b7..c1aebd8afb1784 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 9a007a055fb28a..c0b6fe8a04fc48 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 5c0d929a7f8163..8e4518e837e3e9 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 21ec26809f5c38..61b80a6a7fcfec 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 b87ca84a9d7d12..561d5ea54761cd 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 cc887295f08b27..ad065c45374b10 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 67f07d652dc2fc..c25cf879ec2d05 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 ecb836d2bb666f..790f13ec54257d 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 b91e7d0b8d3c0e..48fae13e222df0 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 5c5f4a75fb76d5..fd0574863f1f4b 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 00000000000000..b1b3678954085a --- /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 a2689071ebba13..d325a1add6f3ba 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 ac8864a19c3d79..75ead306ea1f9d 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 e20962e5930ff1..7be200eaeec618 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 a6718ceec1ce27..3586585e516b06 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 186701a6f085ac..ffe7569bfdbd28 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 1f613f021ac739..31e9bf049919c1 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 954094aeca6e63..c9c1cca547b182 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 a52dfa812fa89f..e31323deda5e22 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 f43e4c2660faf2..7f1cf3a5fa3244 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 85d4797c3a266d..615fba4dd2f4ca 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 9516bd7f126a49..c78dc78470ad07 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 4f402c206636c1..58f5b7fc0532c7 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 81e0152f89bdf7..6e7953fb88d944 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 9f39117c087821..c9e45bb0cf687a 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 f613964731fd31..0a1afe0dc2984a 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 8200e7c0d62bdc..93a6e5b93d23dd 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 9e81019131d298..4153891ce4d087 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 2f6f7156d69492..ffc86a9be75cad 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 d1a486174641af..20c35487d6b2e6 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 bde5c06bef5850..f56d39a4537021 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 e3fe8eeb7eeee9..54014bac7a6781 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 7a0aadaed50965..57e5a06145277f 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 ce963aa539325e..d304465f2f6ae2 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 71c0da0a61bfdb..cb18bcb178375d 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 726445818c1bae..5bcf3a7d14cec3 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 da64fb09535cc8..128bd3219c47a2 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 6cc95a075d8364..22b02013056b76 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 a747cab40fe4d7..b214c37f007f56 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 1e05bf47a54989..eb6c091d62ce6d 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 2a6d23fc12c779..9cff33ad4e6d23 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 4a83437510d5c0..74c48ee274fa76 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 88330864e76803..9966baaf3eec55 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 e034e646c57ee9..8bd719fa2b8022 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 a8b419a351505c..97a95e286d3b82 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 259c32003b9f16..257fb41bb7df3f 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 4ff2c07428a803..d4207c9e1aa074 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 3324d1b2e0f4ce..b0272f450e4a2a 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 da38dfed21b413..9f8fc014c5f88f 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 7452077ba82f4a..ea8d5febbdadff 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 2ea88f61d0f89b..e2dc348b458769 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 1002268151896c..dfeffebdd952c2 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 e381c8773dc321..d6fc8d50c56630 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 8af75e17e41365..643f2b00c2104c 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 95e0cbd21c22d1..f7b0a0c38e3e75 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 e54167e7d60efd..8801ddadc3ef53 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 028903fd0c251f..a66b9a2c55fda8 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 4ca63c8d50684d..29f21c022cc990 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 ee8057d6874b34..0f92da22e289cf 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 3f5f11b161aa76..de6840e4a4d509 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 2fd5cde5e956cc..5cfc85af6cc565 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 dba6d2beabbd6d..cb89fe650b86bf 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 9f5a60263d182c..3cf67aea1be812 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 b132cfee0f1611..6b36e21629cf9f 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 ecc5b356f8f945..7a9a5589531002 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 e3e60fa1dfd4aa..b26eeb2e580c49 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 d7601ea0a0302b..0ac66b8e79a6c1 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 2f9f27c8ded0b6..23b0ce72763893 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 800ecaf9a5b395..e7df13df3b210b 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 60006c590a02ff..39f6181ad5177e 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 6e4d00a80e9490..fe127d79a79c15 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 47a37a38ef8599..ac91c21088f90f 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 1d6ad085206d1f..21a594f5d80098 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 4f8ec037d0d2e6..1eb77a26957f0a 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 2533c6c6f81e1a..97819fcb6096a9 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 3047b0916d8a40..5ffd0424b211c2 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 36a96efafd8ab2..726512f37ee4f7 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 0709499e83d327..1436a1543a5d67 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 4887837dbdd639..f98a52dea98530 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 952b58337a561c..2d3c0d57c7ed44 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 38ae8c03eba9c4..16da516e32d068 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 ec7f355a92e004..858ef588e51bb5 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 2c19b6b76bcd3a..9977170c76e679 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 1c674e39de5a4e..e4c2d931a521c2 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 bef15e27e149d0..b3bc4308d68310 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 08e5dd22e4f02d..0a605579aaacaa 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 9ef0ad456fb171..9db06ce08da461 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 fc0bb71af3a616..b9363d05308dbc 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 cafeae89614e39..62202903af1a55 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 7d3e5d852631fa..755ff749c69849 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 e150766a921dec..e0fa34532a420b 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 78f29762a9ee0d..0093ebf261d66f 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 78c7afeb11b87a..ed00c72206705e 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 25c4232c2beba6..e6488a566d15e6 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 a1361283d1a7e9..abd18dcc20214a 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 cbaafd963bbb4e..f90efdeea60f96 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 6a1ebaa35f5607..22feaf3df6f757 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 6d3f39a792375b..725c0e21a19e07 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 7b17cf605c4ddb..2697b1eb836ab5 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 ee2ae5752b582d..fd8f9095f0cb51 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 045f47f7f5d4fd..17abea1f72de09 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 fc00f5b69d04f5..0fc064e6a4f74c 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 b04915a5a2d87d..7277c6a42daaf7 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 34c66ac1f80a3e..b22b63182d8eb3 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 cc397330a3f8e1..7e0203978201a8 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 6a72cd526ae15b..4ef0c7327b42d4 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 5e3b183a8dc495..ea57708e3f1075 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 ae67f10b813fbf..2d042d4e43c85b 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 00000000000000..25113da7b65aa9 --- /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 d9370a0b79b499..568202242fdc86 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 cff157fee17a2d..024091b3a1bd35 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 ed98a3f759b591..f7bd808a4b8991 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 f322a9ab4cd8aa..77670f9a55c63d 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 932e614ba5fe22..8f0bbe58bb0d0f 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 53dd72495441ae..c7bade880eb945 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 68f9e89684aefd..909a7fd95d6a7e 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 01847c815886ce..208dbf496237fb 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 3e313013b17d7f..9018b79f2c8f14 100644 --- a/var/spack/repos/builtin/packages/r-lpsolveapi/package.py +++ b/var/spack/repos/builtin/packages/r-lpsolveapi/package.py @@ -16,6 +16,9 @@ class RLpsolveapi(RPackage): cran = "lpSolveAPI" + version( + "5.5.2.0-17.12", sha256="4f00a9d27055ddf3e2a4b0a529b720861b9f916f2ceb1fe0b71e4c52da5b70ef" + ) version( "5.5.2.0-17.9", sha256="7b52ecf3f1174f771fe24e62502be6d31acc3e48a12473e35ad0a89fc2517811" ) diff --git a/var/spack/repos/builtin/packages/r-lsei/package.py b/var/spack/repos/builtin/packages/r-lsei/package.py index cf29fe58b37c32..55332f86820da6 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 f3ea109ef55c62..a2b37be10874df 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 c25ea73c5d5419..2b09ba6336888f 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 c722a4b67cdcd6..f8f507f93f4ee0 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 989ca317de2390..d3aeb1a1d99796 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 21d255366d84d4..7fa20490d3e64d 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 3d646cd433c5c9..baf6e8c6a16971 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 f19a3424c1f2e9..4ec8d101b21783 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 3c9963ffcdf029..08b9ea6351b409 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 b6b6e19dc51794..13840200da6784 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 8ca517229139e6..00278c11b817e3 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 aa7f0dc717b86c..47f23046d54658 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 2453101e8ecc16..6f3ed794bbd62b 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 035d1ed9007e9a..4120bc3c4d1d11 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 1483e712473cd4..f0b0666a19effa 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 16dbc8fe2f7cd9..a2d8cda3aa2754 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 ead6d5734c31cb..d5839d1ec77a7c 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 aeb8639d0862ff..5a90d3d3337f3f 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 76ad0b7e0e52ee..4eb1b82d5c4fba 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 3e32f58cefdc73..0b65a3ddbd6c91 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 7519f5075145a7..83cd8b62c2138e 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 80a0d6ac68dc0b..4e3e289afdfbdf 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 1f9d061f04060d..541e0636bd3294 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 ea00d0f377f547..555d28efb4f2f8 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 983cf8f3557f92..b79ef63ca60b04 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 e1abbbc6315efd..4177e53fb75d9d 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 45e0017a92fe46..c2aaec6da70b17 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 9a1facc53419c3..aa15244e8da6c7 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 0d7716b13f57a3..df0be2ae80919e 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 514c44074d9418..4e144ec6e71eb2 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 595c008a667327..1a43e60491bdcd 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 a0e59e0b84eee7..92416dc5bfd334 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 d61198a6c3e1b1..8fe870277bf45a 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 5382fa8ac55b1f..6b43c99afc58e2 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 2ba4d9bff8f5ec..b9ac2896a1f97d 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 44337b542c5dce..a7dfbe87cb1f96 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 64a6c88194020b..b7f3b321307bb1 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 f70c74bece3ff7..c99a10467bc674 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 00c402838ed252..8927e32c22eb32 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 0b945e185af090..db8931d1769dcb 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 06d34557911f0f..5b498b1989462c 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 12e25a80e62f5f..8ccce8f80291d7 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 7cfe7a9e124b70..8c2d175f5a8f8f 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 769d7528c6b3dc..c532fa691d0fca 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 e7c550f9ca256f..bdbfd7b28eaa1c 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 6fd24c0aa9cc0a..3e709c8621b78d 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 bbb75b1dc4deea..6e95f5fa844f20 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 fd79b36bde6dc3..a709fbf6bab917 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 024e7bbe305539..5784745e4d0d5c 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 6fa806025d26d8..3f60c5577ae7fc 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 44e8c0c4280f95..fd67db64021fb2 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 57fead3897e9ed..00d927b93df30a 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 df724a5961390e..0ae7b4beecb465 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 35af382e82f65e..07d29c1cd30997 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 874a36f0639b38..0c74f80b6a8f34 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 bea112a0b85d98..9028bd9c21f7cd 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 816780deebf76a..c85b3e059f6cea 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 da58b461a9f1cf..86dd4de0c7dab7 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 f08f3a4b2c5b65..38f6eeb5bc180b 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 9d53c849160508..946812061b9981 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 744605ac88498f..db582ce04fecb5 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 52dcda0ebdde33..a19a76d26029a8 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 63b8c5fc3233c7..7dab7edbf0c014 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 3fb292aa7e1d9c..e1575760df6669 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 3899ba0a474c87..a12129ba5a0b1a 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 2f6b7907c37032..6e2747be40ceb2 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 2ba3eda569b288..7e8c0498cfe818 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 be058a55493255..eb061bf5d4ead6 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 f16120e2579819..dfcb39680d2b42 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 b079c0226ca9b2..de159d7b6492b7 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 90ab226ce4a23d..6e8cb4c2eadc4d 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 6e7cc275734d16..702e439b1bd0b8 100644 --- a/var/spack/repos/builtin/packages/r-ordinal/package.py +++ b/var/spack/repos/builtin/packages/r-ordinal/package.py @@ -25,6 +25,9 @@ class ROrdinal(RPackage): license("GPL-2.0-or-later") + version( + "2023.12-4.1", sha256="2c9dcfa438c964ff1825033d0759d25f404a2a4c5252b81e40f19cffc18e38b1" + ) version( "2022.11-16", sha256="5488ad1dfa531a09d017d68d7393d376c8bc49cceeaa6a3e5f7d57b99168d493" ) diff --git a/var/spack/repos/builtin/packages/r-osqp/package.py b/var/spack/repos/builtin/packages/r-osqp/package.py index a02f97fe441a75..22077432ac18db 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 f62071662ee0ed..55110d1834984e 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 48507c3653e045..0f8149cfac109b 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 b16f865fbb660a..4883fa47bb7a6a 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 c50d192d007429..a44741afc873fa 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 ad333a9de4556a..ca52c9bb829df0 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 cde9476185829c..a4fd0660058570 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 4c0783c34c9bbd..adb388f56785ea 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 fa35055cee0970..aa345616874bed 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 96b701585f6847..f025aa8e9f73df 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 070035aca81824..221fc29544b036 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 c3ee4bbac8befb..95da65e1e9c71b 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 bd56dd5148dfcf..5a6594a8d09e18 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 86f2a3f59838f7..9dba98bf8c20c6 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 413fea97a9f355..fc8241adb5d9fa 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 536c2e65da8a9e..7a362a7396bf77 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 c60f86f2bc7398..955281e8108535 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 28e711039470c9..3b23775f414c32 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 c417b5662c3db4..08a9af61f886e0 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 a9fcf1aa80aded..ff1d6269cefabc 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 3bca7876a36eb7..f8d68c8e47df70 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 6ef5f16f86cbe7..877479fdf8108d 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 894bf1daae403f..fbe68ae74b8380 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 0e5644de7074b3..5ab8c73e0dd08c 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 2c0808598ccce2..c2f91b8d1d0764 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 25158831a2b0b4..b8a1808f4d14be 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 9289da8fb73d33..35498c04a8df18 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 4f7db9e75be88d..33d28cf77c928d 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 73ba6e593b87db..fc85a9557a83dc 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 14cb41076c0d5e..017b64e16034e3 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 0ad45d99b548db..3a6b717b956ef6 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 47efa743ec4041..af688596a32530 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 00000000000000..612dbecdbce823 --- /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 0ba526522a76cd..31a6ed7e753661 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 9b266588fdf4d4..ba3ba33ad13b84 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 de5de683ee83b4..2f0cb89e819b98 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 9a74b4ceb74b53..bbeecbe9f3cb26 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 b5cdc6df154562..5990dc20614e6a 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 e0cd4ca9f3acf7..34387c943f6ca0 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 047b2bffa94bc5..e5e76090bf7a12 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 41950df3dc5469..3780eab83a2ee6 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 ed627a8781b775..f773e956218cbb 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 55c5ff6f81d59f..93eaf4a57e7400 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 56c8ad12266c2f..cb713e912457d3 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 ea5c5ac0e4a80b..09945188155804 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 90c15fa3cb6895..c7afc8c5c63bd2 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 4d1c9fdc2c7f1f..859ad7c7999354 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 4c664b9d152282..c73409dcbce4c7 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 56d94d7ba93d81..df23c06398adac 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 2d4858d429a0b6..59d54e213252c5 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 080ff674cad4ba..11c9fb8484da6d 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 b3b317d3f601c9..8c0503a4eb2d5e 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 eb2a3ee026af54..a89e84c78f561e 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 cf92432de3a65a..9c1e21cdf8c5d0 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 617aa47649a6d4..86754a10e86ce5 100644 --- a/var/spack/repos/builtin/packages/r-prodlim/package.py +++ b/var/spack/repos/builtin/packages/r-prodlim/package.py @@ -17,6 +17,9 @@ class RProdlim(RPackage): license("GPL-2.0-or-later") + version( + "2024.06.25", sha256="46961f654171aa7ef0ff94b23508ed59f6a438c3a3ba0d338cc3730224406764" + ) version( "2023.03.31", sha256="5510454f8511ca956666f27dfb77d875c56b9166188c33f22cd22b7615797800" ) diff --git a/var/spack/repos/builtin/packages/r-profvis/package.py b/var/spack/repos/builtin/packages/r-profvis/package.py index 709aca7e825642..787041fb2eb3d1 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 d3f41e6548513e..dbc314340b09ce 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 457a09c4b0304a..d07c5124e952d9 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 78463c53d97f0b..34d502b5e2ad8a 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 @@ 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 d0d6d029850a53..db7522b89d4ec2 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 35c3befa538c65..0446671c767202 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 32016c25724495..91cf59cbee48bd 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 52f3d7809fbbc7..6be53d753c8aa4 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 80240fa83d64f0..7fa806f0e0d27e 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 89612d8233e912..c78023b660a9d8 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 1ac75ed63a739c..89a7f6e1faf53e 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 03e2140fe43033..c77803682c28be 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 c474110e1e4fbe..75f9ce050abf80 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 7d753a046706f1..6136284070ae55 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 b0b1acc7091c01..002bc75ebdd2c1 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 1637124429addd..bf4658c6a71d6d 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 a4c64566a1692d..fc552f62b09f46 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 9497f5aa513466..ba93459f123151 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 91319e9e8f492d..d21581112927e6 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 2368def60f5c28..1771e645f4ace3 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 9bff357602bb1e..939fa66209312b 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 00000000000000..10b191fc672024 --- /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 7cb0c274698a23..c47c367c2a9f65 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 f15782b3bc3523..28ffc400bffa67 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 e673eb37572acc..91132f04dbae20 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 0d0abcb60c0d6e..3bff5fdae80896 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 c5c88b9ca79239..9cdd8644d2331a 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 5349bc60c23864..2c8eff647bd659 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 a952be3532d2af..8672102bbfb12d 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 b09253a0a3847e..f940d9e2cff4a7 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 8b4e48ed9b569c..d25c382dc6fd2a 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 da734837889fe2..2e829111d035f4 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 1059e36a53431b..d57d33f6326b07 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 4807eb795d5ead..09aaa528737476 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 f4c84e16ddf475..382b8aced4e27a 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 ad637c88b99f44..7f455481300ea2 100644 --- a/var/spack/repos/builtin/packages/r-rcpp/package.py +++ b/var/spack/repos/builtin/packages/r-rcpp/package.py @@ -23,6 +23,7 @@ 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") @@ -47,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 3277a206c08a3b..efe0cbb9784c29 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 fd7f543b708131..16bd7ee5a93fa0 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 817b604c3a8b34..274f2fe7dc0004 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 6858c016212411..da5445c13f76c2 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 550a3ba3c2134f..475e7862c39520 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 8135cc8a8232de..ec3c7e4914662e 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 25680af5618d8d..351c87ca7f49bd 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 2b0899a537b0d4..c58708e5b4ee93 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 a835b67d9a2372..32837f6befa080 100644 --- a/var/spack/repos/builtin/packages/r-rcppensmallen/package.py +++ b/var/spack/repos/builtin/packages/r-rcppensmallen/package.py @@ -11,10 +11,14 @@ 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 27e486c3104edd..23487f0d088cac 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 0400df4dc15637..15af171e213a0c 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 7f986444e6c67a..2bf3bc249e0b21 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 c127625cc326ed..86f026cdaf4642 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 115f7978c43a90..2c177e8a682b9a 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 a963f612903449..d9fa889e2e03d2 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 78954874e32375..ccb7b5be6eb94a 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 5b10ed4f15aafe..9b1f89a11d0821 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 187bc3809849a5..c96541652a5fc4 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 cb3ecb5a5f273f..18d017edcd68e8 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 2621ce060f23ff..c85022427a80e2 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 8867658ab7031a..5060121560c790 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 499c560a274af3..b80809a2f5fde8 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 54933633fc3819..1a188bd4264b46 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 6db1982ab0fded..4b9b40c792cfaf 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 2f60c028645d17..fe9e81566aaa7d 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 7146c4da14d9e4..a7ad7aaf29b47b 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 3043c5e95aba3f..5b983f8b349cae 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 94b3089e4bb62b..42c219d4090eb6 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 867c8417847479..edd15c5a6f7877 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 713f78c9d2ad52..eff1aeeafee538 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 d325d585dcb3f3..499f102c541c2d 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 120cce8a6e3de4..9d6f53afffaad9 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 d6ddfe5967c5e0..63d534f379d296 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 8dcaeff9c0ad5e..20d67a8e0c8320 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 4194c69d7f7f07..a472fbd9eaa7ce 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 172196c919519a..dc489925fec2ef 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 fae7ad271ea3be..2122332ecd7e26 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 e9c146ced9005f..7498cd8798f262 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 67f0b5e874b109..37a0a0d4b58b9d 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 f2931bef8119a1..d3e59136454c62 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 eb0fb02104432b..a5266eb9121db1 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 a312524388e8ea..43f1f23795ed0e 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 560cf9dba4a4f5..06153a6dcc9528 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 05433c61ef7617..382396126ad306 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 8f2896c7b6acf8..96726aade7fd3b 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 b2f222bdd11828..693d8ea3861459 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 f120492fe933df..473ae6b88fff96 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 3797aa89837798..4d0883a909269f 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 0a135ed48789f1..662ae85fd4d5c8 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 d45011509d2b76..c0c3ea6ae52b00 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 63495d35d3cda7..86833a53685e66 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 48a47e14479eee..6f630c0707ae4a 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 60b2088e53da6c..5623401066f77c 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 00000000000000..672f6b7586c968 --- /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 740d434eaff766..231701e2bb21eb 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 2b4e444e0ef688..767288056bc7b5 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 7388730fc157d1..04b423d5abb74d 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 88b9a301751980..2a706a42e12868 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 a14c2404c25241..289f9dd9a993f8 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 9405ff6fbc8877..bff73411916c3a 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 2e3639efdd42fc..fba82187857459 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 6f9cadba5d3e1f..82256402c2c9f7 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 7fef555fec1cd3..fde4673d6c8dfd 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 5e059a6b534980..b8551eab7c92bb 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 a5bf5c16e107b1..37ad526b3dbe75 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 a05863c09574b0..37db5ba90f8c63 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 35d02e07bde02d..a56f672ff2f12a 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 e16a948741e307..d0fdeba36c27d8 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 a7ccc3e09485cd..4abc733ae3b72b 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 d85b123da8d838..0aef4000837d5c 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 60df397a81d3f0..97e60dac2d2185 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 7ed71d89b96617..3a8b649d9b4dc9 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 24fd3ebd141ac9..36bd41d99cfd5b 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 0e829406e50370..c7adf3b7e10497 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 74715c6c5d8a18..74cd1832a1e2d2 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 0d6bea6d61b240..3d081b81fcdd29 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 85db94fb3ef34a..0759a2f0a34314 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 a0822cb4e6725c..71895d0cf2bf46 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 b9de4ebda6b3aa..a0e839f3c535b4 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 60489b90021b31..6ce8eae4892fcd 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")) diff --git a/var/spack/repos/builtin/packages/r-rsconnect/package.py b/var/spack/repos/builtin/packages/r-rsconnect/package.py index 2e5b56d586480f..bb7db9df32d842 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 75c5dd094b63ff..a0323c1d768351 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 93fe03871aa62b..68b56dff7d8747 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 f81bdf06ac0704..2fe5dcc456480e 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 00da44c08d40ce..713ff0a2252655 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 f2acce430cbe20..ab14cf382e075d 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 f581b5dd5c3363..3f56a5135e58e1 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 2b6ba1166d70c6..6f867a3e010afa 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 3acc58d1c71446..7e2d1b42711a63 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 3949660dff7d42..48d9e44a322350 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 9c88a53ce58972..8de30e09b9e7ec 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 c9343dbf9f0668..0bb9196c2a5f2b 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 8abccd4aae4ebf..fc18dfdc1c7ebe 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 0e3cb2b544c956..a1104d8d0feb26 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 78f4f5e32c0635..c12caca3bd72b9 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 4d32899d5de6a2..5fc9d735d7f169 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 bf4d851e0854de..5555d6062d6f21 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 1527b55ca7dd3f..7a8760619591f6 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 fe5d05918a5bce..fbbcf2b6c450d8 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 808fae8fb70309..a4729a707dbb1a 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 4ac8e74774c482..e6a3fbd54743a2 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 c5bb5a77ba2f5e..e3ece86c2a4498 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 d431c428f886a4..02ca38d3bb6f2c 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 84f03f3dcf8f43..10c0964bdd2a68 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 6fdd0ba32c9a13..106a5a1eced932 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 f9f96803ee60b3..a7de5b624cf226 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 494607b9525140..84ce4cb73beb74 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 c6f31f98e0fd17..3055748a612847 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 345c4d9a2aa82d..5444c52fc84bf4 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 42e8ac5e8fa5f0..48f4b0e58f942a 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 71a2c7cf9910ad..b546891122c302 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 dd12e8fa2aac44..7bf921e774099e 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 9766f0b22b2441..cf8467a1a0f6af 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 308610786d0004..77484ffb9274e1 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 f8483751fccf5c..0af2d89f458776 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 74d32ae36f8f4c..8240e6ccaaa7c1 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 4328390a65b17d..d122e494ef8ea4 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 46d0172e3fbb24..12300042f5f804 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 e024fa2f8be048..6c128a2ad1a8ec 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 f7f9eefa0a5bfc..7d5a0ba9979ff0 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 338cebd9601a7f..cb9f17c6b992e7 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 b969837c621cae..1cc0eb3e3dab59 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 da27db85af7190..c23df0d017b068 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 0188ca933440a3..26001125b652f9 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 d56ef2989372a8..005c2ffc062a8e 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 09de1b2c2a9797..6d40cc9fd73056 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 60879f612c79d4..c52d11a2db3a33 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 6a3144ec782348..fb1262b617ccba 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 fc895fbf5b0d25..4d06c77185d5c4 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 0f5473d70d8d88..fb3b1b77c63138 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 5ce53283911787..18d57ae809f69f 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 aed788cd8ed5dc..b5ac2a05b6789b 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 4c1515240d5f7b..e1f509b344c1d8 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 f356242224e5eb..09aa05e2ca1fd1 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 b0c228fd6dc977..54483d6c2afb67 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 e3c0310fcbff62..65dc4624032460 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 4aacc1dd26cb16..d6b2158fa3dcf3 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 809ad5f86d3453..a5427ce5a65e52 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 f7db62f71dfb7c..dd2f112cb063f9 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 845a6147f30f12..6612bb66bb4474 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 0c9254fad8a8df..17b270cc03f44e 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 4b513cd2f41120..c863828a2d7d9c 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 401e685f9c5d54..5a2c17f3353288 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 40b51335c87910..f71a8a26243ba6 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 8e996635505157..3810d83924b77b 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 7f187dbf57c166..89f37bc51c79c2 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 bcb503e91d9412..f043688b31ac7b 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 373c33f4255dfe..292ba6b28eac07 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 8070c59daf6bad..94f62c92590b6a 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 cae0f1106f143f..995ad70fd09791 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 1a84bfd784dc39..a29c32b000c316 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 2a8cf215742877..f967f4d0239093 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 932c51884ffa1e..e2080bc2062f43 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 00000000000000..6cc988eb3022a7 --- /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 2a5490c177afb9..ab4ddd6c1a397b 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 766b10079e68ea..c38424cf60641f 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 7a4a7e225ebbe7..028bda6521e16e 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 63f980382cd8bf..2383c056e1e893 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 9ec7b5a82472ae..e967e7ffc97748 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 2dbe2fb03352e7..a964aa09cabe45 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 00000000000000..bf1ae174c52cc3 --- /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) + 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 747a119144c5e5..1a8e0c40df11c3 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 4ce431492efe98..f6f63c610a3290 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 20f393bbe3ffde..94552ddf7d0648 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 3f5ba597577145..50f955cbfa0663 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 f02f6d0cb4cebb..e71cf28c478bc2 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 14c846404ed634..729c0b09f97f3b 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 abc075ec2a75f1..805cf78970eb75 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 90fcda65fb417d..97ca2ce28a6811 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 c8828973b8765b..f5710547b6e5da 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 0485cece4f508b..2c4f6fd16c6928 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 a64f522bccc1a9..4fc81952dacdee 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 9199d1e852debe..25f6eda8ca7282 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 04368370a6d0dd..232c1a3b014a4e 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 9cc9e7b6c65a54..c9c51f056cd941 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 79b6b0e0293b55..052c27d368fe42 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 5d56201407ebda..e8a9c700ea609a 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 2003f6a798c21f..babdf515f2b58c 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 117130dc41fcf5..bee43018e268b9 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 fffb2dcdc7a805..4d4f38f6390590 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 964e8746050f48..28e5169388cdd5 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 72d8ccbcc41aed..45c58294c5047d 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 1e962ddcdbfa52..0c1c67061f70ec 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 d71f827e72ae34..7f4abc51edbd3e 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 3d25497a42a403..ee8387ad3125e1 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 756b98bad21d8d..dcf74f0b19e7a5 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 877fe54114bf6a..1c75b421d14a4e 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 2e73e8248c994a..cc32e0a644ef33 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 c899a4a4cff30c..0f650954a41e26 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 c01e9dfc96a4ae..a2fe8bd4433c83 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 726315142308af..ad06c0a532a4c9 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 19b3865c0dd573..855763530f7882 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 0b4496c6edda6c..4331c3fa9056c9 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 1a690a07a22aa3..3e9d7eb748e170 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 91c1235e7bc1b8..e7fcba5f2c31f1 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 53ec7b519e7722..9636cedcd1b67c 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 b99b115da6047f..d133e132af148f 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 cb556f39c81f92..909fe240eaf374 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 27425f56bdb623..97ffb606e87390 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 60d51b27944ea9..c299e1ba86bff2 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 754386ac724945..71efa6f83af93e 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 930f366c341531..832df344c2f882 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 69cf0c88fea486..6beba71357147b 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 e20dcf6e0d87dd..98590e0259db90 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 2ffcf43b654239..44d17bb4ad3614 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 55c8888de3986d..bf8fa57c602a31 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 74b7203b52c63d..9517b98fcd209e 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 254f43f96f19b3..ec6b9f42303346 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 8f606a1a1e9e43..596b3a4acd95d6 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 ba6dc6e92af8bc..76ec1fef1b1727 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 22e2884e9ba1c3..be6878d2e74473 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 01ebe5a976f5de..83719b38cac0ea 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 2dcbdb474b29a5..178ceca85b7ac8 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 013d8555d7f4a7..9dde5976a7d7df 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 497cfe55a70646..70eafc1274bc59 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 ac87cb8e0464e9..09a2d22c500403 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 a8b3bcc731ec23..deecee84276ca7 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 c5e5d78dbdb689..c18015609e45cc 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 423c952e82b8e6..0d4dbf747dfa27 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 6df0be0c65a37f..6b84d24c8d8119 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 14933c740c03c0..47bb1bb196f176 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 f8320ac87e6a56..a818ee8b6b5117 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 49e8bf5e37c670..4e6a1e96613d21 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 5821e4b266fc5b..9fa33c733c0f49 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 1a51917d721f39..74191bc257e5d9 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 8cf9bf66acbe59..59eab53e5da084 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 aa0b4a3273a223..3151ccbb1ec14a 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 8807a1a30115ca..4de67f1f7c012c 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 4b6a08da391eb3..d9b31c46c7cf82 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 9843483ddf7515..99af883c81db73 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 f89be049975787..d814c3c5f82273 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 69b70bcd053bea..77ba7a5e26d182 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 044732bf6b8417..9f63294f240824 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 b11908f1052e60..55ffd8739e1aa8 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 b678ee0b112e91..b0ec21dda4a1ec 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 4b3497b89d7649..d445018ee36207 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 00000000000000..84f8d76b47700a --- /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 ef07ef21b40d83..a945fa30b920e1 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 309e099ede1f50..dc1264e2e193e4 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 57f44f4912a49b..84cc89d0684349 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 9abb3f87a86dd4..317c910a4d8461 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 a91a83c1bd823e..841cea86d5ac3f 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 7c69fe12e6ec30..a66775fda7d58a 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 33165efa43f8e6..306c5aa0c3643c 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 1d58c27b9bcbb2..60e7d84e370f59 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 e2086426414906..577246068b259c 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 af45b05ae06b5d..468a19f8f9fa72 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 55a3b400cc03ce..47bd682206394a 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 bee3635d39d8d5..6fda7d1e8c3886 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 f8cb214c859267..d9ada94424604a 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 30137e8782079b..a5de07b5736869 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 110f4a120ed891..67ce6f10be70f0 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 8f17fba4579a3d..4d0dfe08deafaa 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 ed618d261f4e95..c658f0baec65d7 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 907daa0f33c38f..50e4a5b1b9cd51 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 bc411863728ee3..478d4c5d8bdd8b 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -20,8 +20,11 @@ class R(AutotoolsPackage): 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") @@ -66,6 +69,9 @@ class R(AutotoolsPackage): version("3.1.3", sha256="07e98323935baa38079204bfb9414a029704bb9c0ca5ab317020ae521a377312") version("3.1.2", sha256="bcd150afcae0e02f6efb5f35a6ab72432be82e849ec52ce0bb89d8c342a8fa7a") + depends_on("c", type="build") # generated + depends_on("fortran", type="build") # generated + 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") @@ -123,6 +129,24 @@ class R(AutotoolsPackage): 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""" @@ -273,8 +297,3 @@ def setup_dependent_package(self, module, dependent_spec): # 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/r3d/package.py b/var/spack/repos/builtin/packages/r3d/package.py index 63f13ec2387d5a..40f44e2afa61df 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 3e7396a1b3b7de..1868b90a13e7a5 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 754b272f068346..9d226f01c863c5 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 a9cfa27dea5183..bd53c4b3b444a5 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 4ba7ec80e059d2..f2a93947d26627 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 919a555a008fae..9e9a37d84a8366 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 62d97dde140e7c..0e6029e0e291ae 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 00000000000000..a62cb861c28466 --- /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 f6432b4d1e1020..39f1d108629b0e 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -26,12 +26,30 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/LLNL/RAJA.git" tags = ["radiuss", "e4s"] - maintainers("davidbeckingsale") + maintainers("davidbeckingsale", "adrienbernede") license("BSD-3-Clause") 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", @@ -141,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", @@ -163,6 +183,8 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): 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.") @@ -171,7 +193,7 @@ 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 + # 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( @@ -181,7 +203,8 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): ) depends_on("blt", type="build") - depends_on("blt@0.6.1:", type="build", when="@2024.02.0:") + 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") @@ -190,21 +213,25 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): 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@main", when="@develop") - depends_on("camp@main", when="@main") - depends_on("camp@2024.02.0:", type="build", when="@2024.02.0:") - depends_on("camp@2023.06.0", type="build", when="@2023.06.0:2023.06.1") - depends_on("camp@2022.10.1:2023.06.0", type="build", when="@2022.10.3:2022.10.5") - depends_on("camp@2022.10.0:2023.06.0", type="build", when="@2022.10.0:2022.10.2") - depends_on("camp@2022.03.2", type="build", when="@2022.03.0:2022.03.1") + 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("cmake@3.23:", when="@2022.10.0:+rocm", type="build") - depends_on("cmake@3.20:", when="@2022.10.0:", type="build") - depends_on("cmake@3.14:", when="@2022.03.0:", type="build") - depends_on("cmake@:3.20", when="@:2022.03+rocm", 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") @@ -222,6 +249,16 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): 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: @@ -252,7 +289,7 @@ def initconfig_compiler_entries(self): # 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) @@ -267,14 +304,14 @@ def initconfig_hardware_entries(self): entries.append("# Package custom hardware settings") entries.append("#------------------{0}\n".format("-" * 30)) - entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec)) + entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp"))) - if "+cuda" in spec: + 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)) hipcc_flags = [] if self.spec.satisfies("@0.14.0:"): @@ -306,35 +343,62 @@ def initconfig_package_entries(self): 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", "+shared" in spec)) + 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_DESUL_ATOMICS", "+desul" in spec)) + entries.append(cmake_cache_option("RAJA_ENABLE_OPENMP_TASK", spec.satisfies("+omptask"))) - entries.append(cmake_cache_option("RAJA_ENABLE_VECTORIZATION", "+vectorization" in spec)) + entries.append( + cmake_cache_option("RAJA_ENABLE_TARGET_OPENMP", spec.satisfies("+omptarget")) + ) - entries.append(cmake_cache_option("RAJA_ENABLE_OPENMP_TASK", "+omptask" in spec)) + 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 - if spec.satisfies("@0.14.0:"): + elif spec.satisfies("@0.14.0:"): entries.append(cmake_cache_string("BLT_CXX_STD", "c++14")) - if "+desul" in spec: - if "+cuda" in spec: + if spec.satisfies("+desul"): + if spec.satisfies("+cuda"): entries.append(cmake_cache_string("CMAKE_CUDA_STANDARD", "14")) - entries.append(cmake_cache_option("RAJA_ENABLE_RUNTIME_PLUGINS", "+plugins" in spec)) + entries.append( + 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), "+examples" in spec) + 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. @@ -343,12 +407,12 @@ def initconfig_package_entries(self): # removes -Werror from GTest flags # # if self.spec.satisfies("%clang target=ppc64le:") - # or (not self.run_tests and "+tests" not in spec): - if not self.run_tests and "+tests" not in spec: + # 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 "+run-all-tests" not in spec: + if not spec.satisfies("+run-all-tests"): if spec.satisfies("%clang@12.0.0:13.9.999"): entries.append( cmake_cache_string( @@ -384,57 +448,69 @@ def cmake_args(self): @property def build_relpath(self): """Relative path to the cmake build subdirectory.""" - return join_path("..", self.build_dirname) + return join_path("..", self.builder.build_dirname) @run_after("install") def setup_build_tests(self): """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 724a26fc27a3d6..dcb9c6ff6f7a1d 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 ae2dbac959f237..a4c70f5ed4ec12 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 efc681f98c1204..e474f882794619 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 00000000000000..4e3ef56a12514e --- /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., ). + +@@ -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: +
    +
  • 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. +- ++ +
  • 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()) 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 a6a6e5853741c2..feed5f0cfc64a9 100644 --- a/var/spack/repos/builtin/packages/range-v3/package.py +++ b/var/spack/repos/builtin/packages/range-v3/package.py @@ -41,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 899e8ed1c3a1dc..1fe8a9cf3ee0ca 100644 --- a/var/spack/repos/builtin/packages/rankstr/package.py +++ b/var/spack/repos/builtin/packages/rankstr/package.py @@ -19,12 +19,15 @@ 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") # generated + depends_on("mpi") variant("shared", default=True, description="Build with shared libraries") @@ -36,8 +39,5 @@ def cmake_args(self): 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 00000000000000..e2f1e1a07c823d --- /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 fdd0b7f903ac68..bfa9573ae705f2 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 af93102de0cddd..d792938853e757 100644 --- a/var/spack/repos/builtin/packages/raptor2/package.py +++ b/var/spack/repos/builtin/packages/raptor2/package.py @@ -17,4 +17,6 @@ class Raptor2(AutotoolsPackage): 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 c9eb493031807c..2ab4f945375e7b 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 4d3a07af0a9614..8f488e5833673a 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 bce50a0341670e..417412704e4148 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 34b2a6c08b6f54..5de9d55acf512f 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 accaf42d88a666..c952b9d71f2e2a 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 4564eaca280fa6..6f33e5f56b5667 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 ee3669cf3dde86..4691a5c496acb3 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") diff --git a/var/spack/repos/builtin/packages/ray/package.py b/var/spack/repos/builtin/packages/ray/package.py index bc75c8a9380f21..48d5962cb171c3 100644 --- a/var/spack/repos/builtin/packages/ray/package.py +++ b/var/spack/repos/builtin/packages/ray/package.py @@ -9,13 +9,15 @@ 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 00000000000000..df8d46e6158947 --- /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 index 3c1543676b3427..e7bfd6fc37914e 100644 --- a/var/spack/repos/builtin/packages/raylib/package.py +++ b/var/spack/repos/builtin/packages/raylib/package.py @@ -19,6 +19,8 @@ class Raylib(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/rccl-tests/package.py b/var/spack/repos/builtin/packages/rccl-tests/package.py index a27bebac07bffc..2dc5378ba75767 100644 --- a/var/spack/repos/builtin/packages/rccl-tests/package.py +++ b/var/spack/repos/builtin/packages/rccl-tests/package.py @@ -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/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 30c8b92a68d2e8..00000000000000 --- 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/package.py b/var/spack/repos/builtin/packages/rccl/package.py index 98075e5b276525..c8f973237950d7 100644 --- a/var/spack/repos/builtin/packages/rccl/package.py +++ b/var/spack/repos/builtin/packages/rccl/package.py @@ -16,11 +16,15 @@ class Rccl(CMakePackage): homepage = "https://github.com/ROCm/rccl" git = "https://github.com/ROCm/rccl.git" - url = "https://github.com/ROCm/rccl/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/rccl/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["librccl"] + 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") @@ -30,16 +34,14 @@ class Rccl(CMakePackage): 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") with default_args(deprecated=True): - 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.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 @@ -50,7 +52,6 @@ class Rccl(CMakePackage): sticky=True, ) - patch("0002-Fix-numactl-rocm-smi-path-issue.patch", when="@: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:") @@ -59,11 +60,6 @@ class Rccl(CMakePackage): depends_on("numactl@2:") 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", @@ -77,22 +73,18 @@ class Rccl(CMakePackage): "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-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 [ - "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", @@ -102,10 +94,10 @@ class Rccl(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.2", + "6.2.0", + "6.2.1", ]: - 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"]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") depends_on("googletest@1.11.0:", when="@5.3:") @@ -140,10 +132,7 @@ def cmake_args(self): 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 2582cf1327bad0..6e29913e387ea4 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,6 +17,8 @@ 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") @@ -39,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 c68c5c93e3f0d5..0d97a02de13297 100644 --- a/var/spack/repos/builtin/packages/rdc/package.py +++ b/var/spack/repos/builtin/packages/rdc/package.py @@ -13,7 +13,7 @@ class Rdc(CMakePackage): """ROCm Data Center Tool""" homepage = "https://github.com/ROCm/rdc" - url = "https://github.com/ROCm/rdc/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/rdc/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") @@ -27,7 +27,10 @@ def url_for_version(self, version): return url.format(version) license("MIT") - + 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") @@ -37,31 +40,24 @@ def url_for_version(self, version): 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") with default_args(deprecated=True): - 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.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:6.0") - depends_on("grpc@1.59.1+shared", when="@6.1:") + 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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -75,19 +71,15 @@ def url_for_version(self, version): "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-smi-lib@{ver}", type=("build", "link"), when=f"@{ver}") + depends_on(f"hsa-rocr-dev@{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", - "5.4.0", - "5.4.3", "5.5.0", "5.5.1", "5.6.0", @@ -97,11 +89,14 @@ def url_for_version(self, version): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: - 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", "6.0.0", "6.0.2", "6.1.0"]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") + for ver in ["6.2.0", "6.2.1"]: + depends_on(f"amdsmi@{ver}", when=f"@{ver}") def patch(self): filter_file(r"\${ROCM_DIR}/rocm_smi", "${ROCM_SMI_DIR}", "CMakeLists.txt") diff --git a/var/spack/repos/builtin/packages/rdkit/package.py b/var/spack/repos/builtin/packages/rdkit/package.py index 60263763ec96fa..4017b494366b59 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 00000000000000..41048b39cb447b --- /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 f272287fb0ed4e..4d3a8fe23987c1 100644 --- a/var/spack/repos/builtin/packages/rdma-core/package.py +++ b/var/spack/repos/builtin/packages/rdma-core/package.py @@ -18,6 +18,7 @@ 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") @@ -69,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, diff --git a/var/spack/repos/builtin/packages/re2/package.py b/var/spack/repos/builtin/packages/re2/package.py index 586bb3dc3fd023..f7232c7051891d 100644 --- a/var/spack/repos/builtin/packages/re2/package.py +++ b/var/spack/repos/builtin/packages/re2/package.py @@ -13,8 +13,29 @@ 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" ) @@ -28,18 +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"), - f"-DCMAKE_CXX_STANDARD={self.spec['abseil-cpp'].variants['cxxstd'].value}", + 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 de0da9c764171d..c9ca466d020dea 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,31 +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") - depends_on("gmake", when="platform=linux") - depends_on("gmake", when="platform=cray") - depends_on("gmake", when="platform=darwin") - depends_on("gmake", when="platform=freebsd") + 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", @@ -49,24 +47,18 @@ def configure_args(self): "--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 280ca5cf3b31c7..2a7a77776074fd 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 3ef4ee6894d3c0..5140bb79d2d9eb 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 93d104250d60f8..22458b88e7e523 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 1ea5a04dece85d..649262918eb96d 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 fa6117fffe8036..1bbea3c956fa05 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 064e20f62efd30..5cd4e84b95ee2c 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 b790fd638a4f76..2bdf71bdd78f6a 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 04fe1d0df8f99e..87c68a5e9e1f36 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 e2e325faf70974..d1e91863caaa7d 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 3c6bb42abc4008..9225f8af2994a8 100644 --- a/var/spack/repos/builtin/packages/redland-bindings/package.py +++ b/var/spack/repos/builtin/packages/redland-bindings/package.py @@ -18,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") diff --git a/var/spack/repos/builtin/packages/redland/package.py b/var/spack/repos/builtin/packages/redland/package.py index 1c8fc89e53571b..4707207de668f2 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 5df8a0e25e2ece..b38e4b2f14fbfd 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 @@ def cmake_args(self): 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 dce47d20183b5b..8717f6fd7d8463 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 8cb597774053f1..fed8981c4689c8 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 index 181e46c66c9414..b262a746099286 100644 --- a/var/spack/repos/builtin/packages/regtools/package.py +++ b/var/spack/repos/builtin/packages/regtools/package.py @@ -17,6 +17,9 @@ class Regtools(CMakePackage): 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 d591b95500a911..c826a84c4f4d3b 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 b2b93dbd1596dd..b4278807424617 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 f53de7fcb2e1d2..7b6942626e7328 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 a3651b37a7f166..fb35e8ddf8e417 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 ab98014564af34..f19e7b97dfcb4e 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 385a40198b79d5..b59f04b22ee128 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 905e309d2ff331..521ac78f42c34a 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 # 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 82234bf66bea04..e032a18cf6a1ae 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 @@ def cmake_args(self): 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 eca1662df3fa82..e6144806699c50 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,7 @@ class Restic(Package): license("BSD-2-Clause") + version("0.17.1", sha256="cba3a5759690d11dae4b5620c44f56be17a5688e32c9856776db8a9a93d6d59a") version("0.16.4", sha256="d736a57972bb7ee3398cf6b45f30e5455d51266f5305987534b45a4ef505f965") version("0.16.3", sha256="a94d6c1feb0034fcff3e8b4f2d65c0678f906fc21a1cf2d435341f69e7e7af52") version("0.16.2", sha256="88165b5b89b6064df37a9964d660f40ac62db51d6536e459db9aaea6f2b2fc11") @@ -26,20 +27,24 @@ class Restic(Package): version("0.14.0", sha256="78cdd8994908ebe7923188395734bb3cdc9101477e4163c67e7cc3b8fd3b4bd6") version("0.12.1", sha256="a9c88d5288ce04a6cc78afcda7590d3124966dab3daa9908de9b3e492e2925fb") - depends_on("go", type="build") depends_on("go@1.15:", type="build", when="@0.14.0:") depends_on("go@1.18:", type="build", when="@0.15.0:") depends_on("go@1.19:", type="build", when="@1.16.1:") - phases = ["build", "install"] + build_directory = "cmd/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) + @run_after("install") + def install_completions(self): + restic = Executable(self.prefix.bin.restic) - def build(self, spec, prefix): - go("run", "build.go") + mkdirp(bash_completion_path(self.prefix)) + mkdirp(fish_completion_path(self.prefix)) + mkdirp(zsh_completion_path(self.prefix)) - def install(self, spec, prefix): - mkdirp(prefix.bin) - install("restic", prefix.bin) + restic("generate", "--bash-completion", "restic.bash") + restic("generate", "--fish-completion", "restic.fish") + restic("generate", "--zsh-completion", "_restic") + + 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 709c3dadd96564..097747e00ce128 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 e30b4cea82074a..48a63de83993d3 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 6a53f98ab4d166..c0f31f1586c83b 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 bad9485262b15f..92a8ec1b1f0e7e 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 f8c0649e7f82aa..ee30a1420dc181 100644 --- a/var/spack/repos/builtin/packages/ripgrep/package.py +++ b/var/spack/repos/builtin/packages/ripgrep/package.py @@ -19,7 +19,26 @@ class Ripgrep(CargoPackage): 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@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) + + 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 64b880da333300..cc0e26048d186c 100644 --- a/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py +++ b/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py @@ -115,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") diff --git a/var/spack/repos/builtin/packages/rivet/package.py b/var/spack/repos/builtin/packages/rivet/package.py index 892d244e9fc42f..00ae0783dca58e 100644 --- a/var/spack/repos/builtin/packages/rivet/package.py +++ b/var/spack/repos/builtin/packages/rivet/package.py @@ -31,6 +31,9 @@ class Rivet(AutotoolsPackage): version("3.0.1", sha256="e7551168b86a05c9c029c319c313a0aa142a476195e7ff986c896c1b868f89dd") version("3.0.0", sha256="3944434d3791dccb54f7b2257589df6252cc7c065ce9deb57fbef466ff9e62b1") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + variant("hepmc", default="2", values=("2", "3"), description="HepMC version to link against") # According to A. Buckley (main Rivet developer): diff --git a/var/spack/repos/builtin/packages/rkcommon/package.py b/var/spack/repos/builtin/packages/rkcommon/package.py index 96865adfea2e29..cbc80a037539ee 100644 --- a/var/spack/repos/builtin/packages/rkcommon/package.py +++ b/var/spack/repos/builtin/packages/rkcommon/package.py @@ -10,14 +10,14 @@ 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") @@ -32,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 ea277d91206600..1a24aaf7f7dccf 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 f91a118a53604b..dfbe793fafa127 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 00861c615b7b58..ef5647719af1a0 100644 --- a/var/spack/repos/builtin/packages/rkt-racket-lib/package.py +++ b/var/spack/repos/builtin/packages/rkt-racket-lib/package.py @@ -15,6 +15,9 @@ class RktRacketLib(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 = "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 579be294ca25ec..92cbffcf7b00d1 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 9a3d8f29594662..e2f52d07287ef0 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 55acee0203627c..8165f07d548f3b 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", diff --git a/var/spack/repos/builtin/packages/rmlab/package.py b/var/spack/repos/builtin/packages/rmlab/package.py index d9aa91441cb784..836f52039b2cf4 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 diff --git a/var/spack/repos/builtin/packages/rnaz/package.py b/var/spack/repos/builtin/packages/rnaz/package.py index 7031c2dc9b692a..d25e2572337be1 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 40341e0b157710..23283c21dc159d 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 f5a86039eb809b..f95f4a55e7f5bd 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 b055e9496891a2..f7f862af075180 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 00000000000000..84e45834935154 --- /dev/null +++ b/var/spack/repos/builtin/packages/rocal/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 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.1", sha256="77d3e63e02afaee6f1ee1d877d88b48c6ea66a0afca96a1313d0f1c4f8e86b2a") + version("6.2.0", sha256="c7c265375a40d4478a628258378726c252caac424f974456d488fce43890e157") + + depends_on("libjpeg-turbo@2.0.6+partial_decoder") + depends_on("rapidjson") + depends_on("ffmpeg@4.4:") + + for ver in ["6.2.0", "6.2.1"]: + 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, + ) + + 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 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 7090e92e1cf03e..00000000000000 --- 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 -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 e57b0a6b83c939..229cc402c1d49c 100644 --- a/var/spack/repos/builtin/packages/rocalution/package.py +++ b/var/spack/repos/builtin/packages/rocalution/package.py @@ -19,14 +19,17 @@ class Rocalution(CMakePackage): homepage = "https://github.com/ROCm/rocALUTION" git = "https://github.com/ROCm/rocALUTION.git" - url = "https://github.com/ROCm/rocALUTION/archive/rocm-6.0.2.tar.gz" + 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.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") @@ -36,16 +39,13 @@ class Rocalution(CMakePackage): 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") with default_args(deprecated=True): - 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.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 @@ -55,15 +55,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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -77,6 +77,10 @@ class Rocalution(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocprim@{ver}", when=f"@{ver}") @@ -90,14 +94,18 @@ class Rocalution(CMakePackage): 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): with working_dir("src/base/hip"): @@ -124,9 +132,7 @@ def cmake_args(self): self.define("BUILD_CLIENTS_SAMPLES", "OFF"), self.define("BUILD_CLIENTS_TESTS", self.run_tests), ] - if self.spec.satisfies("@:5.1"): - args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake)) - elif self.spec.satisfies("@5.2:"): + 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")) 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 4bc1631fec73e4..00000000000000 --- 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/package.py b/var/spack/repos/builtin/packages/rocblas/package.py index 4411bb0d530928..066230a5fe7eeb 100644 --- a/var/spack/repos/builtin/packages/rocblas/package.py +++ b/var/spack/repos/builtin/packages/rocblas/package.py @@ -13,7 +13,7 @@ class Rocblas(CMakePackage): homepage = "https://github.com/ROCm/rocBLAS/" git = "https://github.com/ROCm/rocBLAS.git" - url = "https://github.com/ROCm/rocBLAS/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/rocBLAS/archive/rocm-6.1.1.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie") @@ -23,6 +23,10 @@ class Rocblas(CMakePackage): version("develop", branch="develop") version("master", branch="master") + 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") @@ -32,16 +36,15 @@ class Rocblas(CMakePackage): 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") with default_args(deprecated=True): - 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.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 @@ -52,6 +55,11 @@ 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") # https://reviews.llvm.org/D124866 # https://github.com/ROCm/HIP/issues/2678 @@ -63,18 +71,27 @@ class Rocblas(CMakePackage): depends_on("googletest@1.10.0:", 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"]: + 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", + ]: depends_on(f"rocm-openmp-extras@{ver}", type="test", when=f"@{ver}") + for ver in ["6.2.0", "6.2.1"]: + depends_on(f"rocm-smi-lib@{ver}", type="test", when=f"@{ver}") + depends_on("rocm-cmake@master", type="build", when="@master:") - depends_on("rocm-cmake", 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", @@ -88,10 +105,15 @@ class Rocblas(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: 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") @@ -108,11 +130,6 @@ class Rocblas(CMakePackage): depends_on("procps", type="build", when="@5.6:") for t_version, t_commit in [ - ("@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"), @@ -126,6 +143,10 @@ class Rocblas(CMakePackage): ("@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"), ]: resource( name="Tensile", @@ -142,7 +163,6 @@ class Rocblas(CMakePackage): when=f"@{ver} +tensile", ) - patch("0003-Fix-rocblas-gentest.patch", when="@: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") @@ -150,6 +170,13 @@ class Rocblas(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): 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 00000000000000..1f284de531949f --- /dev/null +++ b/var/spack/repos/builtin/packages/rocdecode/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 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.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, + ) + + for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + 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/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 aaf44a872a4e9c..00000000000000 --- 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/package.py b/var/spack/repos/builtin/packages/rocfft/package.py index 0321f6a0413f3f..d0a23b1094a18b 100644 --- a/var/spack/repos/builtin/packages/rocfft/package.py +++ b/var/spack/repos/builtin/packages/rocfft/package.py @@ -13,13 +13,18 @@ class Rocfft(CMakePackage): homepage = "https://github.com/ROCm/rocFFT/" git = "https://github.com/ROCm/rocFFT.git" - url = "https://github.com/ROCm/rocfft/archive/rocm-6.0.0.tar.gz" + 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.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") @@ -29,16 +34,13 @@ class Rocfft(CMakePackage): 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") with default_args(deprecated=True): - 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.4.3", sha256="ed9664adc9825c237327497bc4b23f020d50be7645647f14a45f4d943dd506e7") + version("5.4.0", sha256="d35a67332f4425fba1824eed78cf98d5c9a17a422614ff3f4cba2461df952336") + version("5.3.3", sha256="678c18710578c1fb36a0009311bb79de7607c3468f9102cfba56a866ebb7ff78") + version("5.3.0", sha256="d655c5541c4aff4267e80e36d002fc3a55c2f84a0ae8631197c12af3bf03fa7d") + + depends_on("cxx", type="build") # generated amdgpu_targets = ROCmPackage.amdgpu_targets @@ -54,6 +56,11 @@ 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") depends_on("python@3.6:", type="build") @@ -67,11 +74,6 @@ class Rocfft(CMakePackage): depends_on("rocrand", 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", @@ -85,12 +87,15 @@ class Rocfft(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", + "master", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}") - # Patch to add spack build test support. No longer required from 5.2 - patch("0003-Fix-clients-fftw3-include-dirs-rocm-4.5.patch", when="@: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 @@ -110,6 +115,15 @@ class Rocfft(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") + 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) diff --git a/var/spack/repos/builtin/packages/rocketmq/package.py b/var/spack/repos/builtin/packages/rocketmq/package.py index 33d73d444cbdc4..95925f2465d791 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 b8dd075da91789..7ff8ad1efda535 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 867773497a46c4..6f5a845b0a7145 100644 --- a/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py +++ b/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py @@ -12,12 +12,16 @@ class RocmBandwidthTest(CMakePackage): 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.0.0.tar.gz" + url = "https://github.com/ROCm/rocm_bandwidth_test/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") version("master", branch="master") + 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") @@ -27,25 +31,17 @@ class RocmBandwidthTest(CMakePackage): 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") with default_args(deprecated=True): - 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.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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -59,12 +55,30 @@ class RocmBandwidthTest(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", ]: 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", "6.0.0", "6.0.2", "6.1.0"]: + 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"@{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 6ea9ed8c4211ee..6c23a9e084eaf7 100644 --- a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py +++ b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py @@ -11,13 +11,17 @@ class RocmClangOcl(CMakePackage): 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.0.0.tar.gz" + 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") @@ -27,25 +31,15 @@ class RocmClangOcl(CMakePackage): 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") with default_args(deprecated=True): - 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.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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -59,14 +53,28 @@ class RocmClangOcl(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", "master", ]: 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(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"]: + + 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" @@ -75,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 cccae93923af91..a540d2c7265797 100644 --- a/var/spack/repos/builtin/packages/rocm-cmake/package.py +++ b/var/spack/repos/builtin/packages/rocm-cmake/package.py @@ -13,7 +13,7 @@ class RocmCmake(CMakePackage): homepage = "https://github.com/ROCm/rocm-cmake" git = "https://github.com/ROCm/rocm-cmake.git" - url = "https://github.com/ROCm/rocm-cmake/archive/rocm-5.6.0.tar.gz" + url = "https://github.com/ROCm/rocm-cmake/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") @@ -21,6 +21,10 @@ class RocmCmake(CMakePackage): license("MIT") version("master", branch="master") + 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") @@ -30,20 +34,31 @@ class RocmCmake(CMakePackage): 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") with default_args(deprecated=True): - 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.4.3", sha256="c185b3a10d191d73b76770ca0f9d6bdc355ee91fe0c9016a3779c9cfe042ba0f") + version("5.4.0", sha256="617faa9a1e51db3c7a59bd0393e054ab67e57be357d59cb0cd9b677f47824946") + version("5.3.3", sha256="3e527f99db52e301ab4f1b994029585951e2ae685f0cdfb7b8529c72f4b77af4") + version("5.3.0", sha256="659a8327f13e6786103dd562d3632e89a51244548fca081f46c753857cf09d04") + + depends_on("cxx", type="build") # generated 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"]: + 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"@{ver}") test_src_dir = "test" @@ -52,19 +67,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 ad0740dba3e87f..a05f5f8bc12626 100644 --- a/var/spack/repos/builtin/packages/rocm-core/package.py +++ b/var/spack/repos/builtin/packages/rocm-core/package.py @@ -20,6 +20,10 @@ class RocmCore(CMakePackage): libraries = ["librocm-core"] license("MIT") + 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") @@ -30,6 +34,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"]: + 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 5a4a24127af9e2..a1b1dfa21bc21d 100644 --- a/var/spack/repos/builtin/packages/rocm-dbgapi/package.py +++ b/var/spack/repos/builtin/packages/rocm-dbgapi/package.py @@ -16,7 +16,7 @@ class RocmDbgapi(CMakePackage): homepage = "https://github.com/ROCm/ROCdbgapi" git = "https://github.com/ROCm/ROCdbgapi.git" - url = "https://github.com/ROCm/ROCdbgapi/archive/rocm-6.0.0.tar.gz" + url = "https://github.com/ROCm/ROCdbgapi/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") @@ -25,6 +25,10 @@ class RocmDbgapi(CMakePackage): license("MIT") version("master", branch="amd-master") + 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") @@ -34,26 +38,23 @@ class RocmDbgapi(CMakePackage): 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") with default_args(deprecated=True): - 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.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:") 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", @@ -67,12 +68,30 @@ class RocmDbgapi(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", ]: 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", "6.0.0", "6.0.2", "6.1.0"]: + 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"@{ver}") @classmethod @@ -91,6 +110,15 @@ def patch(self): "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:"): 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 65c6070a728f33..9eb080920a8402 100644 --- a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py +++ b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py @@ -13,11 +13,15 @@ class RocmDebugAgent(CMakePackage): 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.0.0.tar.gz" + url = "https://github.com/ROCm/rocr_debug_agent/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["librocm-debug-agent"] + 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") @@ -27,26 +31,24 @@ class RocmDebugAgent(CMakePackage): 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") with default_args(deprecated=True): - 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.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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -60,20 +62,17 @@ class RocmDebugAgent(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: 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 [ - "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", @@ -83,11 +82,10 @@ class RocmDebugAgent(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.2", + "6.2.0", + "6.2.1", ]: - depends_on(f"rocm-dbgapi@{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", "6.0.0", "6.0.2", "6.1.0"]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") # https://github.com/ROCm/rocr_debug_agent/pull/4 @@ -103,12 +101,16 @@ def determine_version(cls, lib): ) return None + 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("@: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 7ede0dbae9da05..50923445e6b515 100644 --- a/var/spack/repos/builtin/packages/rocm-device-libs/package.py +++ b/var/spack/repos/builtin/packages/rocm-device-libs/package.py @@ -25,6 +25,10 @@ def url_for_version(self, version): maintainers("srekolam", "renjithravindrankannath", "haampie") version("master", branch="amd-stg-open") + 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") @@ -34,16 +38,15 @@ def url_for_version(self, version): 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") with default_args(deprecated=True): - 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.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") @@ -57,11 +60,6 @@ def url_for_version(self, version): depends_on("llvm-amdgpu ~rocm-device-libs") 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", @@ -75,11 +73,29 @@ def url_for_version(self, version): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", ]: 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"]: + 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"@{ver}") @property diff --git a/var/spack/repos/builtin/packages/rocm-gdb/package.py b/var/spack/repos/builtin/packages/rocm-gdb/package.py index 6d7dff72673459..c9ef9eb0ed4699 100644 --- a/var/spack/repos/builtin/packages/rocm-gdb/package.py +++ b/var/spack/repos/builtin/packages/rocm-gdb/package.py @@ -12,12 +12,16 @@ class RocmGdb(AutotoolsPackage): based on GDB, the GNU source-level debugger.""" homepage = "https://github.com/ROCm/ROCgdb" - url = "https://github.com/ROCm/ROCgdb/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/ROCgdb/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] license("LGPL-2.0-or-later") maintainers("srekolam", "renjithravindrankannath") + 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") @@ -27,16 +31,15 @@ class RocmGdb(AutotoolsPackage): 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") with default_args(deprecated=True): - 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.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") @@ -51,11 +54,6 @@ class RocmGdb(AutotoolsPackage): depends_on("mpfr", type=("build", "link")) 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", @@ -69,11 +67,29 @@ class RocmGdb(AutotoolsPackage): "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-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", "6.0.0", "6.0.2", "6.1.0"]: + 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"@{ver}") build_directory = "spack-build" diff --git a/var/spack/repos/builtin/packages/rocm-opencl/package.py b/var/spack/repos/builtin/packages/rocm-opencl/package.py index 1022b25cab7e29..44e96863f47797 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 * @@ -35,6 +36,11 @@ def url_for_version(self, version): license("MIT") version("master", branch="main") + 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") @@ -43,20 +49,27 @@ def url_for_version(self, version): 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") with default_args(deprecated=True): - 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.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") + 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"), @@ -67,11 +80,6 @@ def url_for_version(self, version): ("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"), ]: resource( name="rocclr", @@ -87,23 +95,18 @@ def url_for_version(self, version): patch( "https://github.com/ROCm/clr/commit/c4f773db0b4ccbbeed4e3d6c0f6bff299c2aa3f0.patch?full_index=1", sha256="5bb9b0e08888830ccf3a0a658529fe25f4ee62b5b8890f349bf2cc914236eb2f", - when="@5.7:", + when="@5.7:6.0", ) patch( "https://github.com/ROCm/clr/commit/7868876db742fb4d44483892856a66d2993add03.patch?full_index=1", sha256="7668b2a710baf4cb063e6b00280fb75c4c3e0511575e8298a9c7ae5143f60b33", - when="@5.7:", + 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") 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", @@ -116,15 +119,34 @@ def url_for_version(self, version): "5.7.1", "6.0.0", "6.0.2", + "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", ]: 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"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: 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", "5.7.0", "5.7.1", "6.0.0", "6.0.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", + ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") @classmethod @@ -144,9 +166,30 @@ def cmake_args(self): 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 + "/") @@ -160,13 +203,15 @@ def post_install(self): 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 00000000000000..6f7471fd320f99 --- /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 00000000000000..1d11dde37d3233 --- /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 +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/package.py b/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py index 3b66cf6bb54018..3586bef851b6e8 100644 --- a/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py +++ b/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py @@ -6,6 +6,7 @@ import os import re +from spack.build_systems.cmake import CMakeBuilder from spack.package import * tools_url = "https://github.com/ROCm" @@ -15,11 +16,6 @@ # For example array[0] = 3.9.0, array[1] = 3.10.0, etc. aomp = [ - "e69fe0c933cb30daafe49d9f1df71fe16f387e0287bba921995feeefdf9ac262", - "8bab3d621343f419b29043ac0cb56e062f114991dc3ec1e33e786f771deecc8f", - "20e21312816272222d1f427ea72a99a9a67077078552f5e2638a40860d161d25", - "c0aa6997e889d6ce0e37cfa6a2e91c5c0b54cda1673abdcabcf34da1ba78ba72", - "4ba1792095427588c484feed01f2f48e66aaad26bc000cbc74a15032551699e7", "371ed037b95b83fac64fb2ff2fc17313fe7d3befc8671f0a08f0e2072393fa5b", "c86141fcde879fc78d06a41ba6a26ff528da539c6a1be8b714f635182c66e3f4", "bbca540897848fa95fd0f14fc05ab6deda31299a061424972d5e2bc09c7543dc", @@ -33,14 +29,13 @@ "1b2c0934ef16e17b2377944fae8c9b3db6dc64b7e43932ddfe2eeefdf6821410", "d6e13a15d5d25990d4bacbac8fabe2eb07973829f2e69abbc628e0736f95caf9", "832b7c48149a730619b577a2863b8d1bf1b2551eda5b815e1865a044929ab9fa", + "62a5036a2299ed2e3053ee00b7ea1800469cd545fea486fa17266a8b3acfaf5d", + "3de1c7a31a88c3f05a6a66ba6854ac8fdad1ce44462e561cb1e6ad59629029ce", + "5f54d7c7c798bcf1cd47d3a7f17ceaf79991bf166cc5e47e5372a68e7cf7d520", + "ac82e8da0c210ee14b911c833ae09a029a41541689930759737c135db52464a3", ] devlib = [ - "47dbcb41fb4739219cadc9f2b5f21358ed2f9895ce786d2f7a1b2c4fd044d30f", - "c41958560ec29c8bf91332b9f668793463904a2081c330c0d828bf2f91d4f04e", - "901674bc941115c72f82c5def61d42f2bebee687aefd30a460905996f838e16c", - "e5855387ce73ed483ed0d03dbfef31f297c6ca66cf816f6816fd5ee373fc8225", - "16b7fc7db4759bd6fb54852e9855fa16ead76c97871d7e1e9392e846381d611a", "f7e1665a1650d3d0481bec68252e8a5e68adc2c867c63c570f6190a1d2fe735c", "963c9a0561111788b55a8c3b492e2a5737047914752376226c97a28122a4d768", "d68813ded47179c39914c8d1b76af3dad8c714b10229d1e2246af67609473951", @@ -54,14 +49,13 @@ "198df4550d4560537ba60ac7af9bde31d59779c8ec5d6309627f77a43ab6ef6f", "c6d88b9b46e39d5d21bd5a0c1eba887ec473a370b1ed0cebd1d2e910eedc5837", "6bd9912441de6caf6b26d1323e1c899ecd14ff2431874a2f5883d3bc5212db34", + "f1a67efb49f76a9b262e9735d3f75ad21e3bd6a05338c9b15c01e6c625c4460d", + "300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097", + "12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200", + "4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7", ] llvm = [ - "db5d45c4a7842a908527c1b7b8d4a40c688225a41d23cfa382eab23edfffdd10", - "d236a2064363c0278f7ba1bb2ff1545ee4c52278c50640e8bb2b9cfef8a2f128", - "0f892174111b78a02d1a00f8f46d9f80b9abb95513a7af38ecf2a5a0882fe87f", - "3644e927d943d61e22672422591c47a62ff83e3d87ced68439822156d8f79abf", - "1b852711aec3137b568fb65f93606d37fdcd62e06f5da3766f2ffcd4e0c646df", "4e3fcddb5b8ea8dcaa4417e0e31a9c2bbdc9e7d4ac3401635a636df32905c93e", "5296d5e474811c7d1e456cb6d5011db248b79b8d0512155e8a6c2aa5b5f12d38", "ff54f45a17723892cd775c1eaff9e5860527fcfd33d98759223c70e3362335bf", @@ -75,14 +69,13 @@ "c673708d413d60ca8606ee75c77e9871b6953c59029c987b92f2f6e85f683626", "7d35acc84de1adee65406f92a369a30364703f84279241c444cd93a48c7eeb76", "6bd9912441de6caf6b26d1323e1c899ecd14ff2431874a2f5883d3bc5212db34", + "f1a67efb49f76a9b262e9735d3f75ad21e3bd6a05338c9b15c01e6c625c4460d", + "300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097", + "12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200", + "4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7", ] flang = [ - "d95e36f3b93097ab6fb319c744ddc71cd94af0c358accc1e5224c2bbd431266d", - "d7847b5c6e1344dc0b4723dbe76a859257b4c242644dedb34e425f07738530d4", - "20f48cac9b58496230fa2428eba4e15ec0a6e92d429569b154a328b7a8c5da17", - "012a9c10a7d2a248dc40510e2f5c02a54b5f6bc39961500dc48b6780dac5ad67", - "496f00918721c72eae0bd926a5a8f1f35bd443f6b22bc08e2a42c67e44a4dbaf", "ef1256ddf6cd9de10a1b88df4736dce48295136983a7e31eadd942fb39b156f7", "ddccd866d0c01086087fe21b5711668f85bcf9cbd9f62853f8bda32eaedb5339", "fae8195a5e1b3778e31dbc6cbeedeae9998ea4b5a54215534af41e91fdcb8ba0", @@ -96,14 +89,13 @@ "fcb319ddb2aa3004a6ae60370ab4425f529336b1cee50f29200e697e61b53586", "8e6469415880bb068d788596b3ed713a24495eb42788f98cca92e73a2998f703", "51ecd2c154568c971f5b46ff0e1e1b57063afe28d128fc88c503de88f7240267", + "1bcaa73e73a688cb092f01987cf3ec9ace4aa1fcaab2b812888c610722c4501d", + "12418ea61cca58811b7e75fd9df48be568b406f84a489a41ba5a1fd70c47f7ba", + "6af7785b1776aeb9229ce4e5083dcfd451e8450f6e5ebe34214560b13f679d96", + "409ee98bf15e51ac68b7ed351f4582930dfa0288de042006e17eea6b64df5ad6", ] extras = [ - "c3a2a83d8f586ee765df96a692ebe010631446f700273fa31738ea260dfc35f7", - "2e3151a47d77166d071213af2a1691487691aae0abd5c1718d818a6d7d09cb2d", - "817c2e8975e56a8875ff56f9d1ea34d5e7e50f1b541b7f1236e3e5c8d9eee47f", - "8b738225f0be39f27bba64c014816cfa1b79f2c7cf2d0e31fbc0fffb6c26e429", - "f42ca7d85b0b64e6890502f1cf8309ef97f707829876742da2ea5c2cdf3ad8ac", "b3beee383d9c130666c230595c950bdc2ce4c7a99d728b9ddf1bca3963152223", "b26b9f4b11a9ccfab53d0dd55aada7e5b98f7ab51981cb033b376321dd44bf87", "2546becd4b182d1e366f47660c731c8ff7366b6306782f04706b6a7bf4e2094c", @@ -117,14 +109,13 @@ "f37e1107e4da5b083e794244f3d0c9fd073ccb6fd6015e635349d8f0d679c4b8", "b2e117d703cefdc2858adaeee5bad95e9b6dab6263a9c13891a79a7b1e2defb6", "57d6d9d26c0cb6ea7f8373996c41165f463ae7936d32e5793822cfae03900f8f", + "3dc837fbfcac64e000e1b5518e4f8a6b260eaf1a3e74152d8b8c22f128f575b7", + "2b9351fdb1cba229669233919464ae906ca8f70910c6fa508a2812b7c3bed123", + "7cef51c980f29d8b46d8d4b110e4f2f75d93544cf7d63c5e5d158cf531aeec7d", + "4b0d250b5ebd997ed6d5d057689c3f67dfb4d82f09f582ebb439ca9134fae48d", ] versions = [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -138,6 +129,10 @@ "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ] versions_dict = dict() # type: Dict[str,Dict[str,str]] components = ["aomp", "devlib", "llvm", "flang", "extras"] @@ -155,12 +150,16 @@ class RocmOpenmpExtras(Package): """OpenMP support for ROCm LLVM.""" homepage = tools_url + "/aomp" - url = tools_url + "/aomp/archive/rocm-6.0.2.tar.gz" + url = tools_url + "/aomp/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] license("Apache-2.0") maintainers("srekolam", "renjithravindrankannath", "estewart08") + 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"]) @@ -170,15 +169,14 @@ class RocmOpenmpExtras(Package): 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"], deprecated=True) - version("5.2.1", sha256=versions_dict["5.2.1"]["aomp"], deprecated=True) - version("5.2.0", sha256=versions_dict["5.2.0"]["aomp"], deprecated=True) - version("5.1.3", sha256=versions_dict["5.1.3"]["aomp"], deprecated=True) - version("5.1.0", sha256=versions_dict["5.1.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") @@ -192,15 +190,24 @@ class RocmOpenmpExtras(Package): depends_on("libdrm", when="@5.7:6.0") depends_on("numactl", when="@5.7:6.0") - 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"]: + 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"@{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", @@ -257,7 +264,7 @@ class RocmOpenmpExtras(Package): placement="llvm-project", when=f"@{ver}", ) - for ver in ["6.1.0"]: + for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: 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}") @@ -298,6 +305,8 @@ class RocmOpenmpExtras(Package): 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 @@ -318,6 +327,8 @@ def setup_build_environment(self, env): 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) @@ -334,7 +345,6 @@ def setup_build_environment(self, env): 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/" @@ -372,96 +382,92 @@ def patch(self): "", libomptarget.format(src) + "/cmake/Modules/LibomptargetGetDependencies.cmake", ) - - filter_file( - r"{OPENMP_INSTALL_LIBDIR}", - "{OPENMP_INSTALL_LIBDIR}/libdevice", - libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt", - ) - - if self.spec.version <= Version("5.1.3"): + if self.spec.satisfies("@:6.1"): filter_file( - r"{ROCM_DIR}/amdgcn/bitcode", - "{DEVICE_LIBS_DIR}", - libomptarget.format(src) + "/deviceRTLs/libm/CMakeLists.txt", + r"{OPENMP_INSTALL_LIBDIR}", + "{OPENMP_INSTALL_LIBDIR}/libdevice", + libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt", + ) + 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( + "-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( - "-c ", - "-c -nogpulib -nogpuinc -I{LIMIT}", - libomptarget.format(src) + "/hostrpc/CMakeLists.txt", - ) + filter_file("{ROCM_DIR}/hsa/lib", "{HSA_LIB}", libomptarget.format(src) + plugin) - 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 - if self.spec.satisfies("@6.1"): + 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) @@ -481,6 +487,8 @@ def install(self, spec, prefix): 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 # flang1 and flang2 symlink needed for build of flang-runtime # libdevice symlink to rocm-openmp-extras for runtime @@ -489,6 +497,9 @@ def install(self, spec, prefix): 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"))): @@ -496,6 +507,11 @@ def install(self, spec, prefix): 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") @@ -587,6 +603,48 @@ def install(self, spec, prefix): 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)) + 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", @@ -603,22 +661,39 @@ def install(self, spec, prefix): ] 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 3b93c678d8a08c..9521ab6c5139f2 100644 --- a/var/spack/repos/builtin/packages/rocm-smi-lib/package.py +++ b/var/spack/repos/builtin/packages/rocm-smi-lib/package.py @@ -17,13 +17,17 @@ class RocmSmiLib(CMakePackage): 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.0.2.tar.gz" + url = "https://github.com/ROCm/rocm_smi_lib/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["librocm_smi64"] version("master", branch="master") + 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") @@ -33,16 +37,14 @@ class RocmSmiLib(CMakePackage): 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") with default_args(deprecated=True): - 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.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") @@ -50,8 +52,29 @@ class RocmSmiLib(CMakePackage): depends_on("cmake@3:", type="build") 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"]: + 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"@{ver}") + + patch( + "https://github.com/ROCm/rocm_smi_lib/commit/11f12b86517d0e9868f4d16d74d4e8504c3ba7da.patch?full_index=1", + sha256="62be7262f6e1e71bf82a03f500a424a536638f04e913d0f4b477f60e8e1190fd", + when="@6.1.1:", + ) + patch("disable_pdf_generation_with_doxygen_and_latex.patch", when="@:5.6") def cmake_args(self): 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 4e927b1f01b225..00000000000000 --- 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/ROCm/rocm_smi_lib/tree/master/python_smi_tools - The spack package is called: rocm-smi-lib""" - - homepage = "https://github.com/ROCm/ROC-smi" - url = "https://github.com/ROCm/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/package.py b/var/spack/repos/builtin/packages/rocm-tensile/package.py index 17e5a631010192..de9da28b89764f 100644 --- a/var/spack/repos/builtin/packages/rocm-tensile/package.py +++ b/var/spack/repos/builtin/packages/rocm-tensile/package.py @@ -13,12 +13,15 @@ class RocmTensile(CMakePackage): homepage = "https://github.com/ROCm/Tensile/" git = "https://github.com/ROCm/Tensile.git" - url = "https://github.com/ROCm/Tensile/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/Tensile/archive/rocm-6.1.1.tar.gz" tags = ["rocm"] license("MIT") maintainers("srekolam", "renjithravindrankannath", "haampie") + 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") @@ -28,16 +31,13 @@ class RocmTensile(CMakePackage): 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") with default_args(deprecated=True): - 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.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", @@ -64,11 +64,6 @@ class RocmTensile(CMakePackage): depends_on(Boost.with_default_variants) 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", @@ -82,6 +77,9 @@ class RocmTensile(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", ]: depends_on(f"rocm-cmake@{ver}", type="build", when=f"@{ver}") depends_on(f"hip@{ver}", when=f"@{ver}") 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 2162ac451676c9..00000000000000 --- 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 229e256f58bc0e..00000000000000 --- 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 index 0eced5c7915ca0..422ab6ddc472fd 100644 --- 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 @@ -1,6 +1,6 @@ -From 687438d41a42527858dc104b5fcb371d472949e2 Mon Sep 17 00:00:00 2001 +From 18a4feabdac234a1af62ae458be44e24c63017e2 Mon Sep 17 00:00:00 2001 From: Renjith Ravindran -Date: Tue, 7 May 2024 22:17:54 +0000 +Date: Mon, 20 May 2024 22:56:55 -0700 Subject: [PATCH] Updating cmake with include and library path for spack for 6.1 @@ -20,12 +20,12 @@ Subject: [PATCH] Updating cmake with include and library path for spack for perf.so/CMakeLists.txt | 8 ++++---- pesm.so/CMakeLists.txt | 6 +++--- rcqt.so/CMakeLists.txt | 6 +++--- - rvs/CMakeLists.txt | 18 ++++++++++-------- + 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, 78 insertions(+), 75 deletions(-) + 20 files changed, 77 insertions(+), 74 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bce31b..f7e31c9 100644 @@ -338,7 +338,7 @@ index c4e2964..7a6b368 100644 ## 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 +index ead507d..8623ee9 100644 --- a/peqt.so/CMakeLists.txt +++ b/peqt.so/CMakeLists.txt @@ -107,9 +107,9 @@ else() @@ -349,7 +349,7 @@ index ead507d..567358b 100644 +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}) ++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) @@ -435,18 +435,23 @@ index c0099ab..8d92982 100644 ## define source files set(SOURCES diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt -index 3909be8..7db90e4 100644 +index 3909be8..d55423b 100644 --- a/rvs/CMakeLists.txt +++ b/rvs/CMakeLists.txt -@@ -113,21 +113,23 @@ else() - endif() +@@ -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}) -+include_directories(./ ../ ${YAML_INC_DIR}) + 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} ${YAML_CPP_LIBRARIES} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ) ++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") @@ -457,7 +462,7 @@ index 3909be8..7db90e4 100644 +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(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) @@ -465,13 +470,12 @@ index 3909be8..7db90e4 100644 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} -+ ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ) ++ ${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..d52aee3 100644 +index 8d29590..e824bdb 100644 --- a/rvslib/CMakeLists.txt +++ b/rvslib/CMakeLists.txt @@ -116,7 +116,7 @@ endif() @@ -479,7 +483,7 @@ index 8d29590..d52aee3 100644 ## 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}) ++ ${ROCM_SMI_INC_DIR} ${HIP_PATH} ${ROCBLAS_INC_DIR} ${YAML_CPP_INCLUDE_DIRS}) link_directories(${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) @@ -535,5 +539,5 @@ index 1a1a8b0..0ca398d 100644 RETURN() endif() -- -2.31.1 +2.43.0 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 61ef7fd192a776..f3b06fefcd19b8 100644 --- a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py +++ b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py @@ -16,12 +16,16 @@ class RocmValidationSuite(CMakePackage): compatible platform.""" homepage = "https://github.com/ROCm/ROCmValidationSuite" - url = "https://github.com/ROCm/ROCmValidationSuite/archive/rocm-6.1.0.tar.gz" + url = "https://github.com/ROCm/ROCmValidationSuite/archive/rocm-6.1.1.tar.gz" tags = ["rocm"] license("MIT") maintainers("srekolam", "renjithravindrankannath") + 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") @@ -31,19 +35,14 @@ class RocmValidationSuite(CMakePackage): 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") with default_args(deprecated=True): - 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.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("005-cleanup-path-reference-donot-download-googletest-yaml.patch", when="@:5.2") - patch("006-library-path.patch", when="@:5.2") patch( "007-cleanup-path-reference-donot-download-googletest-yaml-library-path_5.3.patch", when="@5.3.0:5.5", @@ -53,6 +52,11 @@ class RocmValidationSuite(CMakePackage): when="@5.6", ) 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") depends_on("cmake@3.5:", type="build") @@ -66,11 +70,6 @@ def setup_build_environment(self, build_env): build_env.set("HIPCC_PATH", spec["hip"].prefix) 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", @@ -84,18 +83,20 @@ def setup_build_environment(self, build_env): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: 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}") def patch(self): - if self.spec.satisfies("@:5.1"): - filter_file( - r"@ROCM_PATH@/rvs", self.spec.prefix.rvs, "rvs/conf/deviceid.sh.in", string=True - ) - elif self.spec.satisfies("@5.2:5.4"): + if self.spec.satisfies("@5.2:5.4"): filter_file( r"@ROCM_PATH@/bin", self.spec.prefix.bin, "rvs/conf/deviceid.sh.in", string=True ) @@ -115,8 +116,7 @@ def cmake_args(self): 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), ] libloc = self.spec["googletest"].prefix.lib64 @@ -127,4 +127,24 @@ def cmake_args(self): 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)) + if self.spec.satisfies("@6.2:"): + args.append( + self.define( + "CMAKE_CXX_FLAGS", + f"-I{self.spec['rocm-smi-lib'].prefix.include} " + f"-I{self.spec['rocblas'].prefix.include} " + f"-I{self.spec['yaml-cpp'].prefix.include} " + f"-L{self.spec['hip'].prefix.lib} " + f"-L{self.spec['hsa-rocr-dev'].prefix.lib} " + f"-L{self.spec['hsakmt-roct'].prefix.lib} " + f"-L{self.spec['rocm-smi-lib'].prefix.lib} " + f"-L{self.spec['rocblas'].prefix.lib} " + f"{libloc}/libyaml-cpp.a ", + ) + ) + args.append(self.define("CPACK_PACKAGING_INSTALL_PREFIX", self.spec.prefix)) return args diff --git a/var/spack/repos/builtin/packages/rocminfo/package.py b/var/spack/repos/builtin/packages/rocminfo/package.py index 5b94b83c9f49a0..e8d09f88121d1c 100644 --- a/var/spack/repos/builtin/packages/rocminfo/package.py +++ b/var/spack/repos/builtin/packages/rocminfo/package.py @@ -12,12 +12,16 @@ class Rocminfo(CMakePackage): homepage = "https://github.com/ROCm/rocminfo" git = "https://github.com/ROCm/rocminfo.git" - url = "https://github.com/ROCm/rocminfo/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/rocminfo/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath", "haampie") version("master", branch="master") + 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") @@ -27,25 +31,17 @@ class Rocminfo(CMakePackage): 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") with default_args(deprecated=True): - 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.4.3", sha256="72159eed31f8deee0df9228b9e306a18fe9efdd4d6c0eead871cad4617874170") + version("5.4.0", sha256="79123b92992cce75ae679caf9a6bf57b16d24e96e54b36eb002511f3800e29c6") + version("5.3.3", sha256="77e6adc81da6c1d153517e1d28db774205531a2ec188e6518f998328ef7897c6") + version("5.3.0", sha256="c279da1d946771d120611b64974fde751534e787a394ceb6b8e0b743c143d782") + + depends_on("cxx", type="build") # generated depends_on("cmake@3:", 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", @@ -59,12 +55,30 @@ class Rocminfo(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", "master", ]: 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", "6.0.0", "6.0.2", "6.1.0"]: + 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"@{ver}") def cmake_args(self): diff --git a/var/spack/repos/builtin/packages/rocmlir/package.py b/var/spack/repos/builtin/packages/rocmlir/package.py index 8247a75e216cf2..9167e316c88422 100644 --- a/var/spack/repos/builtin/packages/rocmlir/package.py +++ b/var/spack/repos/builtin/packages/rocmlir/package.py @@ -14,9 +14,14 @@ class Rocmlir(CMakePackage): homepage = "https://github.com/ROCm/rocMLIR" git = "https://github.com/ROCm/rocMLIR.git" - url = "https://github.com/ROCm/rocMLIR/archive/refs/tags/rocm-6.1.0.tar.gz" + url = "https://github.com/ROCm/rocMLIR/archive/refs/tags/rocm-6.2.1.tar.gz" - maintainers("srekolam") + maintainers("srekolam", "afzpatel", "renjithravindrankannath") + + 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") @@ -26,6 +31,10 @@ class Rocmlir(CMakePackage): version("5.4.0", sha256="3823f455ee392118c3281e27d45fa0e5381f3c4070eb4e06ba13bc6b34a90a60") 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", @@ -51,7 +60,20 @@ def patch(self): 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", "6.0.0", "6.0.2", "6.1.0"]: + 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", + ]: 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}") diff --git a/var/spack/repos/builtin/packages/rocprim/package.py b/var/spack/repos/builtin/packages/rocprim/package.py index a963ee59b644ca..50241aac483848 100644 --- a/var/spack/repos/builtin/packages/rocprim/package.py +++ b/var/spack/repos/builtin/packages/rocprim/package.py @@ -11,12 +11,16 @@ class Rocprim(CMakePackage): homepage = "https://github.com/ROCm/rocPRIM" git = "https://github.com/ROCm/rocPRIM.git" - url = "https://github.com/ROCm/rocPRIM/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/rocPRIM/archive/rocm-6.1.0.tar.gz" tags = ["rocm"] license("MIT") maintainers("cgmb", "srekolam", "renjithravindrankannath") + 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") @@ -26,16 +30,13 @@ class Rocprim(CMakePackage): 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") with default_args(deprecated=True): - 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.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 @@ -45,17 +46,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") + + 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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -69,6 +70,10 @@ class Rocprim(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"comgr@{ver}", when=f"@{ver}") @@ -81,6 +86,13 @@ class Rocprim(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") def cmake_args(self): args = [ @@ -95,10 +107,9 @@ def cmake_args(self): if self.spec.satisfies("^cmake@3.21.0:3.21.2"): args.append(self.define("__skip_rocmclang", "ON")) - - if self.spec.satisfies("@:5.1"): - args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake)) - elif self.spec.satisfies("@5.2:"): + 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/package.py b/var/spack/repos/builtin/packages/rocprofiler-dev/package.py index e3ba765bbd81a7..590c34adf64fc2 100644 --- a/var/spack/repos/builtin/packages/rocprofiler-dev/package.py +++ b/var/spack/repos/builtin/packages/rocprofiler-dev/package.py @@ -13,12 +13,16 @@ class RocprofilerDev(CMakePackage): homepage = "https://github.com/ROCm/rocprofiler" git = "https://github.com/ROCm/rocprofiler.git" - url = "https://github.com/ROCm/rocprofiler/archive/refs/tags/rocm-6.0.0.tar.gz" + url = "https://github.com/ROCm/rocprofiler/archive/refs/tags/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["librocprofiler64"] license("MIT") + 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") @@ -28,24 +32,18 @@ class RocprofilerDev(CMakePackage): version("5.6.0", sha256="ff811bd91580f60b6b4d397b6fce38d96f07debc6fd8a631b81d1b266cc9542d") version("5.5.1", sha256="f5dbece5c205e37383fed4a2bd6042ff1c11f11f64dfbf65d7e23c0af6889a5a") version("5.5.0", sha256="d9dd38c42b4b12d4149f1cc3fca1af5bec69c72f455653a8f4fd8195b3b95703") - version("5.4.3", sha256="86c3f43ee6cb9808796a21409c853cc8fd496578b9eef4de67ca77830229cac1") - version("5.4.0", sha256="0322cbe5d1d3182e616f472da31f0707ad6040833c38c28f2b39381a85210f43") - version("5.3.3", sha256="07ee28f3420a07fc9d45910e78ad7961b388109cfc0e74cfdf2666789e6af171") - version("5.3.0", sha256="b0905a329dc1c97a362b951f3f8ef5da9d171cabb001ed4253bd59a2742e7d39") with default_args(deprecated=True): - 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.4.3", sha256="86c3f43ee6cb9808796a21409c853cc8fd496578b9eef4de67ca77830229cac1") + version("5.4.0", sha256="0322cbe5d1d3182e616f472da31f0707ad6040833c38c28f2b39381a85210f43") + version("5.3.3", sha256="07ee28f3420a07fc9d45910e78ad7961b388109cfc0e74cfdf2666789e6af171") + version("5.3.0", sha256="b0905a329dc1c97a362b951f3f8ef5da9d171cabb001ed4253bd59a2742e7d39") + + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated depends_on("cmake@3:", 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", @@ -59,17 +57,35 @@ class RocprofilerDev(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: 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"]: + 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"]: 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"]: + 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"aqlprofile@{ver}", when=f"@{ver}") depends_on(f"comgr@{ver}", when=f"@{ver}") @@ -112,13 +128,16 @@ def determine_version(cls, lib): 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): 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 00000000000000..d7b758c3e82f07 --- /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 +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 00000000000000..38471a1605f515 --- /dev/null +++ b/var/spack/repos/builtin/packages/rocprofiler-register/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 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.0.tar.gz" + + tags = ["rocm"] + + maintainers("afzpatel", "srekolam", "renjithravindrankannath") + + license("MIT") + 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("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 00000000000000..c8bff2f24d4f7f --- /dev/null +++ b/var/spack/repos/builtin/packages/rocpydecode/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 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.1", sha256="34c595cfe40ad74fcec2f52e7cc7be3ad8c8334030b0e98eb36305b6f63edc0d") + version("6.2.0", sha256="e465254cd3e96bbb59208e90293d7c6b7744b0fbcd928ef278ec568c83e63ff3") + + depends_on("py-pybind11") + depends_on("ffmpeg@4.4:5") + depends_on("dlpack") + + for ver in ["6.2.0", "6.2.1"]: + 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)), + ] + return args diff --git a/var/spack/repos/builtin/packages/rocrand/package.py b/var/spack/repos/builtin/packages/rocrand/package.py index d9424c35f3acb4..7f99844408e122 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 @@ -26,6 +25,10 @@ class Rocrand(CMakePackage): version("develop", branch="develop") version("master", branch="master") + 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") @@ -35,16 +38,14 @@ class Rocrand(CMakePackage): 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") with default_args(deprecated=True): - 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.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 @@ -55,6 +56,11 @@ 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") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") depends_on("cmake@3.10.2:", type="build") @@ -74,11 +80,6 @@ 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", @@ -106,11 +107,6 @@ class Rocrand(CMakePackage): ) 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", @@ -124,6 +120,10 @@ class Rocrand(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}") @@ -135,26 +135,13 @@ def patch(self): 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.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): 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 f9333667446999..00000000000000 --- 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 - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(wrapper.value, ctx); - } -@@ -49,7 +57,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(wrapper.value ? '1' : '0', ctx); - } -@@ -58,7 +66,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2char_operation(wrapper.value), ctx); - } -@@ -67,7 +75,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2char_fill(wrapper.value), ctx); - } -@@ -76,7 +84,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2char_diagonal(wrapper.value), ctx); - } -@@ -85,7 +93,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2char_side(wrapper.value), ctx); - } -@@ -94,7 +102,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2char_direct(wrapper.value), ctx); - } -@@ -104,7 +112,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2char_storev(wrapper.value), ctx); - } -@@ -113,7 +121,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2char_workmode(wrapper.value), ctx); - } -@@ -122,7 +130,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2char_svect(wrapper.value), ctx); - } -@@ -131,7 +139,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2char_evect(wrapper.value), ctx); - } -@@ -140,7 +148,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2char_eform(wrapper.value), ctx); - } -@@ -149,7 +157,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2string_datatype(wrapper.value), ctx); - } -@@ -158,7 +166,7 @@ template <> - struct formatter> : formatter - { - template -- auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) -+ auto format(rocsolver_logvalue wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST - { - return formatter::format(rocblas2string_initialization(wrapper.value), ctx); - } diff --git a/var/spack/repos/builtin/packages/rocsolver/package.py b/var/spack/repos/builtin/packages/rocsolver/package.py index 7e3a235e5cf8c5..f2043b98dbe39e 100644 --- a/var/spack/repos/builtin/packages/rocsolver/package.py +++ b/var/spack/repos/builtin/packages/rocsolver/package.py @@ -15,7 +15,7 @@ class Rocsolver(CMakePackage): homepage = "https://github.com/ROCm/rocSOLVER" git = "https://github.com/ROCm/rocSOLVER.git" - url = "https://github.com/ROCm/rocSOLVER/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/rocSOLVER/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie") @@ -36,11 +36,20 @@ 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.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") @@ -50,16 +59,14 @@ class Rocsolver(CMakePackage): 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") with default_args(deprecated=True): - 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.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") depends_on("fmt@7:", type="build", when="@4.5.0:") @@ -68,8 +75,6 @@ class Rocsolver(CMakePackage): depends_on("googletest@1.10.0:", type="test") depends_on("netlib-lapack@3.7.1:", type="test") - # Backport https://github.com/ROCm/rocSOLVER/commit/2bbfb8976f6e4d667499c77e41a6433850063e88 - patch("fmt-8.1-compatibility.patch", when="@:5.1.3") # Maximize compatibility with other libraries that are using fmt. patch("fmt-9-compatibility.patch", when="@5.2.0:5.5") @@ -84,11 +89,6 @@ class Rocsolver(CMakePackage): depends_on(f"rocblas@{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", "5.4.0", @@ -102,6 +102,10 @@ class Rocsolver(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocblas@{ver}", when=f"@{ver}") @@ -143,6 +147,13 @@ def cmake_args(self): 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 ab84b91c6177d3..00000000000000 --- 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 -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 - __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 - __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 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 52bbe8336fb756..00000000000000 --- 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 -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 - __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 - __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 diff --git a/var/spack/repos/builtin/packages/rocsparse/package.py b/var/spack/repos/builtin/packages/rocsparse/package.py index 320a3659858fcd..5e9b1c86dc15fc 100644 --- a/var/spack/repos/builtin/packages/rocsparse/package.py +++ b/var/spack/repos/builtin/packages/rocsparse/package.py @@ -17,7 +17,7 @@ class Rocsparse(CMakePackage): homepage = "https://github.com/ROCm/rocSPARSE" git = "https://github.com/ROCm/rocSPARSE.git" - url = "https://github.com/ROCm/rocSPARSE/archive/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/rocSPARSE/archive/rocm-6.1.1.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath") @@ -32,8 +32,17 @@ 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") + + conflicts("+asan", when="os=rhel9") + conflicts("+asan", when="os=centos7") + conflicts("+asan", when="os=centos8") license("MIT") + 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") @@ -43,25 +52,19 @@ class Rocsparse(CMakePackage): 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") with default_args(deprecated=True): - 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.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 [ - "5.1.0", - "5.1.3", - "5.2.0", - "5.2.1", - "5.2.3", "5.3.0", "5.3.3", "5.4.0", @@ -75,6 +78,10 @@ class Rocsparse(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocprim@{ver}", when=f"@{ver}") @@ -84,9 +91,6 @@ class Rocsparse(CMakePackage): patch("0001-set-mtx-directory.patch", when="@:5.3 +test") # Enable use of Spack-provided Python. patch("0002-fix-gentest-shebang.patch", when="@:5.3 +test") - # Fix build for most Radeon 5000 and Radeon 6000 series GPUs. - patch("0003-fix-navi-1x-rocm-4.5.patch", when="@:5.1") - patch("0003-fix-navi-1x-rocm-5.2.patch", when="@5.2") depends_on("googletest@1.11.0:", when="@5.1.0: +test") depends_on("googletest@1.10.0:", when="+test") @@ -249,6 +253,13 @@ def check_build(self): 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): diff --git a/var/spack/repos/builtin/packages/rocthrust/package.py b/var/spack/repos/builtin/packages/rocthrust/package.py index d4b9485358262e..93b017243fcd17 100644 --- a/var/spack/repos/builtin/packages/rocthrust/package.py +++ b/var/spack/repos/builtin/packages/rocthrust/package.py @@ -14,10 +14,14 @@ class Rocthrust(CMakePackage): homepage = "https://github.com/ROCm/rocThrust" git = "https://github.com/ROCm/rocThrust.git" - url = "https://github.com/ROCm/rocThrust/archive/rocm-6.0.0.tar.gz" + url = "https://github.com/ROCm/rocThrust/archive/rocm-6.1.0.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath") + 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") @@ -27,16 +31,13 @@ class Rocthrust(CMakePackage): 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") with default_args(deprecated=True): - 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.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 @@ -53,11 +54,6 @@ class Rocthrust(CMakePackage): 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", @@ -71,6 +67,10 @@ class Rocthrust(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocprim@{ver}", when=f"@{ver}") @@ -85,7 +85,7 @@ def setup_build_environment(self, env): 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 334e440e9927d8..5491e5d8fcd115 100644 --- a/var/spack/repos/builtin/packages/roctracer-dev-api/package.py +++ b/var/spack/repos/builtin/packages/roctracer-dev-api/package.py @@ -13,12 +13,16 @@ class RoctracerDevApi(Package): homepage = "https://github.com/ROCm/roctracer" git = "https://github.com/ROCm/roctracer.git" - url = "https://github.com/ROCm/roctracer/archive/refs/tags/rocm-6.0.2.tar.gz" + url = "https://github.com/ROCm/roctracer/archive/refs/tags/rocm-6.1.2.tar.gz" tags = ["rocm"] license("MIT") maintainers("srekolam", "renjithravindrankannath") + 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") @@ -28,16 +32,13 @@ class RoctracerDevApi(Package): 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") with default_args(deprecated=True): - 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.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 00000000000000..26cc1e21ea4b9f --- /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 +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 a333f4be39fb8d..6b5f472f8699eb 100644 --- a/var/spack/repos/builtin/packages/roctracer-dev/package.py +++ b/var/spack/repos/builtin/packages/roctracer-dev/package.py @@ -15,13 +15,17 @@ class RoctracerDev(CMakePackage, ROCmPackage): homepage = "https://github.com/ROCm/roctracer" git = "https://github.com/ROCm/roctracer.git" - url = "https://github.com/ROCm/roctracer/archive/rocm-6.0.2.tar.gz" + 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.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") @@ -31,16 +35,13 @@ class RoctracerDev(CMakePackage, ROCmPackage): 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") with default_args(deprecated=True): - 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.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 variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") @@ -49,11 +50,6 @@ class RoctracerDev(CMakePackage, ROCmPackage): depends_on("py-cppheaderparser", 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", @@ -67,18 +63,38 @@ class RoctracerDev(CMakePackage, ROCmPackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: 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.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"]: + + 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 ["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"]: + 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"@{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): diff --git a/var/spack/repos/builtin/packages/rocwmma/package.py b/var/spack/repos/builtin/packages/rocwmma/package.py index 0cd966b5a13c2e..5fa810eb353b09 100644 --- a/var/spack/repos/builtin/packages/rocwmma/package.py +++ b/var/spack/repos/builtin/packages/rocwmma/package.py @@ -21,12 +21,16 @@ class Rocwmma(CMakePackage): homepage = "https://github.com/ROCm/rocWMMA" git = "https://github.com/ROCm/rocWMMA.git" - url = "https://github.com/ROCm/rocWMMA/archive/refs/tags/rocm-6.0.2.tar.gz" + 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.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") @@ -36,14 +40,13 @@ class Rocwmma(CMakePackage): 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") with default_args(deprecated=True): - version("5.2.3", sha256="7f42e9742eff258f7c09c518c5ea9c71a224574e1c075d7e1c4e464192fc4920") - version("5.2.1", sha256="73adb6a0ae99051493459a9902ad718b0452d6d819583a58d713ce52fa813f21") - version("5.2.0", sha256="257ccd1cf2bc1d8064e72e78d276ef7446b2cb7e2dec05ff8331bb44eff2b7cb") + 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 @@ -69,9 +72,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", @@ -85,6 +85,10 @@ class Rocwmma(CMakePackage): "6.0.0", "6.0.2", "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", ]: depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) depends_on("llvm-amdgpu@" + ver, type="build", when="@" + ver) @@ -92,7 +96,19 @@ 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", "6.0.0", "6.0.2", "6.1.0"]: + 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", + ]: 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 1f8b78c80eaa65..4514a1c67eb164 100644 --- a/var/spack/repos/builtin/packages/roms/package.py +++ b/var/spack/repos/builtin/packages/roms/package.py @@ -22,6 +22,8 @@ class Roms(MakefilePackage): 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") variant( diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index e80c274d472c6b..31990569102be7 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os import sys from spack.operating_systems.mac_os import macos_version @@ -22,9 +23,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,10 +34,16 @@ class Root(CMakePackage): version("develop", branch="master") # Production version + 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") @@ -53,6 +58,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") @@ -83,6 +89,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 @@ -99,6 +109,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( @@ -119,7 +135,24 @@ 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") - patch("webgui.patch", level=0, when="@6.26.00:6.26.10,6.28.00:6.28.08 +webgui") + # 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 sys.platform == "darwin": # Resolve non-standard use of uint, _cf_ @@ -140,6 +173,12 @@ class Root(CMakePackage): 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 @@ -269,6 +308,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") @@ -299,6 +343,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") @@ -357,7 +402,8 @@ 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") @@ -381,7 +427,9 @@ class Root(CMakePackage): conflicts("target=ppc64le:", when="@:6.24") # Incompatible variants - if sys.platform != "darwin": + if sys.platform == "darwin": + conflicts("+opengl", when="~x ~aqua", msg="root+opengl requires X or Aqua") + 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") @@ -391,7 +439,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") @@ -402,10 +450,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 sys.platform == "darwin" 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"): 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 sys.platform == "darwin" 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") @@ -482,21 +538,26 @@ def _add_variant(variants, features, featurename, variantname): _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") @@ -505,7 +566,8 @@ def _add_variant(variants, features, featurename, variantname): _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") @@ -516,7 +578,8 @@ def _add_variant(variants, features, featurename, variantname): _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") @@ -532,7 +595,6 @@ def cmake_args(self): # Options controlling gross build / config behavior. options += [ - define("exceptions", True), define("explicitlink", True), define("fail-on-missing", True), define_from_variant("fortran"), @@ -552,23 +614,25 @@ def cmake_args(self): 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), define("builtin_freetype", False), define("builtin_ftgl", False), define("builtin_gl2ps", False), - define("builtin_glew", False), + define("builtin_glew", self.spec.satisfies("platform=darwin")), define("builtin_gsl", False), define("builtin_llvm", True), define("builtin_lz4", self.spec.satisfies("@6.12.02:6.12")), @@ -586,6 +650,9 @@ def cmake_args(self): define("builtin_zlib", False), ] + if self.spec.satisfies("@:6.32"): + options.append(define("builtin_afterimage", afterimage_enabled)) + # Features options += [ define("afdsmrgd", False), @@ -624,7 +691,6 @@ def cmake_args(self): 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"), @@ -689,6 +755,9 @@ def cmake_args(self): 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": @@ -741,13 +810,22 @@ def add_include_path(dep_name): 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))) @@ -755,8 +833,12 @@ def setup_run_environment(self, env): # 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) @@ -764,16 +846,20 @@ def setup_dependent_build_environment(self, env, dependent_spec): 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/package.py b/var/spack/repos/builtin/packages/rosco/package.py index 8ef734e1fdc60f..59c33292ade4d7 100644 --- a/var/spack/repos/builtin/packages/rosco/package.py +++ b/var/spack/repos/builtin/packages/rosco/package.py @@ -27,6 +27,9 @@ class Rosco(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/ross/package.py b/var/spack/repos/builtin/packages/ross/package.py index 2135c254425513..77a4cb7fe5a83e 100644 --- a/var/spack/repos/builtin/packages/ross/package.py +++ b/var/spack/repos/builtin/packages/ross/package.py @@ -25,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") diff --git a/var/spack/repos/builtin/packages/routinator/package.py b/var/spack/repos/builtin/packages/routinator/package.py index e6845beec6ba0d..35d1058d05d5ad 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 602e18a3079266..33dd2f9037d206 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 30cf5138be5ea5..cd18cc8dd52675 100644 --- a/var/spack/repos/builtin/packages/rpcsvc-proto/package.py +++ b/var/spack/repos/builtin/packages/rpcsvc-proto/package.py @@ -14,11 +14,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 +35,6 @@ def change_makefile(self): # 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 840651798bf381..18d373f299e9ec 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"), @@ -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 00000000000000..be8a28b60d9379 --- /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 +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/package.py b/var/spack/repos/builtin/packages/rpp/package.py index 2dfa0a815aacaa..c5547f80e0fd2a 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-6.0.2.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"): @@ -28,7 +28,10 @@ def url_for_version(self, version): maintainers("srekolam", "afzpatel") license("MIT") - + 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") @@ -41,6 +44,8 @@ def url_for_version(self, version): 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", @@ -57,6 +62,11 @@ def url_for_version(self, version): default=False, description="add utilities folder which contains rpp unit tests", ) + 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-include-half-openmp-through-spack-package.patch", when="@:5.7") patch("0002-declare-handle-in-header.patch") @@ -64,13 +74,21 @@ def url_for_version(self, version): # 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="+add_tests") + 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}", @@ -103,11 +121,23 @@ def patch(self): "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") @@ -124,7 +154,17 @@ def patch(self): with when("+hip"): with when("@5.7:"): - for ver in ["5.7.0", "5.7.1", "6.0.0", "6.0.2", "6.1.0"]: + 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", + ]: depends_on("hip@" + ver, when="@" + ver) with when("@:1.2"): depends_on("hip@5:") @@ -134,6 +174,17 @@ def patch(self): 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 @@ -152,9 +203,3 @@ def cmake_args(self): ) ) return args - - @run_after("install") - def add_tests(self): - if self.spec.satisfies("+add_tests"): - install_tree("utilities", self.spec.prefix.utilities) - install_tree("cmake", self.spec.prefix.cmake) diff --git a/var/spack/repos/builtin/packages/rr/package.py b/var/spack/repos/builtin/packages/rr/package.py index c89b3a457cab07..6c4bdeb11f3c36 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 a7827fa6dbfd52..559acdf9100db8 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 449af96b288108..7c2cd25bbd75f5 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 @@ def build_directory(self): @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("%pgi") or 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 1038f21a63b81a..10169e174b6ffc 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 8627f862d63f0c..25b3a3bc90198b 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 14442b8692ac1a..a7e5c3c137ed0c 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 e28b243e4d9c89..09fa89332c7404 100644 --- a/var/spack/repos/builtin/packages/rstudio/package.py +++ b/var/spack/repos/builtin/packages/rstudio/package.py @@ -11,11 +11,14 @@ 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 aba593db40d723..e33eeed3686dbe 100644 --- a/var/spack/repos/builtin/packages/rsync/package.py +++ b/var/spack/repos/builtin/packages/rsync/package.py @@ -16,6 +16,7 @@ class Rsync(AutotoolsPackage): 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") @@ -26,6 +27,9 @@ class Rsync(AutotoolsPackage): version("3.1.2", sha256="ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2") version("3.1.1", sha256="7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + 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 9722a270bd87e0..6de8baf1116cd6 100644 --- a/var/spack/repos/builtin/packages/rsyslog/package.py +++ b/var/spack/repos/builtin/packages/rsyslog/package.py @@ -18,6 +18,8 @@ class Rsyslog(AutotoolsPackage): 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") diff --git a/var/spack/repos/builtin/packages/rt-tests/package.py b/var/spack/repos/builtin/packages/rt-tests/package.py index f02be36b17a0d6..094370110dade0 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 16641b714ef11c..49e6424eed6fae 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 e8a5bc843237d1..718b48f434f62a 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 1d30534f8e87bf..e75068b6be1fb2 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 5b976cd4e104ee..32c6759221b839 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 768b2427917745..b40db761008e67 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 b85aa30bd27307..a8c13d4a5a78d0 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 e71aa852d91889..87efcab54267f1 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -24,6 +24,9 @@ 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") @@ -35,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") @@ -52,6 +59,8 @@ class Ruby(AutotoolsPackage, NMakePackage): 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 @@ -127,6 +136,7 @@ def configure_args(self): 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 d1088eb20557c3..8db11fea2e4148 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 b05818412e1b40..3ea40bfb5c41a0 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 6a83358fbf0fcb..73d6de12235159 100644 --- a/var/spack/repos/builtin/packages/rust-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/rust-bootstrap/package.py @@ -23,6 +23,17 @@ class RustBootstrap(Package): # 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", 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 00000000000000..47d0f472219741 --- /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 b9f8da825f1f7b..d7226b16c9b46b 100644 --- a/var/spack/repos/builtin/packages/rust/package.py +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -36,6 +36,7 @@ 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") @@ -45,6 +46,9 @@ class Rust(Package): 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, @@ -54,7 +58,6 @@ class Rust(Package): 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") @@ -64,6 +67,12 @@ class Rust(Package): 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 # download the binary distribution of the compiler and build with that. @@ -75,15 +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") 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$"] @@ -91,10 +107,17 @@ 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")) diff --git a/var/spack/repos/builtin/packages/sabre/package.py b/var/spack/repos/builtin/packages/sabre/package.py index 341e026645c556..61829b80ad3c5d 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 ed313b19cc1237..2322be0f6386ba 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 c6e65a2c00b19e..e5af8d79d7a9aa 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 55da0a2cd50151..38803fe5306c32 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 9b90af0ff01d0f..b4dccd0497da20 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:") @@ -65,6 +71,11 @@ class Salmon(CMakePackage): conflicts("%gcc@:5.1", when="@0.14.1:") resources = [ + ( + "1.10.3", + "pufferfish", + "52b6699de0d33814b73edb3455175568c2330d8014be017dce7b564e54134860", + ), ( "1.10.2", "pufferfish", @@ -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 @@ def patch(self): ) 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 13f15926ac27dc..9abb0fe942b3ff 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 19c0eca618b8e3..a96950b500bd47 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 @@ def cmake_args(self): 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 629141d67279dd..2c24579706a2e2 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 @@ def setup_build_environment(self, env): 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 @@ def cmake_args(self): 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 7b90b5b59da6ea..b87e5abec71f2d 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 c8600dc279c419..c436775d139bbd 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 9191ab9ae0800a..7814c4f4e4fd8f 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/samtools/package.py b/var/spack/repos/builtin/packages/samtools/package.py index c6b0018ecf1bec..6328bdf90a974c 100644 --- a/var/spack/repos/builtin/packages/samtools/package.py +++ b/var/spack/repos/builtin/packages/samtools/package.py @@ -44,6 +44,9 @@ 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") diff --git a/var/spack/repos/builtin/packages/sandbox/package.py b/var/spack/repos/builtin/packages/sandbox/package.py index 2bd88f2295158a..a24c819a38e46f 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 e22e69092008be..d9a4e232162fa6 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 8fe36fdef9d11a..eba4e9ca1e157b 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 3dfa800cf08ae2..996783d4a04825 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 55514d4b02dd6f..365f5be2969d6a 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 00000000000000..3631f2d4000646 --- /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 00000000000000..1c7f98e3b72957 --- /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 f3e70b5fc8d46f..400a98409b88f5 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 @@ 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 d30d2ee6b487b5..9a5c04a1ab9a07 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 22cc6128837b48..030d02a4f2649f 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 2f34e6da376e06..bbcd75469abf6e 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 dcad460838fd41..387eb50dd40180 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 4bb3cce92e117c..c3457c20a7beb7 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 35e34fef5dec63..4023b4f9030d07 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 d8ef261220564d..8d9171756f6384 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") diff --git a/var/spack/repos/builtin/packages/scallop/package.py b/var/spack/repos/builtin/packages/scallop/package.py index e3150343e95aaa..1d79822e7ce20e 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 85e1ff2ee61ab3..e2ec4d881cd600 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 6df17616b8be0d..cdfdc7eb7c4c5a 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 7618e5bfd0aea1..3256626dd4a02a 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 a37be14bb8568b..5d0b00e406eabb 100644 --- a/var/spack/repos/builtin/packages/scc/package.py +++ b/var/spack/repos/builtin/packages/scc/package.py @@ -19,5 +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 00000000000000..23fbfe8b770776 --- /dev/null +++ b/var/spack/repos/builtin/packages/sccache/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) + +import os +import re + +import spack.build_systems +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 cef9ef4081b1de..049b3881530fac 100644 --- a/var/spack/repos/builtin/packages/scine-core/package.py +++ b/var/spack/repos/builtin/packages/scine-core/package.py @@ -21,6 +21,8 @@ class ScineCore(CMakePackage): 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 7efd86781b0ac6..8bab8c53580f77 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", diff --git a/var/spack/repos/builtin/packages/scine-molassembler/package.py b/var/spack/repos/builtin/packages/scine-molassembler/package.py index 6c1bc8766376d4..da2c314cc72c24 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", diff --git a/var/spack/repos/builtin/packages/scine-qcmaquis/package.py b/var/spack/repos/builtin/packages/scine-qcmaquis/package.py index 55fbae789e01e6..8406d00de71276 100644 --- a/var/spack/repos/builtin/packages/scine-qcmaquis/package.py +++ b/var/spack/repos/builtin/packages/scine-qcmaquis/package.py @@ -20,6 +20,10 @@ class ScineQcmaquis(CMakePackage): 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") + + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + depends_on("fortran", type="build") # generated variant( "symmetries", default="SU2U1PG,TwoU1PG", diff --git a/var/spack/repos/builtin/packages/scine-readuct/package.py b/var/spack/repos/builtin/packages/scine-readuct/package.py index f00bc645e48bd6..935baf2b6eb536 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", diff --git a/var/spack/repos/builtin/packages/scine-serenity/package.py b/var/spack/repos/builtin/packages/scine-serenity/package.py index 7dd6d8dd396fbe..ed666fc88cd304 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", diff --git a/var/spack/repos/builtin/packages/scine-sparrow/package.py b/var/spack/repos/builtin/packages/scine-sparrow/package.py index 44d1ccf84a8f44..50ef10fe6a305f 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", diff --git a/var/spack/repos/builtin/packages/scine-utilities/package.py b/var/spack/repos/builtin/packages/scine-utilities/package.py index 3dcf0fb2a9e112..1784dedffd5a90 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", diff --git a/var/spack/repos/builtin/packages/scine-xtb/package.py b/var/spack/repos/builtin/packages/scine-xtb/package.py index 9cd7dca1827763..676ddaa2331bdb 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", diff --git a/var/spack/repos/builtin/packages/scitokens-cpp/package.py b/var/spack/repos/builtin/packages/scitokens-cpp/package.py index d64b15f442eaf0..1426828700f0eb 100644 --- a/var/spack/repos/builtin/packages/scitokens-cpp/package.py +++ b/var/spack/repos/builtin/packages/scitokens-cpp/package.py @@ -27,6 +27,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", 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 00000000000000..24135986e55333 --- /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/scorec-core/package.py b/var/spack/repos/builtin/packages/scorec-core/package.py index b5f4c35efb440d..9b2648aa1dc47d 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 a040dc3a3d314f..d4076a89a19a39 100644 --- a/var/spack/repos/builtin/packages/scorep/package.py +++ b/var/spack/repos/builtin/packages/scorep/package.py @@ -69,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( @@ -153,6 +157,14 @@ def find_libpath(self, libname, root): 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 @@ -162,9 +174,9 @@ def configure_args(self): "--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) @@ -189,8 +201,7 @@ def configure_args(self): 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") diff --git a/var/spack/repos/builtin/packages/scorpio/package.py b/var/spack/repos/builtin/packages/scorpio/package.py index 360e54dc06dcc7..535e10d8aef1c2 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 fbc5ddbeb68956..e470491d84759c 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -25,18 +25,21 @@ 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") # generated + depends_on("fortran", type="build") # generated + build_system(conditional("cmake", when="@7:"), "makefile", default="cmake") variant("threads", default=True, description="use POSIX Pthreads within Scotch and PT-Scotch") variant( diff --git a/var/spack/repos/builtin/packages/scr/package.py b/var/spack/repos/builtin/packages/scr/package.py index 7f377832dfc0c4..7ec48f4ac77223 100644 --- a/var/spack/repos/builtin/packages/scr/package.py +++ b/var/spack/repos/builtin/packages/scr/package.py @@ -12,6 +12,8 @@ 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 @@ def cmake_args(self): 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 @@ def cmake_args(self): 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 d4c4dc5ecf3213..1d450d6dbbe6d3 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 d7e3b34c3d2a2f..c34ecb5bd0d72f 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 0aeb0ba2a06123..c28f40fb7f888c 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 cdb33aa6fbcb34..585998738a2816 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 b0c6ff307430d1..f3311e57214680 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 4e94341aec863a..87f2265999efe3 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 9bc5c7a69ba861..9ab51ccaf392f3 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 d8c598de9fa368..55ea3b0be6124e 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 928f3ca12c8500..b8f44c8dc73611 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 7607142f074547..a222024541934b 100644 --- a/var/spack/repos/builtin/packages/seacas/package.py +++ b/var/spack/repos/builtin/packages/seacas/package.py @@ -35,6 +35,15 @@ class Seacas(CMakePackage): # ###################### 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" ) @@ -138,6 +147,10 @@ class Seacas(CMakePackage): deprecated=True, ) + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + depends_on("fortran", type="build") # generated + # ###################### Variants ########################## # Package options # The I/O libraries (exodus, IOSS) are always built @@ -183,6 +196,11 @@ class Seacas(CMakePackage): 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, @@ -218,6 +236,9 @@ class Seacas(CMakePackage): 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 @@ -226,14 +247,30 @@ class Seacas(CMakePackage): depends_on("hdf5+hl~mpi", when="~mpi") depends_on("hdf5+hl+mpi", when="+mpi") - depends_on("fmt@10.2.1:", when="@2024-03-11:") - depends_on("fmt@10.1.0:", when="@2023-10-24:2023-11-27") + 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"): @@ -241,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") @@ -399,7 +436,7 @@ def cmake_args(self): [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), @@ -453,6 +490,9 @@ def cmake_args(self): 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 @@ -461,3 +501,9 @@ def cmake_args(self): 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 00000000000000..fafe5e6c9d4eaa --- /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 a101a276234152..59f8c991944700 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 ee9e868a7065d8..5a6b21b4b95760 100644 --- a/var/spack/repos/builtin/packages/sed/package.py +++ b/var/spack/repos/builtin/packages/sed/package.py @@ -20,6 +20,8 @@ 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" @@ -42,8 +44,7 @@ def determine_version(cls, exe): 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 00000000000000..1cd4f787fcf82a --- /dev/null +++ b/var/spack/repos/builtin/packages/seissol/package.py @@ -0,0 +1,351 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# 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.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 + ) + + 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", + ) + + 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 0486604567f5aa..ade72efed12c5e 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 d26b4248c798af..2a0475715493ab 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 96e4dd4393c6ed..a00e944ea8fc38 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") @@ -88,7 +91,7 @@ class Sensei(CMakePackage): 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("py-mpi4py@:3", when="+python", type=("build", "run")) depends_on("swig", when="+python", type="build") depends_on("cmake@3.6:", when="@3:", type="build") depends_on("pugixml") diff --git a/var/spack/repos/builtin/packages/sentencepiece/package.py b/var/spack/repos/builtin/packages/sentencepiece/package.py index 845dea6add8b72..a954519ece3ce1 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/seq-gen/package.py b/var/spack/repos/builtin/packages/seq-gen/package.py index 2aa4cca47e5095..c67831285d2022 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 5650cc43a0add8..0fc2a493ab1fa3 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 00000000000000..895d5386c2155c --- /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 00000000000000..b8c2e93d7b15e2 --- /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 05a2d6ed00381e..639f7cbbaf2841 100644 --- a/var/spack/repos/builtin/packages/seqkit/package.py +++ b/var/spack/repos/builtin/packages/seqkit/package.py @@ -6,17 +6,24 @@ 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 ab756237428426..4140b78554031c 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 6334292fbb92af..12a665479f628a 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 3447d11845fe48..3677f35e02144c 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 @@ 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 12c05b147ab339..e8a70da49b1afa 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 @@ def patch(self): 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 @@ def patch(self): 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): - return [ - self.define("SERENITY_BUILD_TESTS", self.run_tests), - self.define_from_variant("SERENITY_BUILD_PYTHON_BINDINGS", "python"), + args = [ + 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,3 +167,18 @@ def cmake_args(self): 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 192d84f4a9d94e..a0a68e16a6456b 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 8ec0fe3b4c4b43..0618fe9db2bffb 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") diff --git a/var/spack/repos/builtin/packages/sessreg/package.py b/var/spack/repos/builtin/packages/sessreg/package.py index 12d0804d92eed8..63f14e8904a62e 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 65bb951974a9ca..5f8eb61dacb8ea 100644 --- a/var/spack/repos/builtin/packages/setserial/package.py +++ b/var/spack/repos/builtin/packages/setserial/package.py @@ -9,7 +9,7 @@ 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 d68814690a67af..4dff2c389875d6 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 88fd3e8ff62dbd..d7a6f00e9b69e4 100644 --- a/var/spack/repos/builtin/packages/sfcgal/package.py +++ b/var/spack/repos/builtin/packages/sfcgal/package.py @@ -34,6 +34,8 @@ class Sfcgal(CMakePackage): 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: # Ref: https://gitlab.com/sfcgal/SFCGAL/-/blob/v1.5.1/NEWS?ref_type=tags diff --git a/var/spack/repos/builtin/packages/sfcio/package.py b/var/spack/repos/builtin/packages/sfcio/package.py index 598859b828212f..afe4ed84c7f0e9 100644 --- a/var/spack/repos/builtin/packages/sfcio/package.py +++ b/var/spack/repos/builtin/packages/sfcio/package.py @@ -22,9 +22,9 @@ class Sfcio(CMakePackage): version("1.4.2", sha256="bfde52320b836886a766ff8d0d6707b8a533c903b947f8b49250c544aaccaaac") version("1.4.1", sha256="d9f900cf18ec1a839b4128c069b1336317ffc682086283443354896746b89c59") - variant("pfunit", default=False, description="Add pfunit dependency to enable testing") + depends_on("fortran", type="build") - depends_on("pfunit", when="+pfunit") + depends_on("pfunit", type="test") conflicts("%oneapi", when="@:1.4.1", msg="Requires @1.4.2: for Intel oneAPI") diff --git a/var/spack/repos/builtin/packages/sga/package.py b/var/spack/repos/builtin/packages/sga/package.py index f99cf55c9718e1..3a6802f85c4350 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 c7eb4177c0abe9..367547e8b932b4 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 @@ -188,5 +191,4 @@ def install_args(self, spec, prefix): @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 c6b1df9b8c9af8..95825c365625c1 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 42d5e950ac1e8f..2b6552061731c1 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 a10310cc6ab03c..756f7ea1e4cdce 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 730326f7fa2802..32b3165fe12415 100644 --- a/var/spack/repos/builtin/packages/shapemapper/package.py +++ b/var/spack/repos/builtin/packages/shapemapper/package.py @@ -31,6 +31,8 @@ class Shapemapper(CMakePackage): url="https://github.com/Weeks-UNC/shapemapper2/releases/download/2.1.5/shapemapper-2.1.5-source-only.tar.gz", ) + 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") 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 7da52d5052d61a..e19a5cded12a1f 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 fcec7ed1f1ff58..58eb5dcccec183 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 5ff617eebc655e..4338930e42120b 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 5b9351b2a4ecdd..27c06e4e024234 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 c56dac10cd14ea..2e67bfca1be3bd 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 95a8bcfebdfd2e..f8d0ffa7933196 100644 --- a/var/spack/repos/builtin/packages/sherpa/package.py +++ b/var/spack/repos/builtin/packages/sherpa/package.py @@ -6,7 +6,7 @@ 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 +22,21 @@ class Sherpa(AutotoolsPackage): license("GPL-3.0-only") + 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 +49,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 +63,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", @@ -160,11 +79,10 @@ class Sherpa(AutotoolsPackage): # Note that the delphes integration seems utterly broken: https://sherpa.hepforge.org/trac/ticket/305 # autotools dependencies are needed at runtime to compile processes - # at least as long as sherpa is an autotools package - depends_on("autoconf") - depends_on("automake") - depends_on("libtool") - depends_on("m4") + 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") @@ -184,10 +102,12 @@ 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") @@ -209,6 +129,42 @@ def patch(self): 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") @@ -223,18 +179,13 @@ def configure_args(self): 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")) @@ -254,20 +205,6 @@ def configure_args(self): 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) - - # This may not be needed when this package is changed to be a CMake package - # since it's specific to makelibs def install(self, spec, prefix): # Make sure the path to the provided libtool is used instead of the system one filter_file( diff --git a/var/spack/repos/builtin/packages/shocklibs/package.py b/var/spack/repos/builtin/packages/shocklibs/package.py index 079f3d6e497619..79fc07ae21a910 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 be2c189b4f2387..6eae1ff1fba985 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 794ed08ae67f82..77793004157c17 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 6bfdb4e0504741..2213eca0825790 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 ee1697dacd04c0..eab7201a424b0e 100644 --- a/var/spack/repos/builtin/packages/shuffile/package.py +++ b/var/spack/repos/builtin/packages/shuffile/package.py @@ -19,12 +19,15 @@ 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") # generated + depends_on("mpi") depends_on("kvtree+mpi") depends_on("zlib-api", type="link") @@ -44,8 +47,5 @@ def cmake_args(self): 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 index 6a6f79a957cd85..3c638453f0fd3a 100644 --- a/var/spack/repos/builtin/packages/sicer2/package.py +++ b/var/spack/repos/builtin/packages/sicer2/package.py @@ -16,6 +16,8 @@ class Sicer2(PythonPackage): 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 ad0db8556895ff..f4706dc67b6cd5 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 68ab4de4efebd0..32ecbb9458b02b 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 aa41d69581b9ed..e70f2f9617a50b 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,210 @@ def flag_handler(self, name, flags): 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 + ) + ) + libs_arg.append( + "-L{0}/lib -lhdf5_fortran -lhdf5".format(spec["hdf5"].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 d485cd9f831eb6..375f7c3c37ff63 100644 --- a/var/spack/repos/builtin/packages/sigcpp/package.py +++ b/var/spack/repos/builtin/packages/sigcpp/package.py @@ -21,6 +21,8 @@ class Sigcpp(CMakePackage): 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 f84038a08821dd..305f0e9958bc2d 100644 --- a/var/spack/repos/builtin/packages/sigio/package.py +++ b/var/spack/repos/builtin/packages/sigio/package.py @@ -22,9 +22,7 @@ class Sigio(CMakePackage): version("2.3.3", sha256="2b4a04be3be10f222d0ff47f973f65a03b8b5521dcad8e8866f3bfe4e8dfafab") version("2.3.2", sha256="333f3cf3a97f97103cbafcafc2ad89b24faa55b1332a98adc1637855e8a5b613") - variant("pfunit", default=False, description="Use pFunit to enable unit testing") - - depends_on("pfunit", when="+pfunit") + depends_on("fortran", type="build") conflicts("%oneapi", when="@:2.3.2", msg="Requires @2.3.3: for Intel OneAPI") diff --git a/var/spack/repos/builtin/packages/signify/package.py b/var/spack/repos/builtin/packages/signify/package.py index 5c7e6c37c1241a..d63eed1060a372 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/package.py b/var/spack/repos/builtin/packages/silo/package.py index 435255a4dea5cf..3416a5c6108a23 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 @@ def flag_handler(self, name, flags): # 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 @@ def force_autoreconf(self): 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 becbbdea6e8b33..17cd3a66fab24b 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 d164029b39960f..a7d7b7de872e67 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/simple-dftd3/package.py b/var/spack/repos/builtin/packages/simple-dftd3/package.py index dda976818a48d9..e79bf2f9a2bffd 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 edae6d58e48f5e..9699d1bd52f05c 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 c60d3c1fe82199..8cdce1904a6ab4 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 a415be56c79745..b8eda857f53930 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 0ca06958f0136f..04b3efd8c1ecef 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 1131cfba3a0398..fd46c1e1e0763d 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 45970a4f5c09dc..ef5c5711184929 100644 --- a/var/spack/repos/builtin/packages/singularity-eos/package.py +++ b/var/spack/repos/builtin/packages/singularity-eos/package.py @@ -66,6 +66,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 3cd875286a5456..9780439e871dfe 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 317c3ac8278b32..b5b6c4895059d5 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 a85c45ba403e51..08630bf7512a83 100644 --- a/var/spack/repos/builtin/packages/singularityce/package.py +++ b/var/spack/repos/builtin/packages/singularityce/package.py @@ -113,6 +113,11 @@ def fix_mksquashfs_path(self): "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 @@ -218,3 +223,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 972f6821076d2f..c549311fa185f8 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 c329066b0eaa7d..b69e418f4454d3 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 8259f358c37cdc..02f547a0821860 100644 --- a/var/spack/repos/builtin/packages/sirius/package.py +++ b/var/spack/repos/builtin/packages/sirius/package.py @@ -23,6 +23,8 @@ 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") @@ -82,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") @@ -155,7 +160,8 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage): depends_on("spla@1.1.0:") depends_on("spla+cuda", when="+cuda") depends_on("spla+rocm", when="+rocm") - depends_on("spla+openmp", when="+openmp") + # 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") diff --git a/var/spack/repos/builtin/packages/skopeo/package.py b/var/spack/repos/builtin/packages/skopeo/package.py index 218b98bfc3a989..3603636b625ad6 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 8061eb601ea5b7..69c57f8390b6a4 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 3da247a8e2dca8..cd21296584bc09 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/package.py b/var/spack/repos/builtin/packages/slate/package.py index c4b59bcac1615e..9a89c50bcc0ecc 100644 --- a/var/spack/repos/builtin/packages/slate/package.py +++ b/var/spack/repos/builtin/packages/slate/package.py @@ -26,6 +26,9 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") version("master", branch="master") + version( + "2024.05.31", sha256="9c5d4d6779d8935b6fe41031b46e11ab92102f13c5f684022287c8616661b775" + ) version( "2023.11.05", sha256="d3d925adec137ef4b7d876b2d7d0f8f2ff9d8485fa4125454a42f5da4ac026f3" ) @@ -51,6 +54,10 @@ 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( @@ -63,7 +70,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") @@ -82,6 +89,7 @@ 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.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:") @@ -97,6 +105,8 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage): 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) @@ -128,10 +138,8 @@ def cmake_args(self): 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) @@ -150,7 +158,7 @@ def cache_test_sources(self): 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] @@ -161,25 +169,26 @@ def mpi_launcher(self): 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") + 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 " 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 55854015aa1ee1..ccbce0473aafc9 100644 --- a/var/spack/repos/builtin/packages/sleef/package.py +++ b/var/spack/repos/builtin/packages/sleef/package.py @@ -10,7 +10,7 @@ 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.6.tar.gz" + url = "https://github.com/shibatch/sleef/archive/3.7.tar.gz" git = "https://github.com/shibatch/sleef.git" maintainers("blapie") @@ -18,8 +18,13 @@ class Sleef(CMakePackage): license("BSL-1.0") version("master", branch="master") - version("3.6", commit="a99491afee2bae0b11e9ffbf3211349f43a5fd10", preferred=True) - 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_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" @@ -37,14 +42,16 @@ class Sleef(CMakePackage): deprecated=True, ) version( - "3.2_2018-05-09", commit="6ff7a135a1e31979d1e1844a2e7171dfbd34f54f", deprecated=True + "3.2.0_2018-05-09", commit="6ff7a135a1e31979d1e1844a2e7171dfbd34f54f", deprecated=True ) # py-torch@0.4.1:1.0 version( - "3.2", + "3.2.0", sha256="3130c5966e204e6d6a3ace81e543d12b5b21f60897f1c185bfa587c1bd77bee2", deprecated=True, ) + depends_on("c", type="build") + generator("ninja") depends_on("cmake@3.18:", type="build") @@ -64,7 +71,10 @@ def sleef_define(self, cmake_var, value): return self.define(cmake_var, value) def cmake_args(self): - args = [self.sleef_define("BUILD_TESTS", self.run_tests)] + 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"): diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py index 64033b66707d68..019f676696b96a 100644 --- a/var/spack/repos/builtin/packages/slepc/package.py +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -22,6 +22,10 @@ class Slepc(Package, CudaPackage, ROCmPackage): test_requires_compiler = True version("main", branch="main") + 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") @@ -58,6 +62,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") @@ -68,6 +76,7 @@ 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.22", "3.21", "3.20", "3.19", diff --git a/var/spack/repos/builtin/packages/slirp4netns/package.py b/var/spack/repos/builtin/packages/slirp4netns/package.py index 83e97fcc5b3980..b799b7fa102cc4 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 ace22a2d3d0726..fbd2cd8a00579a 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 c240de83291d9c..26c0fecbaefbb5 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 058bcf9adac0a9..d3f475af008d78 100644 --- a/var/spack/repos/builtin/packages/slurm/package.py +++ b/var/spack/repos/builtin/packages/slurm/package.py @@ -122,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 4890f6d867419a..2a2b9ee11dabef 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 2a933fdf0c36e3..47206e5170dffa 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 a8fa3cde213d3c..7edcb317f381dd 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 649aa609aa4058..e8bf872248afe8 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 1c9d463ea60abb..81d2530895549f 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 f0f86277316cc7..501c0076b638f3 100644 --- a/var/spack/repos/builtin/packages/snakemake/package.py +++ b/var/spack/repos/builtin/packages/snakemake/package.py @@ -10,11 +10,12 @@ class Snakemake(PythonPackage): """Workflow management system to create reproducible and scalable data analyses.""" homepage = "https://snakemake.readthedocs.io/en" - pypi = "snakemake/snakemake-8.4.12.tar.gz" - maintainers("marcusboden") + 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") @@ -59,20 +60,42 @@ class Snakemake(PythonPackage): 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@3:6", type=("build", "run"), when="@8.4.12:") + + 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-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@8.1.3:8", type=("build", "run"), when="@8:" + "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")) @@ -130,5 +153,6 @@ class Snakemake(PythonPackage): ) 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 03fed202d81a16..4fa5f6a9e01e5a 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 1887b94da563f8..92089ca03eabf0 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 1c26c4a03c8a72..7ecaf3af9fbb1c 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 796ea1af8493ed..be67125417f2e6 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 3671cda0640999..f01017d4f5e622 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 2c8e4d65c536a6..c9033e53f76202 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 975cf0b0f669f5..4a8c05f408d3fc 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 1795b605e7f718..8146c3558c1d7f 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 b57bc0e2cd8a66..33c7d269d3ce65 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 201506ba90c071..364f0b261078c9 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 6b19b479a613e8..1d6873fa9b6039 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 ef165f41953dff..a6506b78d2453a 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 758b5c3583e157..7269cf13b6a5ad 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/sollya/package.py b/var/spack/repos/builtin/packages/sollya/package.py index f146d78900554a..5e1af4fdde51ca 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 5b7ff248e79598..532b5dfc65ae66 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 da9be147fa448b..cda1c6eb788151 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 4fcde4280dc817..5e900524f3cc16 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 7c31f41883bde3..eaacf8e9429a95 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 00000000000000..754cf8b0a32b84 --- /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/sortmerna/package.py b/var/spack/repos/builtin/packages/sortmerna/package.py index 11213ac876187d..f174b2cb4783da 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/sosflow/package.py b/var/spack/repos/builtin/packages/sosflow/package.py index 0551a3bd6aab96..709d1374a6abc5 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 c4fdf0f0c294e9..8ac6ef672fc107 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 102fc499ee5aaa..abcf9f60c37eaf 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 @@ def install(self, spec, prefix): 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 bafdfb148863f5..e0428b7e7323d5 100644 --- a/var/spack/repos/builtin/packages/sowing/package.py +++ b/var/spack/repos/builtin/packages/sowing/package.py @@ -23,5 +23,9 @@ class Sowing(AutotoolsPackage): 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 f3f74d329970be..f21c34222cc03d 100644 --- a/var/spack/repos/builtin/packages/sox/package.py +++ b/var/spack/repos/builtin/packages/sox/package.py @@ -9,11 +9,13 @@ 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 cc20911c3418db..4f19b1944a4847 100644 --- a/var/spack/repos/builtin/packages/sp/package.py +++ b/var/spack/repos/builtin/packages/sp/package.py @@ -22,6 +22,8 @@ class Sp(CMakePackage): 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("pic", default=True, description="Build with position-independent-code") variant("openmp", default=False, description="Use OpenMP threading") diff --git a/var/spack/repos/builtin/packages/spack/package.py b/var/spack/repos/builtin/packages/spack/package.py index 2be50b2314c9c4..ca4d8b7e6ba152 100644 --- a/var/spack/repos/builtin/packages/spack/package.py +++ b/var/spack/repos/builtin/packages/spack/package.py @@ -42,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", @@ -115,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 d5cbb114392c64..7ce989fb6b5374 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 0ea94646d69362..f256873a2ba2f0 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 faf15b8398c4d4..46e3551604778e 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 249d8e12fb78d1..0abf013b726b80 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 c1d7313076b65c..6181c8702ce13b 100644 --- a/var/spack/repos/builtin/packages/sparse/package.py +++ b/var/spack/repos/builtin/packages/sparse/package.py @@ -10,8 +10,8 @@ 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 77559709326968..1be4970216f084 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 67d3741712e88f..5792c22417738c 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 059779186389cf..4a73b6705bc846 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 62cac22998c280..c25b74b58ec82c 100644 --- a/var/spack/repos/builtin/packages/spath/package.py +++ b/var/spack/repos/builtin/packages/spath/package.py @@ -19,12 +19,15 @@ 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") # generated + depends_on("zlib-api", type="link", when="@:0.0.2") variant("mpi", default=True, description="Build with MPI support") @@ -41,8 +44,5 @@ def cmake_args(self): 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 index 3bfd1b4e61db7e..38dee9dae61977 100644 --- a/var/spack/repos/builtin/packages/spatialdata/package.py +++ b/var/spack/repos/builtin/packages/spatialdata/package.py @@ -31,6 +31,8 @@ class Spatialdata(AutotoolsPackage): 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", diff --git a/var/spack/repos/builtin/packages/spdk/package.py b/var/spack/repos/builtin/packages/spdk/package.py index d4766691db68cd..6c6f71af5f3f98 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 ca3af5887bc7e7..f812cc1613506f 100644 --- a/var/spack/repos/builtin/packages/spdlog/package.py +++ b/var/spack/repos/builtin/packages/spdlog/package.py @@ -50,6 +50,8 @@ 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+)") depends_on("cmake@3.2:", when="@:1.7.0", type="build") diff --git a/var/spack/repos/builtin/packages/specfem3d-globe/package.py b/var/spack/repos/builtin/packages/specfem3d-globe/package.py index 937975855c08c6..2c1bd39c21a744 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 5288beecfe5b65..66f2dc2e0e0f4b 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 e148c7d84f78d3..40282f7d5a4308 100644 --- a/var/spack/repos/builtin/packages/spectre/package.py +++ b/var/spack/repos/builtin/packages/spectre/package.py @@ -31,6 +31,24 @@ class Spectre(CMakePackage): license("MIT") version("develop", branch="develop") + 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" ) @@ -119,6 +137,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", diff --git a/var/spack/repos/builtin/packages/spectrum-mpi/package.py b/var/spack/repos/builtin/packages/spectrum-mpi/package.py index eeb878b8768bde..9c06900e6a7983 100644 --- a/var/spack/repos/builtin/packages/spectrum-mpi/package.py +++ b/var/spack/repos/builtin/packages/spectrum-mpi/package.py @@ -20,6 +20,8 @@ class SpectrumMpi(BundlePackage): provides("mpi") + requires("platform=linux") + executables = ["^ompi_info$"] @classmethod diff --git a/var/spack/repos/builtin/packages/speex/package.py b/var/spack/repos/builtin/packages/speex/package.py index 63867eca451957..e031643acbb7bb 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 8e5ebd571cc0e6..8d83eb28a5c02a 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 7b8cc77f4cab18..b8f0543006a920 100644 --- a/var/spack/repos/builtin/packages/sperr/package.py +++ b/var/spack/repos/builtin/packages/sperr/package.py @@ -26,6 +26,9 @@ class Sperr(CMakePackage): 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/spglib/package.py b/var/spack/repos/builtin/packages/spglib/package.py index 62cf6debabf71f..b918fab2d0c073 100644 --- a/var/spack/repos/builtin/packages/spglib/package.py +++ b/var/spack/repos/builtin/packages/spglib/package.py @@ -20,6 +20,8 @@ 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") @@ -52,6 +54,10 @@ 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:") diff --git a/var/spack/repos/builtin/packages/sph2pipe/package.py b/var/spack/repos/builtin/packages/sph2pipe/package.py index 562ac4b553e356..6e61c2cc9d177d 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 c2931c51e51328..82d40378ec7a38 100644 --- a/var/spack/repos/builtin/packages/spherepack/package.py +++ b/var/spack/repos/builtin/packages/spherepack/package.py @@ -10,14 +10,16 @@ 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 b1b2e1e526504b..d20ed13e560cdf 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 485387254b744f..7b065d482bd1b0 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 979b705a4d4a38..5ac50c06e60084 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 cc380f8078133c..7bcaa1a69f6837 100644 --- a/var/spack/repos/builtin/packages/spiral-software/package.py +++ b/var/spack/repos/builtin/packages/spiral-software/package.py @@ -26,6 +26,8 @@ class SpiralSoftware(CMakePackage): version("8.4.0", sha256="d0c58de65c678130eeee6b8b8b48061bbe463468990f66d9b452225ce46dee19") version("8.3.0", sha256="41cf0e7f14f9497e98353baa1ef4ca6204ce5ca525db8093f5bb44e89992abdf") + depends_on("c", type="build") # generated + extendable = True # No dependencies. Spiral pacakges are listed here as variants. If a @@ -71,6 +73,11 @@ def spiral_package_install(self, spec, prefix, pkg): 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 417b96af573f28..bd81ac3b0add5e 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,10 +57,15 @@ 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 ^[virtuals=blas] openblas") @@ -67,30 +78,36 @@ class Spla(CMakePackage): 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 223035eb56bbc4..776e744bdf8b38 100644 --- a/var/spack/repos/builtin/packages/spot/package.py +++ b/var/spack/repos/builtin/packages/spot/package.py @@ -16,6 +16,7 @@ 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") @@ -23,6 +24,9 @@ class Spot(AutotoolsPackage): 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 4c014a3b8ad10e..44d871a0094d59 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 52887ccff05e37..221393e1b6e259 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 b39bdea8947d4e..a403288030fd75 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 09d6f5c1f0a0fc..57f1272801ca1f 100644 --- a/var/spack/repos/builtin/packages/sqlite/package.py +++ b/var/spack/repos/builtin/packages/sqlite/package.py @@ -23,6 +23,10 @@ class Sqlite(AutotoolsPackage, NMakePackage): 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") @@ -50,11 +54,13 @@ class Sqlite(AutotoolsPackage, NMakePackage): 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", "cray", "freebsd"]: + for plat in ["linux", "darwin", "freebsd"]: variant( "column_metadata", default=True, @@ -178,11 +184,13 @@ def query_fts(version): 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" @@ -205,12 +213,13 @@ def url_for_version(self, version): 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 test_example(self): """check example table dump""" @@ -271,7 +280,7 @@ def build_libsqlitefunctions(self): 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", diff --git a/var/spack/repos/builtin/packages/sqlitebrowser/package.py b/var/spack/repos/builtin/packages/sqlitebrowser/package.py index 1b23b7f7d436b2..bd5c82f0e5b365 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 b90f3f5a6d1522..e1f9deb2957d7c 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 73d37fab5b9a93..595da9a5cb43df 100644 --- a/var/spack/repos/builtin/packages/squashfs/package.py +++ b/var/spack/repos/builtin/packages/squashfs/package.py @@ -9,7 +9,7 @@ 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 0c1ce20c62837a..39b5e4f60ad60d 100644 --- a/var/spack/repos/builtin/packages/squashfuse/package.py +++ b/var/spack/repos/builtin/packages/squashfuse/package.py @@ -18,6 +18,8 @@ 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") @@ -29,6 +31,8 @@ class Squashfuse(AutotoolsPackage): 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") diff --git a/var/spack/repos/builtin/packages/squid/package.py b/var/spack/repos/builtin/packages/squid/package.py index 87b89b53223a73..b54a346e274872 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 19461f17d42ed0..7ae214e1da9fa0 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 4dcf19637bde9e..ec2225bc84496e 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 ceae7cb7de9fc4..c7030d413b9e8d 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 00000000000000..64be41841dd278 --- /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 9ac1f23a12a660..4535f5a3dbecbc 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 36dc287f873d5b..ff85c913711733 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 bd8250dc6f6636..989ddcd40dd18e 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 d71bfab09f05cf..76bb77cfcb6055 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 282a35146a915e..24bc2d0bc0ad4e 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 7f512e7cd919a3..a9fa676e16b9ce 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, diff --git a/var/spack/repos/builtin/packages/sst-dumpi/package.py b/var/spack/repos/builtin/packages/sst-dumpi/package.py index c53e0cd97709e0..fd4cee80038bfc 100644 --- a/var/spack/repos/builtin/packages/sst-dumpi/package.py +++ b/var/spack/repos/builtin/packages/sst-dumpi/package.py @@ -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 93f621c60702bf..35eaa739f172d5 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 diff --git a/var/spack/repos/builtin/packages/sst-macro/package.py b/var/spack/repos/builtin/packages/sst-macro/package.py index c04358ab06bea0..f5e57db7c00814 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,6 +44,10 @@ class SstMacro(AutotoolsPackage): version("master", branch="master") version("develop", branch="devel") + 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)) diff --git a/var/spack/repos/builtin/packages/sst-transports/package.py b/var/spack/repos/builtin/packages/sst-transports/package.py index a3d84df8188c3a..04425eac728e2b 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 8fed579fd7bffb..74279d07283e4d 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 18531e0a7f00e8..36bd498913f067 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 c72e1c09642b46..be17fbfc14a6bf 100644 --- a/var/spack/repos/builtin/packages/star/package.py +++ b/var/spack/repos/builtin/packages/star/package.py @@ -14,6 +14,7 @@ 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") @@ -36,10 +37,15 @@ 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" def edit(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/starlight/package.py b/var/spack/repos/builtin/packages/starlight/package.py index b9b11bc3300846..2ce197cf6e53df 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 b7ee862d82f3b5..8fcc35dd124102 100644 --- a/var/spack/repos/builtin/packages/starpu/package.py +++ b/var/spack/repos/builtin/packages/starpu/package.py @@ -30,6 +30,8 @@ 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") @@ -65,6 +67,10 @@ class Starpu(AutotoolsPackage): 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") variant("debug", default=False, description="Enable debug symbols") diff --git a/var/spack/repos/builtin/packages/startup-notification/package.py b/var/spack/repos/builtin/packages/startup-notification/package.py index 6ec0622e0f3e6d..a4d228ef06522e 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 fab3a29213a582..2d089b38ef99e4 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 f2e75c06b232e0..00000000000000 --- 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 75ab2ee83711a8..b5283aceb6fe34 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 2d17bb1626faf3..464dfa911782d9 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@: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 c673133d67055a..99f8c0306d290c 100644 --- a/var/spack/repos/builtin/packages/steps/package.py +++ b/var/spack/repos/builtin/packages/steps/package.py @@ -21,6 +21,8 @@ class Steps(CMakePackage): 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", diff --git a/var/spack/repos/builtin/packages/stinger/package.py b/var/spack/repos/builtin/packages/stinger/package.py index 8f11bf8429bd9c..0ae1fd5173317e 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 d18dfd853e5b80..2e7a971b6b9d72 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 cec0871bd52a69..180c69920beedd 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 9870692bccd01d..8a615b2bdb5848 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 842a9b2e8a8875..f10b894b85212f 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 ec7859d3c99f4a..531aa8ec868289 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 84191c6c06426d..27ad1f603f39d0 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 1f93927eb02b8f..261ba49a15e68f 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 13428929af2724..566fce744fb227 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/structure/package.py b/var/spack/repos/builtin/packages/structure/package.py index 6620fc0536b84c..90ffb21a85e548 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 348a74947e05b5..cb1428dcff8a0b 100644 --- a/var/spack/repos/builtin/packages/strumpack/package.py +++ b/var/spack/repos/builtin/packages/strumpack/package.py @@ -3,10 +3,13 @@ # # 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 +from spack.util.executable import ProcessError class Strumpack(CMakePackage, CudaPackage, ROCmPackage): @@ -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( @@ -177,7 +184,13 @@ def cmake_args(self): 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 +204,14 @@ def test_data_dir(self): 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 +222,43 @@ def _test_example(self, test_prog, test_dir, test_cmd, test_args): "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.builder.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 28b888fc594be5..4b0d056ae75cf3 100644 --- a/var/spack/repos/builtin/packages/su2/package.py +++ b/var/spack/repos/builtin/packages/su2/package.py @@ -38,6 +38,13 @@ class Su2(MesonPackage): version("7.0.0", sha256="6207dcca15eaebc11ce12b2866c937b4ad9b93274edf6f23d0487948ac3963b8") version("6.2.0", sha256="ffc953326e8432a1a6534556a5f6cf086046d3149cfcec6b4e7390eebe30ce2e") + # @:7 is missing few 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") @@ -56,6 +63,8 @@ class Su2(MesonPackage): 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") @@ -65,14 +74,12 @@ class Su2(MesonPackage): depends_on("openblas", when="+openblas ~mkl") depends_on("cmake", type="build", when="+mpp") - depends_on("codipack@:1.9.3", when="+autodiff") - depends_on("codipack@:1.9.3", when="+directdiff") - depends_on("medipack", when="+autodiff +mpi") - depends_on("medipack", when="+directdiff +mpi") + 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") - depends_on("opdilib", when="+directdiff +openmp") - depends_on("codipack@openmp", when="+autodiff +openmp") - depends_on("codipack@openmp", when="+directdiff +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. @@ -89,17 +96,13 @@ def patch(self): "meson.build", ) - if ( - self.spec.satisfies("+autodiff") or self.spec.satisfies("+directdiff") - ) and self.spec.satisfiles("+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("+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") or self.spec.satisfies("+directdiff") - ) and self.spec.satisfies("+openmp"): + if self.spec.satisfies("+autodiff") and self.spec.satisfies("+openmp"): filter_file( "externals/opdi/include", self.spec["opdilib"].prefix.include, "meson.build" ) @@ -109,6 +112,13 @@ def patch(self): "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), @@ -119,16 +129,39 @@ def meson_args(self): "-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/subread/package.py b/var/spack/repos/builtin/packages/subread/package.py index bc5b2b8c4df4cb..7ab7f678c52413 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 5bc6d732368db2..a60cbc6912bd29 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 a691271f4c712c..8b72df6f2dbeb3 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,7 @@ 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") @@ -41,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, @@ -120,36 +127,48 @@ def symbol_suffix_blas(self, spec, args): 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. @@ -171,23 +190,24 @@ def install(self, spec, prefix): # 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 @@ -196,7 +216,7 @@ def install(self, spec, prefix): # 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 ( @@ -222,28 +242,52 @@ def install(self, spec, prefix): # 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 - + " -DBLAS_ROOT=%s" % spec["blas"].prefix - + " -DLAPACK_ROOT=%s" % spec["lapack"].prefix + cmake_args = [ + 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 - + " -DBLAS_LIBRARIES=%s" % spec["blas"].libs - + " -DLAPACK_LIBRARIES=%s" % spec["lapack"].libs + 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 = [ @@ -277,6 +321,16 @@ def install(self, spec, prefix): 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, '/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: @@ -309,5 +363,10 @@ def libs(self): 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 a8b49d2e7579e4..e67d61d219d5d0 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/package.py b/var/spack/repos/builtin/packages/sundials/package.py index ce4ac7afef164f..5be35b6bb04bb6 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,7 @@ 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") @@ -63,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 # ========================================================================== @@ -198,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") @@ -223,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") @@ -284,6 +285,10 @@ 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") @@ -340,7 +345,7 @@ def cmake_args(self): args.extend( [ define("SUNDIALS_INDEX_SIZE", intsize), - define("SUNDIALS_INDEX_TYPE", "int{}_t".format(intsize)), + define("SUNDIALS_INDEX_TYPE", f"int{intsize}_t"), ] ) @@ -666,7 +671,7 @@ def filter_compilers(self): 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", @@ -736,119 +741,95 @@ def libs(self): @run_after("install") @on_package_attributes(run_tests=True) - def test_install(self): - """Perform make test_install.""" - with working_dir(self.build_directory): + def check_test_install(self): + """Perform test_install on the build.""" + with working_dir(self.builder.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 00000000000000..c4092c9385340a --- /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 e1cbcf3c7a320b..6d874bfd6f47d4 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 e4ccfe3665623d..1440da388a4b66 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -45,6 +45,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 +97,8 @@ def append_from_variant(*args): 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 +169,7 @@ def flag_handler(self, name, flags): 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 788500d536d05b..46786c508fe7e9 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 @@ def install(self, spec, prefix): # 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 b9ec27fee0654f..6a62ae9e1744c4 100644 --- a/var/spack/repos/builtin/packages/superlu/package.py +++ b/var/spack/repos/builtin/packages/superlu/package.py @@ -42,6 +42,9 @@ class Superlu(CMakePackage, Package): 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" ) @@ -113,7 +116,7 @@ def setup_standalone_tests(self): 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""" 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 00000000000000..23baff3c02b579 --- /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 5ad6e6bb6c4fd1..1de6c410db8a2a 100644 --- a/var/spack/repos/builtin/packages/survey/package.py +++ b/var/spack/repos/builtin/packages/survey/package.py @@ -27,7 +27,7 @@ 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") diff --git a/var/spack/repos/builtin/packages/sw4/package.py b/var/spack/repos/builtin/packages/sw4/package.py index a277513d66d991..32515f119966be 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 @@ def edit(self, spec, prefix): 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 e510cb90f331bc..d88c7bf1f1bff7 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 ef7c2eb7d813ad..56c31d94391500 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 9bcc5b9b2771dd..7837296ff43024 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 ecf06eb8d3cabb..8fbdc29189256e 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 5bb38e1bebcbd5..a92e992a74ed7f 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 46c35b0004a1e4..8e2230f1762e04 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") diff --git a/var/spack/repos/builtin/packages/swipl/package.py b/var/spack/repos/builtin/packages/swipl/package.py index 3d4db45c9c5a27..3942c0ceb8063b 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 68f45f6139700f..e46081268862f1 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 5d5f8cef227a4b..b6ba210f1df785 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 index 7796aa224678ba..211265ab01a693 100644 --- a/var/spack/repos/builtin/packages/sympack/package.py +++ b/var/spack/repos/builtin/packages/sympack/package.py @@ -22,6 +22,9 @@ class Sympack(CMakePackage, CudaPackage): 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:") diff --git a/var/spack/repos/builtin/packages/sympol/package.py b/var/spack/repos/builtin/packages/sympol/package.py index 45511c400e998d..325d8e1317874b 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 c96dd329a39d0a..6318c11868e07e 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 b1843bf49d9cb4..768220ea9b908e 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 eb59fef8c4a262..c266720811ace4 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 b2267ef7218d67..99a372849790c4 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 bbad2d22448e45..afb5106025618a 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 e4fab86b95cfd7..16940d34121c61 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 403bbf28a224f9..89ed1c6bec5ce9 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 index 0853facc595dbc..16f07dca8314c6 100644 --- a/var/spack/repos/builtin/packages/systemd/package.py +++ b/var/spack/repos/builtin/packages/systemd/package.py @@ -17,8 +17,11 @@ class Systemd(MesonPackage): 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") diff --git a/var/spack/repos/builtin/packages/systemtap/package.py b/var/spack/repos/builtin/packages/systemtap/package.py index 8e5a3184489786..e7132981cf337e 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 f59ea178fcb271..c76174fb4e9aeb 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 30c9faa74fbeee..092768669e9315 100644 --- a/var/spack/repos/builtin/packages/sz/package.py +++ b/var/spack/repos/builtin/packages/sz/package.py @@ -46,12 +46,17 @@ 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") + 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 +87,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 +100,69 @@ def setup_run_environment(self, env): 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 +191,8 @@ def cmake_args(self): 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 9e94f347059d2f..9a1e3a0d0fbb22 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 @@ def cmake_args(self): 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 02c19e38bf5fd1..b470291068ff26 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 00000000000000..9d05663fceb0ed --- /dev/null +++ b/var/spack/repos/builtin/packages/szx/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 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 79f3b07930c7d9..dce76b118d56f7 100644 --- a/var/spack/repos/builtin/packages/t8code/package.py +++ b/var/spack/repos/builtin/packages/t8code/package.py @@ -20,8 +20,15 @@ class T8code(AutotoolsPackage): 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 @@ def configure_args(self): # 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 7ae1e07804c4eb..5f3c28f7d4aad5 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 d98e7d01ce5521..56c4d7e6eed858 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 2235cecc7be03c..58fda93013561b 100644 --- a/var/spack/repos/builtin/packages/talloc/package.py +++ b/var/spack/repos/builtin/packages/talloc/package.py @@ -21,5 +21,7 @@ class Talloc(AutotoolsPackage): 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 298287e463b98d..8e742a2a99171a 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 @@ def build_args(self, spec, prefix): 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 00000000000000..11a288ed164d00 --- /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::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, MPI_CXX_DOUBLE_COMPLEX); ++TYPE(::thrust::complex, 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::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 { \ +- 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 { \ +- 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 b9cc617e0ef941..04bb2b915bf031 100644 --- a/var/spack/repos/builtin/packages/tandem/package.py +++ b/var/spack/repos/builtin/packages/tandem/package.py @@ -25,6 +25,9 @@ class Tandem(CMakePackage, CudaPackage, ROCmPackage): "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") @@ -42,6 +45,7 @@ class Tandem(CMakePackage, CudaPackage, ROCmPackage): 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") @@ -58,14 +62,35 @@ class Tandem(CMakePackage, CudaPackage, ROCmPackage): 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.14.6:3.18.5 +int64 +mumps +scalapack memalign=32 +cuda", when="+cuda") - depends_on("petsc@3.14.6:3.18.5 +int64 +mumps +scalapack memalign=32 +rocm", when="+rocm") + 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 4c0886d94c9ebc..b23d0cda0e793a 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 5e83af3d8b1cc6..5fadb4229baadc 100644 --- a/var/spack/repos/builtin/packages/tar/package.py +++ b/var/spack/repos/builtin/packages/tar/package.py @@ -28,6 +28,8 @@ class Tar(AutotoolsPackage, GNUMirrorPackage): version("1.29", sha256="cae466e6e58c7292355e7080248f244db3a4cf755f33f4fa25ca7f9a7ed09af0") version("1.28", sha256="6a6b65bac00a127a508533c604d5bf1a3d40f82707d56f20cefd38a05e8237de") + depends_on("c", type="build") # generated + # A saner default than gzip? variant( "zip", diff --git a/var/spack/repos/builtin/packages/task/package.py b/var/spack/repos/builtin/packages/task/package.py index b2220595194684..786127d604f046 100644 --- a/var/spack/repos/builtin/packages/task/package.py +++ b/var/spack/repos/builtin/packages/task/package.py @@ -19,6 +19,8 @@ class Task(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/taskflow/package.py b/var/spack/repos/builtin/packages/taskflow/package.py index 1e00312654a5b9..8be3f42b56f16d 100644 --- a/var/spack/repos/builtin/packages/taskflow/package.py +++ b/var/spack/repos/builtin/packages/taskflow/package.py @@ -18,9 +18,14 @@ 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") diff --git a/var/spack/repos/builtin/packages/tasmanian/package.py b/var/spack/repos/builtin/packages/tasmanian/package.py index c9285453f4dd9b..2d3ebc5fbc972d 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") @@ -119,7 +122,7 @@ def cmake_args(self): @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 1e7f02ae31427c..94d939c03fd6f5 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -56,6 +56,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": @@ -75,23 +79,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("rocprofv2", default=False, description="Activates ROCm rocprofiler 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, @@ -178,6 +198,9 @@ class Tau(Package): 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") @@ -197,25 +220,21 @@ def set_compiler_options(self, spec): # ('CC', 'CXX' and 'FC') # 4 - if no -cc= -cxx= is passed tau is built with # system compiler silently - # (regardless of what % 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()] ########## @@ -250,9 +269,6 @@ def install(self, spec, prefix): 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"): @@ -307,8 +323,8 @@ def install(self, spec, prefix): env["F77"] = spec["mpi"].mpif77 env["FC"] = spec["mpi"].mpifc if spec["mpi"].name == "intel-oneapi-mpi": - options.append("-mpiinc=%s" % spec["mpi"].package.component_prefix) - options.append("-mpilib=%s" % spec["mpi"].package.component_prefix) + 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) @@ -458,23 +474,23 @@ def setup_run_environment(self, env): 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) - self.cache_extra_test_sources(self.makefile_test) - self.cache_extra_test_sources(self.makefile_inc_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: - self.cache_extra_test_sources(self.dyninst_test) + cache_extra_test_sources(self, self.dyninst_test) if "+cuda" in self.spec: - self.cache_extra_test_sources(self.cuda_test) + cache_extra_test_sources(self, self.cuda_test) if "+level_zero" in self.spec: - self.cache_extra_test_sources(self.level_zero_test) + cache_extra_test_sources(self, self.level_zero_test) if "+rocm" in self.spec: - self.cache_extra_test_sources(self.rocm_test) + cache_extra_test_sources(self, self.rocm_test) if "+syscall" in self.spec: - self.cache_extra_test_sources(self.syscall_test) + cache_extra_test_sources(self, self.syscall_test) if "+ompt" in self.spec: - self.cache_extra_test_sources(self.ompt_test) + cache_extra_test_sources(self, self.ompt_test) if "+python" in self.spec: - self.cache_extra_test_sources(self.python_test) + 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) 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 00000000000000..0f863c6a9a445a --- /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 7275fb93583aed..93e41f380f003a 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/tblite/package.py b/var/spack/repos/builtin/packages/tblite/package.py index 52661f07449400..68cea15883f839 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 d7a42c60f8c099..0d33f8c973de7f 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 d0a0ccaa3d7f4e..5b0231c5833481 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 5d39a94ec79b6c..f52651a1cbd342 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 0d1dd1e8191af6..d95d80331e5c1c 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -52,13 +52,15 @@ class Tcl(AutotoolsPackage, NMakePackage, SourceforgePackage, TclHelper): 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") - # No compiler wrappers on Windows - for plat in ["linux", "darwin", "cray", "freebsd"]: - filter_compiler_wrappers("tclConfig.sh", relative_root="lib", when=f"platform={plat}") + 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") diff --git a/var/spack/repos/builtin/packages/tclap/package.py b/var/spack/repos/builtin/packages/tclap/package.py index a2ab335f318f64..cabbe44e5598b4 100644 --- a/var/spack/repos/builtin/packages/tclap/package.py +++ b/var/spack/repos/builtin/packages/tclap/package.py @@ -9,7 +9,7 @@ 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 1564b43ef891f8..c6cdbc2d9f8341 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 57c2a3f0dc2d40..de2b66e1354570 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 5196673c87dab7..2b8a1d9a6c8de4 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", diff --git a/var/spack/repos/builtin/packages/tdengine/package.py b/var/spack/repos/builtin/packages/tdengine/package.py index 6b6d5488873be1..e6760d3078ca72 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 64cd5a5db38759..443c8997334983 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): diff --git a/var/spack/repos/builtin/packages/teckit/package.py b/var/spack/repos/builtin/packages/teckit/package.py index ad918cfdb6e8c6..987d7feae9afcb 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 c11d28d9a1be44..ba5e2745bcdc9b 100644 --- a/var/spack/repos/builtin/packages/tecplot/package.py +++ b/var/spack/repos/builtin/packages/tecplot/package.py @@ -19,6 +19,11 @@ class Tecplot(Package): maintainers("LRWeber") + version( + "2024r1", + sha256="709022a5d5532d46a47cfa3bf0698a4ea8428c7a0dea2feb708a5add8091a8f0", + expand=False, + ) version( "2023r1", sha256="58e7f4de875e65047f4edd684013d0ff538df6246f00c059458989f281be4c93", diff --git a/var/spack/repos/builtin/packages/telegraf/package.py b/var/spack/repos/builtin/packages/telegraf/package.py index 92d4084bc05046..2523852bd48ccd 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/tempestremap/package.py b/var/spack/repos/builtin/packages/tempestremap/package.py index faf870e61fe018..5733663bbd4256 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 c2951943bad17e..ea41e74827c7be 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 2dc5b50a8529cc..5bf08fa5f81a65 100644 --- a/var/spack/repos/builtin/packages/templight/package.py +++ b/var/spack/repos/builtin/packages/templight/package.py @@ -61,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"), diff --git a/var/spack/repos/builtin/packages/tempo/package.py b/var/spack/repos/builtin/packages/tempo/package.py index 95215a857d0a2f..9b89bc8b06e4b7 100644 --- a/var/spack/repos/builtin/packages/tempo/package.py +++ b/var/spack/repos/builtin/packages/tempo/package.py @@ -9,15 +9,63 @@ 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 73412eb30d7585..23753d44f0b42f 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 38dd6e7fd2cb8e..5b63beeb16980d 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 e2e58e2efc87e8..efe9beb8ae40b3 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 58cf70e46605a6..d8b702aa3abd75 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 f74fdda513ddbe..7f8359f29713ce 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 921bc213c23ca5..194cfbfe13f64a 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 f002893c21c431..cbe7e75fc39bfd 100644 --- a/var/spack/repos/builtin/packages/testdfsio/package.py +++ b/var/spack/repos/builtin/packages/testdfsio/package.py @@ -10,9 +10,13 @@ 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 index e83d83ba363990..41a6274e7042cc 100644 --- a/var/spack/repos/builtin/packages/tests-sos/package.py +++ b/var/spack/repos/builtin/packages/tests-sos/package.py @@ -16,6 +16,10 @@ class TestsSos(AutotoolsPackage): 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") diff --git a/var/spack/repos/builtin/packages/testu01/package.py b/var/spack/repos/builtin/packages/testu01/package.py index be693dd6529496..b49fd5d16fdf1a 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 7faeedc9fe9317..ce56f975aee8b5 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 2698cde1c28110..028040d497edd7 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 bc1bc5b64be871..ae3cfc95822dc5 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 928a2a868050e3..7accb43e8e5aa9 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,27 +19,26 @@ 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", @@ -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 @@ def tex_arch(self): 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 @@ def configure_args(self): @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,45 +172,6 @@ def setup_build_environment(self, env): def setup_run_environment(self, env): env.prepend_path("PATH", join_path(self.prefix.bin, self.tex_arch())) - @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 @@ -230,15 +179,7 @@ def determine_version(cls, exe): # 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 a775f1688696df..c33575a8c2a20a 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 54658a61baeff1..fff741ef064db8 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 39d13b29cda0ef..901feee1abb77a 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") @@ -194,6 +206,9 @@ def cmake_args(self): 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 5d0d3caa9ba52e..ac3285a6cb4b86 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 e15de0489037c6..318049a1b349d0 100644 --- a/var/spack/repos/builtin/packages/thepeg/package.py +++ b/var/spack/repos/builtin/packages/thepeg/package.py @@ -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 421fc050281468..a6418a1cb1c1cb 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 efe7b935cb04d0..65cbf0ee7a0257 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 4ad8a10f1b0d97..14631e80bfa387 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") diff --git a/var/spack/repos/builtin/packages/thrust/package.py b/var/spack/repos/builtin/packages/thrust/package.py index ab37e4b347d446..5d70406dc68275 100644 --- a/var/spack/repos/builtin/packages/thrust/package.py +++ b/var/spack/repos/builtin/packages/thrust/package.py @@ -6,15 +6,22 @@ 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 +52,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 00000000000000..a1943bb91da8fe --- /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 00000000000000..9d1e4bd5178d74 --- /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 04f93a8ece8add..31da344e44323e 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 9b65bec94c77a1..9a2ea91555ce81 100644 --- a/var/spack/repos/builtin/packages/tiled-mm/package.py +++ b/var/spack/repos/builtin/packages/tiled-mm/package.py @@ -20,10 +20,13 @@ class TiledMm(CMakePackage, CudaPackage, ROCmPackage): 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 bb9be7139423fe..7e6e7d8578d5e1 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 2f9483160efbcb..09555fe7e4edf5 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 290a85bc9f042f..5ae88c6d466e80 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") diff --git a/var/spack/repos/builtin/packages/timew/package.py b/var/spack/repos/builtin/packages/timew/package.py index cc88fa2b11dfd6..aaf3318511d529 100644 --- a/var/spack/repos/builtin/packages/timew/package.py +++ b/var/spack/repos/builtin/packages/timew/package.py @@ -18,3 +18,5 @@ class Timew(CMakePackage): 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 5fdf47d9ae3c27..29b67ea32845d9 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 1d26543d8d547e..8d3bcb7f3b2a9f 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 00000000000000..cba0e2cb8b4df8 --- /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/tinygltf/package.py b/var/spack/repos/builtin/packages/tinygltf/package.py index 31f7e6581df17c..63c189c263432d 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 8f89fb0369edce..49743a4cb8d671 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 0818ef11a69044..3c6eb0eb1f8dd7 100644 --- a/var/spack/repos/builtin/packages/tinyxml2/package.py +++ b/var/spack/repos/builtin/packages/tinyxml2/package.py @@ -26,6 +26,8 @@ class Tinyxml2(CMakePackage): 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): diff --git a/var/spack/repos/builtin/packages/tioga/package.py b/var/spack/repos/builtin/packages/tioga/package.py index 6fdf41d141d7b7..62e3234ab11d9f 100644 --- a/var/spack/repos/builtin/packages/tioga/package.py +++ b/var/spack/repos/builtin/packages/tioga/package.py @@ -17,12 +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 420aa6cc643270..3a38b6971eec4e 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 6848c1adf46826..075509922b8e59 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 c6e74e1546b997..d30e4196122aa0 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( diff --git a/var/spack/repos/builtin/packages/tix/package.py b/var/spack/repos/builtin/packages/tix/package.py index c9513d5e9b6f9c..b92541ed07b228 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 @@ def darwin_fix(self): 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 269f1477f96135..41872d8ca1d54d 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 1b8f584b8c00c0..17b2250421c979 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 cf91fbf1a4a94b..bffc895b9e2615 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 b9a75f9703f1a1..4be634fdf2539b 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 aa99c471f3b9ab..0fa3d96bc4fef3 100644 --- a/var/spack/repos/builtin/packages/tmux/package.py +++ b/var/spack/repos/builtin/packages/tmux/package.py @@ -43,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" ) @@ -62,6 +64,12 @@ class Tmux(AutotoolsPackage): 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 00a70d38e02ad3..db140c2474b4a9 100644 --- a/var/spack/repos/builtin/packages/tnftp/package.py +++ b/var/spack/repos/builtin/packages/tnftp/package.py @@ -17,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 b3f69890ede536..0b11a910c69028 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 4a55fa0bb56bdb..544f5b420acf3f 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 35400e87101a33..79038f5c6b48e7 100644 --- a/var/spack/repos/builtin/packages/toml11/package.py +++ b/var/spack/repos/builtin/packages/toml11/package.py @@ -18,6 +18,9 @@ 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") @@ -32,11 +35,13 @@ class Toml11(CMakePackage): 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:3.8.1") + @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/tophat/package.py b/var/spack/repos/builtin/packages/tophat/package.py index a2083894dc5db7..ebf9794514457d 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 541eff259672e6..19f3f5fa717f68 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 ff20fe302f0ab3..6f44e97085da26 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 @@ def install(self, spec, prefix): # 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 1cbb0a75754423..bc3f80a1bdc8ab 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 a6e4e70c6d9c76..3bc8d4a8d696e3 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 3237119b8783d5..a1c0854166d3cd 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 fbb74fd7df4f34..e9102607c853b9 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 718949a66a4f55..627872ac675990 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 0a07f5c5703ee6..386f3f9cd5075a 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 7df51842e3d005..9215ef0574091f 100644 --- a/var/spack/repos/builtin/packages/transset/package.py +++ b/var/spack/repos/builtin/packages/transset/package.py @@ -9,7 +9,7 @@ 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 dc1fd2fce768e7..c6872b43a916a2 100644 --- a/var/spack/repos/builtin/packages/tree-sitter/package.py +++ b/var/spack/repos/builtin/packages/tree-sitter/package.py @@ -19,6 +19,10 @@ 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") @@ -32,5 +36,8 @@ class TreeSitter(MakefilePackage): 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 c3ee15474c9af1..d1ca6ccec376ef 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 @@ def cmake_args(self): 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 ac5e699057bf0b..c82ffcc120a376 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 e47b403096833f..540bd82eab225a 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 7d02ecce6b19f5..3efb595978ca4d 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 53839256f4f651..810763971ad074 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 891929bdb48647..5dd2a1f27099fd 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/cstdint_gcc13.patch b/var/spack/repos/builtin/packages/trilinos/cstdint_gcc13.patch new file mode 100644 index 00000000000000..671720903a2eea --- /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 + ++#include + #include + #include + +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 + #include + + /*! \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 + #include + + namespace Teuchos { diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index acdacddc6dbc9c..0669adff63415a 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -5,6 +5,7 @@ import os import pathlib +import re import sys from spack.build_environment import dso_suffix @@ -34,7 +35,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 +43,7 @@ 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") @@ -70,10 +72,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( @@ -377,9 +388,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") @@ -400,7 +408,8 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): # ###################### Dependencies ########################## # External Kokkos - depends_on("kokkos@4.3.00", when="@master: +kokkos") + depends_on("kokkos@4.4.01", when="@master: +kokkos") + depends_on("kokkos@4.3.01", when="@16.0.0 +kokkos") depends_on("kokkos@4.2.01", when="@15.1.0:15.1.1 +kokkos") depends_on("kokkos@4.1.00", when="@14.4.0:15.0.0 +kokkos") @@ -425,7 +434,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): 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") @@ -449,7 +458,7 @@ 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@3:5.2", when="@12.18.1: +superlu") depends_on("superlu@3:5.1.1", when="@12.14.1 +superlu") @@ -507,6 +516,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): "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( @@ -543,7 +553,11 @@ def flag_handler(self, name, flags): 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 @@ -605,6 +619,30 @@ def cmake_args(self): 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 @@ -978,6 +1016,7 @@ def define_tpl(trilinos_name, spack_name, have_dep): [ 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 abf454f927c554..5f4ba78289ed7b 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 2edfaefc9b34f6..8195ddda8f8058 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 c7e043f505a216..d22647f2c694ed 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 1cd132278a582f..f2ed10d5272618 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 ad31afc053ee39..0b283c763a9e57 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 b32195f43d8e60..8a03cc558a9698 100644 --- a/var/spack/repos/builtin/packages/tskit/package.py +++ b/var/spack/repos/builtin/packages/tskit/package.py @@ -18,6 +18,8 @@ class Tskit(PythonPackage): 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 226a01c5bfae19..aa30d842f14146 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 00000000000000..66fa45706a126a --- /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 801bf8e5a8fb43..7bd02a83e9361b 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") diff --git a/var/spack/repos/builtin/packages/turnserver/package.py b/var/spack/repos/builtin/packages/turnserver/package.py index 2ff2fc4deeca05..8662815c59d562 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 b350728d02396e..3a027151ad543c 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 16c73d0654a81d..50f99f750562fb 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 04f9f9300bca30..5470d6a2eb7132 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 0833a30a06e91e..b0197f7d0b0d1a 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/ucc/package.py b/var/spack/repos/builtin/packages/ucc/package.py index a208a57c497341..fa612b3722440b 100644 --- a/var/spack/repos/builtin/packages/ucc/package.py +++ b/var/spack/repos/builtin/packages/ucc/package.py @@ -18,6 +18,9 @@ class Ucc(AutotoolsPackage, CudaPackage): 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 diff --git a/var/spack/repos/builtin/packages/uchardet/package.py b/var/spack/repos/builtin/packages/uchardet/package.py index 0af81372d9cb83..3be62d1d0beaf3 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 5173346a714c00..f9b34ee28f84f9 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 14833362282c13..2d66fd771ca8cc 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 c4de4f60622924..c61e097c4eb251 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,10 @@ class Ucx(AutotoolsPackage, CudaPackage): license("BSD-3-Clause") # Current - version("1.16.0", sha256="f73770d3b583c91aba5fb07557e655ead0786e057018bfe42f0ebe8716e9d28c") + 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") @@ -54,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") @@ -161,7 +165,7 @@ def patch(self): "-L$with_rocm/hip/lib -L$with_rocm/lib", "$ROCM_LDFLAGS", "configure", string=True ) - if self.spec.satisfies("^hip@6:"): + if self.spec.satisfies("@:1.15 ^hip@6:"): filter_file("HIP_PLATFORM_HCC", "HIP_PLATFORM_AMD", "configure", string=True) @when("@1.9-dev") diff --git a/var/spack/repos/builtin/packages/udunits/package.py b/var/spack/repos/builtin/packages/udunits/package.py index 90d17688850ebe..4001b2f8586806 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 3154723acfe89b..703b7e8364af85 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 de57eec948ca7b..18d951bd80794e 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 071853aa51b02d..ab7ed119a0434c 100644 --- a/var/spack/repos/builtin/packages/ufs-utils/package.py +++ b/var/spack/repos/builtin/packages/ufs-utils/package.py @@ -55,6 +55,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 c4328c32e3730c..cc0fa715a8a68c 100644 --- a/var/spack/repos/builtin/packages/ufs-weather-model/package.py +++ b/var/spack/repos/builtin/packages/ufs-weather-model/package.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import re - from spack.package import * @@ -19,9 +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", "AlexanderRichert-NOAA") + maintainers("AlexanderRichert-NOAA") - version("develop", branch="develop", submodules=True, commit="ea0b6e4") + version("develop", branch="develop", submodules=True) version( "2.0.0", tag="ufs-v2.0.0", @@ -35,6 +33,9 @@ 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" @@ -44,10 +45,6 @@ class UfsWeatherModel(CMakePackage): default=False, description="Enable CCPP_32BIT (single precision arithmetic in slow physics)", ) - variant("avx2", default=True, description="Enable AVX2 instruction set") - variant( - "simdmultiarch", default=False, description="Enable multi-target SIMD instruction sets" - ) variant("debug", default=False, description="Enable DEBUG mode", when="@develop") variant( "debug_linkmpi", @@ -59,6 +56,7 @@ class UfsWeatherModel(CMakePackage): 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", @@ -88,10 +86,13 @@ class UfsWeatherModel(CMakePackage): ) dev_ccpp_default = [ "FV3_GFS_v16", - "FV3_GFS_v15_thompson_mynn", + "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", @@ -108,12 +109,6 @@ class UfsWeatherModel(CMakePackage): ) variant("mom6solo", default=False, description="Build MOM6 solo executable", when="@develop") - variant( - "cmake_platform", - default="auto", - description="Override CMAKE_Platform env variable ('linux.intel', 'hera.gnu', etc.)", - ) - variant("app", default="ATM", description="UFS application", when="@develop") depends_on("bacio") @@ -125,28 +120,47 @@ class UfsWeatherModel(CMakePackage): 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", when="@develop") - depends_on("esmf+debug", when="+debug") - depends_on("fms@2022.02: constants=GFS", 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", when="@develop") + depends_on("ip@:4", when="@develop") depends_on("netcdf-c~parallel-netcdf+mpi", when="@develop") - depends_on("parallelio+fortran~pnetcdf~shared", 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("mapl+debug", when="+debug") depends_on("gftl-shared") with when("@develop app=S2SWA"): depends_on("mapl") - depends_on("mapl+debug", when="+debug") depends_on("gftl-shared") with when("@develop app=ATMAERO"): depends_on("mapl") - depends_on("mapl+debug", when="+debug") 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") @@ -155,12 +169,13 @@ def setup_build_environment(self, env): 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("CCPP_SUITES", ",".join([x for x in spec.variants["ccpp_suites"].value if x])) - if spec.variants["cmake_platform"].value != "auto": - env.set("CMAKE_Platform", spec.variants["cmake_platform"].value) - elif spec.platform == "linux" and spec.satisfies("%intel"): + if spec.platform == "linux" and spec.satisfies("%intel"): env.set("CMAKE_Platform", "linux.intel") elif spec.platform == "linux" and spec.satisfies("%gcc"): env.set("CMAKE_Platform", "linux.gnu") @@ -172,57 +187,42 @@ def setup_build_environment(self, env): 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("CCPP_32BIT", "ccpp_32bit"), - from_variant("AVX2", "avx2"), - from_variant("SIMDMULTIARCH", "simdmultiarch"), - from_variant("DEBUG", "debug"), - from_variant("DEBUG_LINKMPI", "debug_linkmpi"), - from_variant("INLINE_POST", "inline_post"), - from_variant("MULTI_GASES", "multi_gases"), - from_variant("MOVING_NEST", "moving_nest"), - from_variant("OPENMP", "openmp"), - from_variant("PARALLEL_NETCDF", "parallel_netcdf"), - from_variant("JEDI_DRIVER", "jedi_driver"), - from_variant("CMEPS_AOFLUX", "cmeps_aoflux"), - from_variant("APP", "app"), - from_variant("CCPP_SUITES", "ccpp_suites").replace(";", ","), - from_variant("MPI", "mpi"), + 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(from_variant("CCPP", "ccpp")) - args.append(from_variant("QUAD_PRECISION", "quad_precision")) + 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): - # Modify hardcoded version numbers in CMakeLists.txt: - pkgs = { - "bacio": "bacio", - "esmf": "ESMF", - "fms": "FMS", - "netcdf-c": "NetCDF", - "parallelio": "PIO", - "sp": "sp", - "w3emc": "w3emc", - } - - for pkg in pkgs.keys(): - filter_file( - r"(find_package\(\s*%s)\s+[\d\.]+" % pkgs[pkg], - r"\1 " + re.sub(r"(\d+\.\d+\.\d+).+", r"\1", str(self.spec[pkg].version)), - "CMakeLists.txt", - ) - - # Fix ESMF capitalization/-lEMSF issue when using GOCART: - if self.spec.satisfies("@develop") and any( - ["app=" + app in self.spec for app in ["S2SA", "S2SWA", "ATMAERO"]] - ): - filter_file(r"NOT TARGET esmf", r"NOT TARGET ESMF", "WW3/model/src/CMakeLists.txt") - filter_file(r"PUBLIC esmf\)", "PUBLIC ESMF)", "WW3/model/src/CMakeLists.txt") - filter_file(r"\(esmf ", r"(ESMF ", "CMakeModules/Modules/FindESMF.cmake") + 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): diff --git a/var/spack/repos/builtin/packages/uftrace/package.py b/var/spack/repos/builtin/packages/uftrace/package.py index ef411830d17c3b..bf478b5455f3b6 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 @@ def install(self, spec, prefix): 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 57cbcb3202db0c..9f45d9c8a9ed7a 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 3a9286864b3e7c..5d2d329d732e37 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 562dfbf53d2a04..6695b7d31ddd41 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/package.py b/var/spack/repos/builtin/packages/umpire/package.py index d7684c207a82c3..bf04b347b92809 100644 --- a/var/spack/repos/builtin/packages/umpire/package.py +++ b/var/spack/repos/builtin/packages/umpire/package.py @@ -6,8 +6,6 @@ import os import socket -import llnl.util.tty as tty - from spack.package import * from .blt import llnl_link_helpers @@ -21,11 +19,23 @@ 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( + "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", @@ -138,6 +148,10 @@ 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. @@ -157,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", ) @@ -188,7 +202,7 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage): 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("openmp_target", default=False, description="Build with OpenMP 4.5 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=False, description="Build Umpire Examples") variant( @@ -205,16 +219,19 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage): 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:", 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", type="build") - depends_on("blt@0.6.1:", type="build", when="@2024.02.0:") + 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") @@ -226,8 +243,11 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage): 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.02.0:", when="@2024.02.0:") + 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") @@ -265,13 +285,11 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage): conflicts("+device_alloc", when="~rocm~cuda") conflicts("+deviceconst", when="~rocm~cuda") - conflicts("~openmp", when="+openmp_target", msg="OpenMP target requires OpenMP") + conflicts("~openmp", when="+omptarget", msg="OpenMP target requires OpenMP") conflicts("+cuda", when="+rocm") conflicts("+tools", when="+rocm") conflicts( - "+rocm", - when="+openmp_target", - msg="Cant support both rocm and openmp device backends at once", + "+rocm", when="+omptarget", msg="Cant support both rocm and openmp device backends at once" ) conflicts("+ipc_shmem", when="@:5.0.1") @@ -312,12 +330,14 @@ def initconfig_compiler_entries(self): option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else "" - if "+fortran" in spec and 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) @@ -333,31 +353,31 @@ def initconfig_hardware_entries(self): 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)) # 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)) else: entries.append(cmake_cache_option("ENABLE_HIP", False)) entries.append( cmake_cache_option( - "{}ENABLE_DEVICE_CONST".format(option_prefix), "+deviceconst" in spec + "{}ENABLE_DEVICE_CONST".format(option_prefix), spec.satisfies("+deviceconst") ) ) entries.append( cmake_cache_option( - "{}ENABLE_OPENMP_TARGET".format(option_prefix), "+openmp_target" in spec + "{}ENABLE_OPENMP_TARGET".format(option_prefix), spec.satisfies("+omptarget") ) ) - if "+openmp_target" in spec and "%xl" in spec: + if spec.satisfies("+omptarget") and spec.satisfies("%xl"): entries.append(cmake_cache_string("OpenMP_CXX_FLAGS", "-qsmp;-qoffload")) return entries @@ -365,8 +385,8 @@ def initconfig_hardware_entries(self): def initconfig_mpi_entries(self): spec = self.spec - entries = super(Umpire, self).initconfig_mpi_entries() - entries.append(cmake_cache_option("ENABLE_MPI", "+mpi" in spec)) + entries = super().initconfig_mpi_entries() + entries.append(cmake_cache_option("ENABLE_MPI", spec.satisfies("+mpi"))) return entries @@ -394,95 +414,130 @@ def initconfig_package_entries(self): 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", "+shared" in spec)) - entries.append(cmake_cache_option("ENABLE_WARNINGS_AS_ERRORS", "+werror" in spec)) + 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", "+openmp" in spec)) - entries.append(cmake_cache_option("ENABLE_EXAMPLES", "+examples" in spec)) + 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 "tests=benchmarks" in spec or "+dev_benchmarks" in spec: + 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", "tests=none" not in spec)) + 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_NUMA".format(option_prefix), "+numa" in spec)) + entries.append( + cmake_cache_option("{}ENABLE_NUMA".format(option_prefix), spec.satisfies("+numa")) + ) entries.append( cmake_cache_option( - "{}ENABLE_DEVELOPER_BENCHMARKS".format(option_prefix), "+dev_benchmarks" in spec + "{}ENABLE_DEVELOPER_BENCHMARKS".format(option_prefix), + spec.satisfies("+dev_benchmarks"), ) ) entries.append( - cmake_cache_option("{}ENABLE_TOOLS".format(option_prefix), "+tools" in spec) + cmake_cache_option("{}ENABLE_TOOLS".format(option_prefix), spec.satisfies("+tools")) ) entries.append( - cmake_cache_option("{}ENABLE_BACKTRACE".format(option_prefix), "+backtrace" in spec) + 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_ASAN".format(option_prefix), "+asan" in spec)) entries.append( cmake_cache_option( - "{}ENABLE_SANITIZER_TESTS".format(option_prefix), "+sanitizer_tests" in spec + "{}ENABLE_SANITIZER_TESTS".format(option_prefix), + spec.satisfies("+sanitizer_tests"), ) ) # Recent options, were never name without prefix entries.append( - cmake_cache_option("UMPIRE_ENABLE_DEVICE_ALLOCATOR", "+device_alloc" in spec) + cmake_cache_option("UMPIRE_ENABLE_DEVICE_ALLOCATOR", spec.satisfies("+device_alloc")) ) entries.append( - cmake_cache_option("UMPIRE_ENABLE_SQLITE_EXPERIMENTAL", "+sqlite_experimental" in spec) + cmake_cache_option( + "UMPIRE_ENABLE_SQLITE_EXPERIMENTAL", spec.satisfies("+sqlite_experimental") + ) ) - if "+sqlite_experimental" in spec: + 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", "+ipc_shmem" in spec) + cmake_cache_option("UMPIRE_ENABLE_IPC_SHARED_MEMORY", spec.satisfies("+ipc_shmem")) ) else: - entries.append(cmake_cache_option("ENABLE_IPC_SHARED_MEMORY", "+ipc_shmem" in spec)) + 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): return [] - def test(self): + 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 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/uncrustify/package.py b/var/spack/repos/builtin/packages/uncrustify/package.py index 4e0d627b833b40..ebd09af5fdf97f 100644 --- a/var/spack/repos/builtin/packages/uncrustify/package.py +++ b/var/spack/repos/builtin/packages/uncrustify/package.py @@ -9,7 +9,7 @@ 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 b5b54d6838b842..9ad5173b85fd82 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 a1a8da0e98ca41..b9cdf43116eae8 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 0c0585e9bd9e5a..e1e2146648ccbc 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 732e8f0a6c1c28..ddfd81e2a7e8e8 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 5888b674ecb9ee..202b93a5310f78 100644 --- a/var/spack/repos/builtin/packages/unison/package.py +++ b/var/spack/repos/builtin/packages/unison/package.py @@ -32,6 +32,8 @@ class Unison(MakefilePackage): deprecated=True, ) + depends_on("c", type="build") # generated + depends_on("ocaml@4.10.0:~force-safe-string", type=("build", "link")) with when("@:2.51.2"): diff --git a/var/spack/repos/builtin/packages/units/package.py b/var/spack/repos/builtin/packages/units/package.py index 45e4660cff1c48..86ae202792890f 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 0c71fdc9b72c57..f605896a98b74a 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 b74e1cdaa008fb..9cbe8558f07be2 100644 --- a/var/spack/repos/builtin/packages/universal-ctags/package.py +++ b/var/spack/repos/builtin/packages/universal-ctags/package.py @@ -29,6 +29,10 @@ class UniversalCtags(AutotoolsPackage): "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 c873dd0b6e47c7..9dd7734cd8daa0 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 171c25961e5d51..289a763cb4d0ab 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 301a0b2eed43b2..420afc96261f64 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 339f255161a170..1c73ebd572c588 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 9e185e5a631590..6779f6a9cc8bca 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 553a3da2988445..f04dee4f8cdc48 100644 --- a/var/spack/repos/builtin/packages/unzip/package.py +++ b/var/spack/repos/builtin/packages/unzip/package.py @@ -10,30 +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") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + # 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") - - # 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")) + patch("strip.patch") def get_make_args(self): make_args = ["-f", join_path("unix", "Makefile")] cflags = [] - cflags.append("-Wno-error=implicit-function-declaration") - cflags.append("-Wno-error=implicit-int") + 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 @@ -42,8 +42,8 @@ def build_targets(self): 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 00000000000000..bff72d7bc86f60 --- /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 00000000000000..f41bc982f5a336 --- /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 \n#include \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 f2996d0682a697..91971025683297 100644 --- a/var/spack/repos/builtin/packages/upcxx/package.py +++ b/var/spack/repos/builtin/packages/upcxx/package.py @@ -9,24 +9,30 @@ 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"): @@ -90,9 +96,14 @@ class Upcxx(Package, CudaPackage, ROCmPackage): 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( @@ -136,15 +147,18 @@ class Upcxx(Package, CudaPackage, ROCmPackage): ) # 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") @@ -206,8 +220,8 @@ def install(self, spec, prefix): 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" @@ -238,13 +252,16 @@ def install(self, spec, prefix): 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 3a6c52686e649b..b8b7fe13edb394 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 4eb4e7fbdb4bf2..929b7c26507764 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 b9bc7a850120ae..0c6dacbfeb9b26 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 a74b154e2a96e7..9228889ec29530 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 00000000000000..f5912596632351 --- /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 +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 6ce96241bcf20c..300a13b688a22b 100644 --- a/var/spack/repos/builtin/packages/usearch/package.py +++ b/var/spack/repos/builtin/packages/usearch/package.py @@ -8,28 +8,52 @@ 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 adbfe989b6159c..732b0c693f5c1f 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 1f76e497d0de88..fc4add539ccfc8 100644 --- a/var/spack/repos/builtin/packages/ut/package.py +++ b/var/spack/repos/builtin/packages/ut/package.py @@ -22,6 +22,8 @@ class Ut(CMakePackage): 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 49a2ecc2a61941..39d56ad06e9d5e 100644 --- a/var/spack/repos/builtin/packages/utf8cpp/package.py +++ b/var/spack/repos/builtin/packages/utf8cpp/package.py @@ -10,7 +10,7 @@ class Utf8cpp(Package): """A simple, portable and lightweight generic library for handling UTF-8 encoded strings.""" - homepage = "http://utfcpp.sourceforge.net/" + homepage = "https://utfcpp.sourceforge.net/" version("2.3.4", sha256="3373cebb25d88c662a2b960c4d585daf9ae7b396031ecd786e7bb31b15d010ef") diff --git a/var/spack/repos/builtin/packages/utf8proc/package.py b/var/spack/repos/builtin/packages/utf8proc/package.py index af154fdc9538ef..ae92704ecadc72 100644 --- a/var/spack/repos/builtin/packages/utf8proc/package.py +++ b/var/spack/repos/builtin/packages/utf8proc/package.py @@ -21,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 1b176904a79670..61b1535e2eb73d 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 d41a9a93ae805b..554158491b030c 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 bcd31b88d092ae..e4a67d8ed94ad6 100644 --- a/var/spack/repos/builtin/packages/util-linux/package.py +++ b/var/spack/repos/builtin/packages/util-linux/package.py @@ -18,6 +18,7 @@ class UtilLinux(AutotoolsPackage): 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") @@ -38,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") diff --git a/var/spack/repos/builtin/packages/util-macros/package.py b/var/spack/repos/builtin/packages/util-macros/package.py index feca9d82d142a1..1f6411e2bd9c26 100644 --- a/var/spack/repos/builtin/packages/util-macros/package.py +++ b/var/spack/repos/builtin/packages/util-macros/package.py @@ -11,18 +11,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 685ab77ffbb723..b99312427166bf 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 6b3bf03716318a..eb5418df90731a 100644 --- a/var/spack/repos/builtin/packages/vacuumms/package.py +++ b/var/spack/repos/builtin/packages/vacuumms/package.py @@ -44,6 +44,9 @@ class Vacuumms(CMakePackage): 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") diff --git a/var/spack/repos/builtin/packages/vala/package.py b/var/spack/repos/builtin/packages/vala/package.py index e7e03a4462f4f4..5fbec5e05dcb09 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 0820d4c6b664b1..a87966faf9e1a1 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 0b7f2ddf1b1e5a..888737395417dc 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 bc28a286d0466f..2809c5d74ff64e 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 72507b8b86f8ff..e6a2bf2349235f 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/variorum/package.py b/var/spack/repos/builtin/packages/variorum/package.py index 09023d6d72c391..a1c0ce5f15f941 100644 --- a/var/spack/repos/builtin/packages/variorum/package.py +++ b/var/spack/repos/builtin/packages/variorum/package.py @@ -30,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 9d3fd83987ddbc..2950922511ee9c 100644 --- a/var/spack/repos/builtin/packages/varnish-cache/package.py +++ b/var/spack/repos/builtin/packages/varnish-cache/package.py @@ -20,6 +20,8 @@ class VarnishCache(AutotoolsPackage): 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") diff --git a/var/spack/repos/builtin/packages/vasp/package.py b/var/spack/repos/builtin/packages/vasp/package.py index 1f67e9b006bff9..aa937bc4ab4b1a 100644 --- a/var/spack/repos/builtin/packages/vasp/package.py +++ b/var/spack/repos/builtin/packages/vasp/package.py @@ -8,7 +8,7 @@ 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 69d9e2807da875..77648aef6148a0 100644 --- a/var/spack/repos/builtin/packages/vbfnlo/package.py +++ b/var/spack/repos/builtin/packages/vbfnlo/package.py @@ -38,6 +38,9 @@ class Vbfnlo(AutotoolsPackage): sha256="13e33d73d8a8ef64094621f87e6f94e01712e76cc19a86298d0b52cfcb9decca", preferred=True, ) + + depends_on("cxx", type="build") # generated + depends_on("fortran", type="build") # generated # version('2.7.0', sha256='0e96c0912599e3000fffec5305700b947b604a7b06c7975851503f445311e4ef') # Documentation is broken on some systems: diff --git a/var/spack/repos/builtin/packages/vbz-compression/package.py b/var/spack/repos/builtin/packages/vbz-compression/package.py index 52712253b46618..feba17e46cef5f 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 a5d549c360ffc6..98c2276544b27e 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 e533200232f59f..adb359bbb220e3 100644 --- a/var/spack/repos/builtin/packages/vcftools/package.py +++ b/var/spack/repos/builtin/packages/vcftools/package.py @@ -23,6 +23,9 @@ 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") 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 00000000000000..04dc384fc5b59e --- /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 0b5a2aafdf9e90..8e6afa6eee3adb 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, diff --git a/var/spack/repos/builtin/packages/veccore/package.py b/var/spack/repos/builtin/packages/veccore/package.py index f8a7ab885ebd24..38f714e2fa422f 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 48284544866fdb..d48585ad13e990 100644 --- a/var/spack/repos/builtin/packages/vecgeom/package.py +++ b/var/spack/repos/builtin/packages/vecgeom/package.py @@ -21,6 +21,16 @@ class Vecgeom(CMakePackage, CudaPackage): maintainers("drbenmorgan", "sethrj") version("master", branch="master") + version( + "1.2.9", + url="https://gitlab.cern.ch/-/project/981/uploads/55a89cafbf48a418bec68be42867d4bf/VecGeom-v1.2.9.tar.gz", + sha256="93ee9ce6f7b2d704e9b9db22fad68f81b8eaf17453452969fc47e93dba4bfaf4", + ) + version( + "1.2.8", + url="https://gitlab.cern.ch/VecGeom/VecGeom/uploads/db11697eb81d6f369e9ded1078de946b/VecGeom-v1.2.8.tar.gz", + sha256="769f59e8377f8268e253a9b2a3eee86868a9ebc1fa66c968b96e19c31440c12b", + ) version( "1.2.7", url="https://gitlab.cern.ch/VecGeom/VecGeom/uploads/e4172cca4f6f731ef15e2780ecbb1645/VecGeom-v1.2.7.tar.gz", @@ -148,6 +158,8 @@ class Vecgeom(CMakePackage, CudaPackage): deprecated=True, ) + depends_on("cxx", type="build") + _cxxstd_values = (conditional("11", "14", when="@:1.1"), "17", conditional("20", when="@1.2:")) variant( "cxxstd", diff --git a/var/spack/repos/builtin/packages/veclibfort/package.py b/var/spack/repos/builtin/packages/veclibfort/package.py index 22d03f08735378..a6949f31130037 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 diff --git a/var/spack/repos/builtin/packages/vecmem/package.py b/var/spack/repos/builtin/packages/vecmem/package.py index 30186fd24d977a..3372b8e2692410 100644 --- a/var/spack/repos/builtin/packages/vecmem/package.py +++ b/var/spack/repos/builtin/packages/vecmem/package.py @@ -13,10 +13,25 @@ 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.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 +56,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 784ece9330960f..dc9a83bc425efc 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 2deeb894a28871..9d42a6d8006883 100644 --- a/var/spack/repos/builtin/packages/veloc/package.py +++ b/var/spack/repos/builtin/packages/veloc/package.py @@ -29,6 +29,9 @@ 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") 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 00000000000000..5f60345277cea3 --- /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 00000000000000..0834497886c148 --- /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 01194ea035844d..e7109855f27c1f 100644 --- a/var/spack/repos/builtin/packages/verible/package.py +++ b/var/spack/repos/builtin/packages/verible/package.py @@ -34,6 +34,21 @@ class Verible(Package): version("master", branch="master") + 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", @@ -65,6 +80,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/package.py b/var/spack/repos/builtin/packages/verilator/package.py index 75a2e6cd3d4853..7500e252d93163 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.022.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,7 @@ class Verilator(AutotoolsPackage): version("master", branch="master") + version("5.026", sha256="87fdecf3967007d9ee8c30191ff2476f2a33635d0e0c6e3dbf345cc2f0c50b78") version("5.024", sha256="88b04c953e7165c670d6a700f202cef99c746a0867b4e2efe1d7ea789dee35f3") version("5.022", sha256="3c2f5338f4b6ce7e2f47a142401acdd18cbf4c5da06092618d6d036c0afef12d") version("5.020", sha256="41ca9abfadf8d2413efbff7f8277379733d0095957fe7769dc38f8fd1bc899a6") @@ -70,21 +71,27 @@ 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("ccache", type=("build", "run"), when="@5.018:") conflicts("%gcc@:6", msg="C++14 support required") # 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) diff --git a/var/spack/repos/builtin/packages/verrou/package.py b/var/spack/repos/builtin/packages/verrou/package.py index dc0cba56c68d5f..a32b6a9299617c 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 5ec8dd46eb636b..468e6272805080 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 c492c2ba1ef882..6c74d9b4f759ca 100644 --- a/var/spack/repos/builtin/packages/viennarna/package.py +++ b/var/spack/repos/builtin/packages/viennarna/package.py @@ -21,6 +21,10 @@ class Viennarna(AutotoolsPackage): 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 73ea05962684d4..66b4df553242fd 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 6178b1b1a64a2f..54de86618bfd10 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 583d12c8f914c7..c246f1c1cd766f 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 d7f9330e60ccae..1dcb644939258f 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 806ca826717e7c..18b36fc3c2f390 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 c85b86bc998f2a..ef611aa0492be3 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 c12fe75ee1a3b2..6766495fd0eda0 100644 --- a/var/spack/repos/builtin/packages/visit-ffp/package.py +++ b/var/spack/repos/builtin/packages/visit-ffp/package.py @@ -32,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 76c3abf5f23159..9fb677fc889e99 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 d31402e3f93651..3dc7a4bbc650e3 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 d7cbbf4ad2a0cc..768ac3f66e8d20 100644 --- a/var/spack/repos/builtin/packages/visit-unv/package.py +++ b/var/spack/repos/builtin/packages/visit-unv/package.py @@ -37,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/package.py b/var/spack/repos/builtin/packages/visit/package.py index 3f806196fd27f5..ab24314e357bf1 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -71,11 +71,14 @@ 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") 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") @@ -105,16 +108,15 @@ 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") + 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("mpi", when="+mpi") # VTK flavors depends_on("vtk@8.1:8 +opengl2") - depends_on("vtk +osmesa", when="+osmesa") depends_on("vtk +qt", when="+gui") depends_on("vtk +python", when="+python") depends_on("vtk +mpi", when="+mpi") @@ -125,11 +127,12 @@ 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") @@ -291,10 +294,11 @@ def cmake_args(self): 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), @@ -302,8 +306,6 @@ def cmake_args(self): 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)) diff --git a/var/spack/repos/builtin/packages/vite/package.py b/var/spack/repos/builtin/packages/vite/package.py index bf45ae8e66b135..3f760fd70dbe57 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 e5778416c0d073..f533443886fc2f 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 683f58c350af51..b7b04b7a89486f 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 f4986e0c6d4ff4..15b58af21b07d0 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 601c5190c301d3..79c02bbb0c6316 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 00000000000000..bfbf92b572059d --- /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 5a07ef7130673a..49a1aa078ed249 100644 --- a/var/spack/repos/builtin/packages/voropp/package.py +++ b/var/spack/repos/builtin/packages/voropp/package.py @@ -6,26 +6,27 @@ 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("cxx", type="build") # generated + + 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 00000000000000..48f2ab9a6938be --- /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 04ad3d39e51750..2be5343d725df2 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 2654417761a2cd..16f9358e0a8093 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 e1846fe900ff7e..a56fbe0622a963 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 bb47d42a67c345..990a5f683909d7 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 5276740f710e2d..3156ab4f121982 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 e0edcfefc954c9..b5edbe36124ff7 100644 --- a/var/spack/repos/builtin/packages/votca/package.py +++ b/var/spack/repos/builtin/packages/votca/package.py @@ -20,11 +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" @@ -39,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 e2b09e2dc24e05..31f3830d30a13f 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 c51eaf3cb2fea6..7cfd778434a9ee 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 29c9f563d47033..81b0613da13979 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 33d197d039038a..a10eb6d31949ee 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 3f4027de7af7bf..5bd8e126ccf36d 100644 --- a/var/spack/repos/builtin/packages/vt/package.py +++ b/var/spack/repos/builtin/packages/vt/package.py @@ -16,6 +16,9 @@ class Vt(MakefilePackage): 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 7be75560d0400d..75bff498fe9f7b 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 9a159e4e0bdd1c..011e479ff16e13 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 00000000000000..c7ddcc44fbdc8c --- /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 +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 $<$:roc::rocthrust>) ++ # rocthrust does not wrap its compile defs/ops/dirs with $<$. ++ # We need this workaround since we mix CXX and HIP source files in vtkm_cont. ++ target_link_libraries(vtkm_cont ++ PRIVATE ++ $<$: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 00000000000000..7b60ab777b22aa --- /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 + VTKM_THIRDPARTY_POST_INCLUDE + ++#if THRUST_VERSION >= 200500 ++#include ++#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 ++struct is_commutative> ++ : public ::cuda::std::is_arithmetic ++{ ++}; ++#else + template + struct is_commutative> + : public thrust::detail::is_arithmetic + { + }; ++#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 00000000000000..c8943aea9f7e1d --- /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 +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::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::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 00000000000000..cf3987079b88b8 --- /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 +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::ReadPortalType MIRTablesDataPortal; + typename vtkm::cont::ArrayHandle::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 6c7e3cda9dfc5c..6bf7c4203f5538 100644 --- a/var/spack/repos/builtin/packages/vtk-m/package.py +++ b/var/spack/repos/builtin/packages/vtk-m/package.py @@ -21,8 +21,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,26 +30,29 @@ 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("cxx", type="build") # generated variant("shared", default=False, description="build shared libs") @@ -82,6 +85,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 @@ -118,7 +122,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, @@ -129,6 +133,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") @@ -139,13 +150,40 @@ 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 cmake_args(self): spec = self.spec @@ -192,6 +230,9 @@ def cmake_args(self): # 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") @@ -226,14 +267,12 @@ def cmake_args(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): @@ -248,7 +287,4 @@ def smoke_test(self): @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 00000000000000..ed82e5630e0107 --- /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 +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 + #include + ++#include + #include + + 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 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 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 + #include + + #include + #include + #include ++#include + #include + #include + #include +@@ -114,28 +116,13 @@ public: + } + }; + +- //////////////////////////////////////////////////////////////////////////////////// +- // Extract cells by ids permutes input data +- template +- vtkm::cont::CellSetPermutation Run(const CellSetType& cellSet, +- const vtkm::cont::ArrayHandle& cellIds) +- { +- using OutputType = vtkm::cont::CellSetPermutation; +- +- vtkm::cont::ArrayCopy(cellIds, this->ValidCellIds); +- +- return OutputType(this->ValidCellIds, cellSet); +- } +- +- //////////////////////////////////////////////////////////////////////////////////// +- // Extract cells by implicit function permutes input data + template +- vtkm::cont::CellSetPermutation 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 passFlags; +@@ -149,7 +136,10 @@ public: + vtkm::cont::Algorithm::CopyIf(indices, passFlags, this->ValidCellIds); + + // generate the cellset +- return vtkm::cont::CellSetPermutation(this->ValidCellIds, cellSet); ++ vtkm::cont::CellSetPermutation permutedCellSet(this->ValidCellIds, cellSet); ++ ++ vtkm::cont::CellSetExplicit<> outputCells; ++ return vtkm::worklet::CellDeepCopy::Run(permutedCellSet); + } + + vtkm::cont::ArrayHandle 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 6ba0bb3f4d504b..d2da1fe43e3bea 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -20,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") @@ -49,9 +54,11 @@ class Vtk(CMakePackage): version("6.3.0", sha256="92a493354c5fa66bea73b5fc014154af5d9f3f6cee8d20a826f4cd5d4b0e8a5e") version("6.1.0", sha256="bd7df10a479606d529a8b71f466c44a2bdd11fd534c62ce0aa44fad91883fa34") + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + # 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") @@ -75,7 +82,7 @@ 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") @@ -98,7 +105,7 @@ class Vtk(CMakePackage): # Broken downstream FindMPI patch("vtkm-findmpi-downstream.patch", when="@9.0.0") - for plat in ["linux", "darwin", "freebsd", "cray"]: + for plat in ["linux", "darwin", "freebsd"]: # use internal FindHDF5 patch("internal_findHDF5.patch", when=f"@:8 platform={plat}") @@ -124,15 +131,22 @@ class Vtk(CMakePackage): 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") - patch("vtk_alias_hdf5.patch", when="@9: platform=windows") - patch("vtk_findproj_config.patch", when="platform=windows") - 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") + # 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") @@ -176,8 +190,9 @@ class Vtk(CMakePackage): 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:", 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:"): @@ -213,6 +228,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(), @@ -275,6 +298,7 @@ def cmake_args(self): 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), @@ -415,7 +439,7 @@ def cmake_args(self): 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", diff --git a/var/spack/repos/builtin/packages/vvtest/package.py b/var/spack/repos/builtin/packages/vvtest/package.py index 8bc51b502204f1..106a497924e3ea 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 f27000dbda3033..82dbf7bf8c6b92 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,6 +89,7 @@ def cmake_args(self): 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 diff --git a/var/spack/repos/builtin/packages/w3m/package.py b/var/spack/repos/builtin/packages/w3m/package.py index 80aa64adca3415..d4d693afbc46e3 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 8fd23086ef4809..ef757778ff23ec 100644 --- a/var/spack/repos/builtin/packages/w3nco/package.py +++ b/var/spack/repos/builtin/packages/w3nco/package.py @@ -20,6 +20,9 @@ class W3nco(CMakePackage): 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 ( diff --git a/var/spack/repos/builtin/packages/wannier90/package.py b/var/spack/repos/builtin/packages/wannier90/package.py index 8bb4310893611c..417cdc38f7c66e 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 @@ def url_for_version(self, version): 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 @@ def edit(self, spec, prefix): "@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 ed1fb87c5c7766..82a8610c4f420d 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,119 @@ 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("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 +393,7 @@ def cmake_args(self): # 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 +403,17 @@ def cmake_args(self): 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,6 +422,12 @@ def cmake_args(self): 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: @@ -231,6 +439,28 @@ def cmake_args(self): 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"} @@ -257,9 +487,17 @@ def _get_input_options(self, dim, post_install): 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"] @@ -291,23 +529,38 @@ def copy_test_sources(self): install test subdirectory for use during `spack test run`.""" 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 00000000000000..e81f26cbf86e97 --- /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 5b8712599f2d43..fae74fc445632a 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 52596f24c188bc..20b113de243152 100644 --- a/var/spack/repos/builtin/packages/wayland-protocols/package.py +++ b/var/spack/repos/builtin/packages/wayland-protocols/package.py @@ -28,6 +28,9 @@ 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") @@ -53,7 +56,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 488fbfe5a87ea7..e44b87c17af023 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") diff --git a/var/spack/repos/builtin/packages/wcs/package.py b/var/spack/repos/builtin/packages/wcs/package.py index 0070396347acec..5b9800233c20c6 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 eaf47ee8d8ee29..67e47a24aa6318 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 c93b9658319591..b305941aa89d6a 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 d27a8c070fbd35..9650d9707cf753 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 8c55c7aafadd14..5a70298bf47ea7 100644 --- a/var/spack/repos/builtin/packages/wget/package.py +++ b/var/spack/repos/builtin/packages/wget/package.py @@ -19,6 +19,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") @@ -28,6 +30,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" ) @@ -38,6 +42,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 9a3a0bc7e7d6f4..9d02f3c1394881 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 @@ def determine_version(cls, lib): 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.microarchitecture.family).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 f5a5aaa0977662..36a85c47be94e7 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" @@ -115,13 +118,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) @@ -152,9 +156,10 @@ def edit(self, spec, prefix): makefile.filter(r"^%s=.*" % makefile_option, "{}={}".format(makefile_option, value)) def setup_build_environment(self, env): - if self.spec.compiler.name in ["oneapi", "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 f2a6d25535b30b..8c471e56423607 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 1c36d3ed396309..8fc8eb0fe14f45 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 138ce77477831f..f6b826a7fa23a1 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 00000000000000..80cacea69fbaa3 --- /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 1abfc157d28d5a..c6481fa5713b5a 100644 --- a/var/spack/repos/builtin/packages/whizard/package.py +++ b/var/spack/repos/builtin/packages/whizard/package.py @@ -13,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", @@ -27,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") @@ -43,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", @@ -53,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") @@ -66,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 @@ -141,10 +156,10 @@ def configure_args(self): # 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")) @@ -152,8 +167,8 @@ def configure_args(self): 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 808dc1d08bc5da..4e800940076ea3 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", 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 00000000000000..2196be842d5f85 --- /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 00000000000000..f2fef7ff6dddf7 --- /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 3c96fb1a9161c8..7d40c225396aa5 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 8bf9f5b9d0a1d2..2138cbea2ffcad 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 877188c0cd5d17..5b492f3183140b 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 23675d7713b9e5..6f509117badb99 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 129677f177b435..951b1252385c1a 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 6a6dcf0482391a..f73136012f539c 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 d7bd40e0920c4a..efaed4924b0563 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 3a3aaa69f5bafc..89633e7c8dd088 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", diff --git a/var/spack/repos/builtin/packages/wrf-io/package.py b/var/spack/repos/builtin/packages/wrf-io/package.py index 6b80fdeef76ea1..b63725927b2669 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 15f81f0aace253..e7187645c77b85 100644 --- a/var/spack/repos/builtin/packages/wrf/package.py +++ b/var/spack/repos/builtin/packages/wrf/package.py @@ -70,6 +70,21 @@ class Wrf(Package): maintainers("MichaelLaufer", "ptooley") 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", @@ -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 @@ def setup_run_environment(self, env): 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 @@ def do_configure_fixup(self): 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 @@ def configure(self, spec, prefix): # 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 06ab5cff2b701d..3acd8be485e248 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 cb2c400a48bef4..aada2b01337f83 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 c5e53721315324..dc1dd65951676e 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 eb43df3d582f6c..a26ba6d7ee16a9 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 # 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 07d9022276cc5d..f40d5e292d87ed 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 @@ def edit(self, spec, prefix): 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 831831e76b8cd0..8e1d9c75432630 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 b105d4f92881bd..e8e7937b112bf4 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 de62cbb39a3f59..6b896039b133bb 100644 --- a/var/spack/repos/builtin/packages/wxwidgets/package.py +++ b/var/spack/repos/builtin/packages/wxwidgets/package.py @@ -23,12 +23,17 @@ 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") patch("math_include.patch", when="@3.0.1:3.0.2") diff --git a/var/spack/repos/builtin/packages/x11perf/package.py b/var/spack/repos/builtin/packages/x11perf/package.py index ef3e402e6605e2..cdd5ee0496debf 100644 --- a/var/spack/repos/builtin/packages/x11perf/package.py +++ b/var/spack/repos/builtin/packages/x11perf/package.py @@ -9,17 +9,19 @@ 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 086c83f45005fa..2d222278a30135 100644 --- a/var/spack/repos/builtin/packages/x264/package.py +++ b/var/spack/repos/builtin/packages/x264/package.py @@ -16,6 +16,8 @@ class X264(AutotoolsPackage): 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 29dfbed8fb5b15..6e01b278dab06b 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 9117b3bb1f3774..025666420652ac 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 c4a792f1d44a8d..33649b571a2e3d 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 0392228ac297fc..542bbabb41a32f 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 index 64c6d3d99b1d70..f17282d21c2179 100644 --- a/var/spack/repos/builtin/packages/xbae/package.py +++ b/var/spack/repos/builtin/packages/xbae/package.py @@ -17,7 +17,8 @@ class Xbae(AutotoolsPackage): version("4.60.4", sha256="eb72702ed0a36d043f2075a9d5a4545556da1b8dab4d67d85fca92f37aeb04a8") - depends_on("libtool", type="build") + depends_on("c", type="build") + depends_on("libxext") depends_on("libxmu") depends_on("libxpm") diff --git a/var/spack/repos/builtin/packages/xbiff/package.py b/var/spack/repos/builtin/packages/xbiff/package.py index 0e7f535e307bdd..0709fbf0e0ccaf 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 172f716cbc141d..87d799efe55b2a 100644 --- a/var/spack/repos/builtin/packages/xbitmaps/package.py +++ b/var/spack/repos/builtin/packages/xbitmaps/package.py @@ -10,7 +10,7 @@ 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") diff --git a/var/spack/repos/builtin/packages/xbraid/package.py b/var/spack/repos/builtin/packages/xbraid/package.py index eb845dad60f430..4f77813bc5bf68 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 ea4145c2725f0e..de11c6f87069bd 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 f023755b03afb4..09be1af0900ee9 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 1d345d6b731475..31e87a34538591 100644 --- a/var/spack/repos/builtin/packages/xcb-proto/package.py +++ b/var/spack/repos/builtin/packages/xcb-proto/package.py @@ -6,33 +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 3c408d0ed6fdd2..31b19f9a9bdab4 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 c6f28d2ccb3ef4..0a4dea8c4b239e 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 ecd793cb640080..0702e1e36d941c 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 e7c19ebb57fdec..af65e8994abb6c 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 6ae06aa0bdc46c..59fa41039a667e 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 3f825e83b5db3c..b6386eb8035f0a 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 cdf160d1491e8c..3eda838445698e 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 65f539510fef62..060bdba882a70b 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 8de53544631fc7..2ab94a4c365816 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 737e8b356ed862..8c9b0440deb753 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:") diff --git a/var/spack/repos/builtin/packages/xclip/package.py b/var/spack/repos/builtin/packages/xclip/package.py index 9335a847299565..0cd0e9c16e0cdc 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 df29c0afefccb3..b1b4215a00cecf 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 d7f3ff4c9c8d99..9d2bf79db25a74 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 d358bc2b9c8519..0cd8d9999fcdba 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 4537b3f4383591..a918e086e55724 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 d555c4369c9963..3fcb79a1d1f8f2 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 c9c395449f7d8d..8ca378c61404e5 100644 --- a/var/spack/repos/builtin/packages/xconsole/package.py +++ b/var/spack/repos/builtin/packages/xconsole/package.py @@ -10,7 +10,7 @@ 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") @@ -18,11 +18,13 @@ class Xconsole(AutotoolsPackage, XorgPackage): 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 316e7e42db1b8a..dedf61d02204e2 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 0a082116b1b833..6672be219fae22 100644 --- a/var/spack/repos/builtin/packages/xcursorgen/package.py +++ b/var/spack/repos/builtin/packages/xcursorgen/package.py @@ -9,13 +9,15 @@ 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 22e8a1de489a1f..1945ac1911682c 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 551a4d2cba4bfa..eeba577cffc387 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 48e809ab3ad132..4c0c9790b3ab9b 100644 --- a/var/spack/repos/builtin/packages/xditview/package.py +++ b/var/spack/repos/builtin/packages/xditview/package.py @@ -9,7 +9,7 @@ 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 183ac75305c9b3..909b877c394634 100644 --- a/var/spack/repos/builtin/packages/xdm/package.py +++ b/var/spack/repos/builtin/packages/xdm/package.py @@ -9,7 +9,7 @@ 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") @@ -20,6 +20,8 @@ class Xdm(AutotoolsPackage, XorgPackage): 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 22a6d923455226..4909c669e3437d 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 66df65bb4784ff..877e9241873927 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 9cf8c460cd5a17..5c972059d1967f 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 d9d1b15ec36a14..b0ed3d5f9852d1 100644 --- a/var/spack/repos/builtin/packages/xdriinfo/package.py +++ b/var/spack/repos/builtin/packages/xdriinfo/package.py @@ -9,7 +9,7 @@ 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 dad2b3cdec2737..07bfc8ff269416 100644 --- a/var/spack/repos/builtin/packages/xedit/package.py +++ b/var/spack/repos/builtin/packages/xedit/package.py @@ -9,7 +9,7 @@ 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/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index a9907e09dc0df3..a62f25746e37fc 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/package.py @@ -28,6 +28,9 @@ class XercesC(AutotoolsPackage): 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 # CMakeLists.txt as a specific standard cannot be forced diff --git a/var/spack/repos/builtin/packages/xeus/package.py b/var/spack/repos/builtin/packages/xeus/package.py index ab4cd48d19bfea..624835fc75992d 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 d0f04600e1c51b..f5db651986b50f 100644 --- a/var/spack/repos/builtin/packages/xev/package.py +++ b/var/spack/repos/builtin/packages/xev/package.py @@ -15,7 +15,7 @@ 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") @@ -26,6 +26,8 @@ class Xev(AutotoolsPackage, XorgPackage): 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 1b5f4ca83efc8f..47dc4a4df24520 100644 --- a/var/spack/repos/builtin/packages/xextproto/package.py +++ b/var/spack/repos/builtin/packages/xextproto/package.py @@ -9,7 +9,7 @@ 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 8d72001bb563c4..711ee12c490f42 100644 --- a/var/spack/repos/builtin/packages/xeyes/package.py +++ b/var/spack/repos/builtin/packages/xeyes/package.py @@ -9,7 +9,7 @@ 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 7ef9adf3273b73..0504e17e492588 100644 --- a/var/spack/repos/builtin/packages/xf86bigfontproto/package.py +++ b/var/spack/repos/builtin/packages/xf86bigfontproto/package.py @@ -9,7 +9,7 @@ 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 64a48a6b0889c1..4400f34a3dc636 100644 --- a/var/spack/repos/builtin/packages/xf86dga/package.py +++ b/var/spack/repos/builtin/packages/xf86dga/package.py @@ -9,11 +9,13 @@ 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 7242c4c3ba9875..e60bdb49423a29 100644 --- a/var/spack/repos/builtin/packages/xf86dgaproto/package.py +++ b/var/spack/repos/builtin/packages/xf86dgaproto/package.py @@ -9,7 +9,7 @@ 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 953be0c91295a8..defa0dd09213e8 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 69de74bb79465d..7487eb933cae2d 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 4ad729f9155a2d..9ac71210a3c709 100644 --- a/var/spack/repos/builtin/packages/xf86rushproto/package.py +++ b/var/spack/repos/builtin/packages/xf86rushproto/package.py @@ -9,7 +9,7 @@ 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 1f310726d2e3da..65feeed2876407 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 00000000000000..c7c48fdfa5f4e0 --- /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 00000000000000..406fdcaaa62642 --- /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 00000000000000..7716dd8d4a7a50 --- /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 00000000000000..b406173fc48b8b --- /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 00000000000000..850af1c059cccd --- /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 00000000000000..1d9b7cfb794ed8 --- /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 00000000000000..ffd975c11fad1d --- /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 e5a69e915920d3..1d11e330aad93b 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 00000000000000..58daf8ac721ffb --- /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 e2bb1ef186407b..8358377d231187 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 5ad88b7f1ab018..a719a841c7e78e 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 003b57fef5e8c0..7474b1074d074d 100644 --- a/var/spack/repos/builtin/packages/xforms/package.py +++ b/var/spack/repos/builtin/packages/xforms/package.py @@ -19,6 +19,8 @@ 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") diff --git a/var/spack/repos/builtin/packages/xfs/package.py b/var/spack/repos/builtin/packages/xfs/package.py index 0641d14a979a7d..1b4ebf3cd5a243 100644 --- a/var/spack/repos/builtin/packages/xfs/package.py +++ b/var/spack/repos/builtin/packages/xfs/package.py @@ -9,7 +9,7 @@ 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 dde23593d41f59..481a7b506a3cc7 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 fc8b1ebca800ee..c56c6bf3d8ff5f 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 b67540ecb7e6e1..2cc15a88613b0f 100644 --- a/var/spack/repos/builtin/packages/xfsprogs/package.py +++ b/var/spack/repos/builtin/packages/xfsprogs/package.py @@ -21,6 +21,8 @@ class Xfsprogs(AutotoolsPackage): version("4.20.0", sha256="beafdfd080352a8c9d543491e0874d0e8809cb643a3b9d352d5feed38d77022a") + depends_on("c", type="build") # generated + depends_on("libinih") depends_on("gettext") depends_on("uuid") 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 00000000000000..c97354369e502a --- /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 2ee35cea525cf9..ac243fe9d57f7d 100644 --- a/var/spack/repos/builtin/packages/xfwp/package.py +++ b/var/spack/repos/builtin/packages/xfwp/package.py @@ -9,15 +9,17 @@ 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 c5d08e2421fd31..47f1e0b3fe1b9c 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 dd82b452d164b2..ea48be3d6ad6cb 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 4ddedf216b11a7..7e6629a34dc311 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 fb3eb7f2706f71..b573f2a818424d 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 9e083dcb2552d9..44c547cfa04bf6 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 43327786feaa59..fe47a592f6a56b 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 1d9bdf11d065bb..e0d70ec09b67ce 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 b6e9007af47b5b..9dd5b69f2525e7 100644 --- a/var/spack/repos/builtin/packages/xinput/package.py +++ b/var/spack/repos/builtin/packages/xinput/package.py @@ -9,7 +9,7 @@ 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 3e5c6783d0a6b7..0b75d3709feb3f 100644 --- a/var/spack/repos/builtin/packages/xkbcomp/package.py +++ b/var/spack/repos/builtin/packages/xkbcomp/package.py @@ -14,18 +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://cgit.freedesktop.org/xorg/app/xkbcomp" + 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 6aec9481662a14..b19781d43983ca 100644 --- a/var/spack/repos/builtin/packages/xkbevd/package.py +++ b/var/spack/repos/builtin/packages/xkbevd/package.py @@ -9,12 +9,14 @@ 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 92e1f634f8a351..9942bbd2a2f94d 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 734386b6baafc8..e090389b6a460d 100644 --- a/var/spack/repos/builtin/packages/xkbutils/package.py +++ b/var/spack/repos/builtin/packages/xkbutils/package.py @@ -10,18 +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 50436f37ef23d8..5e139ffe7d3e24 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 52f43925797f12..398d352eff19a6 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/package.py b/var/spack/repos/builtin/packages/xl/package.py index 479d31b548a6b6..379c35810beda5 100644 --- a/var/spack/repos/builtin/packages/xl/package.py +++ b/var/spack/repos/builtin/packages/xl/package.py @@ -30,8 +30,8 @@ def install(self, spec, prefix): @classmethod def determine_variants(cls, exes, version_str): - _r_exes = [e for e in exes if "_r" in e] - _exes = [e for e in exes if "_r" not in e] + _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 diff --git a/var/spack/repos/builtin/packages/xload/package.py b/var/spack/repos/builtin/packages/xload/package.py index bee0e4037ed122..88908041649cfe 100644 --- a/var/spack/repos/builtin/packages/xload/package.py +++ b/var/spack/repos/builtin/packages/xload/package.py @@ -10,7 +10,7 @@ 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") @@ -20,12 +20,14 @@ class Xload(AutotoolsPackage, XorgPackage): 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 aa556d31abdfc1..1f809b927440d2 100644 --- a/var/spack/repos/builtin/packages/xlogo/package.py +++ b/var/spack/repos/builtin/packages/xlogo/package.py @@ -9,13 +9,15 @@ 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 7f28f2bd5b1432..4108c17e4f7f9d 100644 --- a/var/spack/repos/builtin/packages/xlsatoms/package.py +++ b/var/spack/repos/builtin/packages/xlsatoms/package.py @@ -9,13 +9,15 @@ 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 bf42cd27cda516..94510a3b14b710 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 4efceb02beea17..54be4a0082f4ca 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 18ece436a9755f..a11dc957d6a13d 100644 --- a/var/spack/repos/builtin/packages/xmag/package.py +++ b/var/spack/repos/builtin/packages/xmag/package.py @@ -9,7 +9,7 @@ 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 48ed103f021cca..2c8b9b0057d984 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 26727768863084..fff7c6901ee0cc 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 9f584775311a5d..875a90396a5227 100644 --- a/var/spack/repos/builtin/packages/xmh/package.py +++ b/var/spack/repos/builtin/packages/xmh/package.py @@ -11,13 +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/package.py b/var/spack/repos/builtin/packages/xmlf90/package.py index 5151ef10e21dfa..c8a0937c29a902 100644 --- a/var/spack/repos/builtin/packages/xmlf90/package.py +++ b/var/spack/repos/builtin/packages/xmlf90/package.py @@ -25,6 +25,8 @@ class Xmlf90(AutotoolsPackage): 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") diff --git a/var/spack/repos/builtin/packages/xmlrpc-c/package.py b/var/spack/repos/builtin/packages/xmlrpc-c/package.py index 080b08658495c8..e32b2a0a012ef7 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 d70e6f6dda5cd0..ea16a58550beea 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 d3544926c5c453..f521bebad88f04 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 782484dc156edd..2642215c4f3c00 100644 --- a/var/spack/repos/builtin/packages/xmore/package.py +++ b/var/spack/repos/builtin/packages/xmore/package.py @@ -9,12 +9,14 @@ 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 9549e256db2613..6611fe71907e79 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 0c9b7b9d33cf5f..d02e7c757c4561 100644 --- a/var/spack/repos/builtin/packages/xorg-cf-files/package.py +++ b/var/spack/repos/builtin/packages/xorg-cf-files/package.py @@ -12,7 +12,7 @@ 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") diff --git a/var/spack/repos/builtin/packages/xorg-docs/package.py b/var/spack/repos/builtin/packages/xorg-docs/package.py index 73a861422d9e23..78b772a7e769d2 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 1a22f1256536c3..55d1fddddd175f 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 3bafc23339d2d8..55a7496827b05c 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 + # 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 00000000000000..15f8c314c014d9 --- /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 + #include + #include ++#include + #ifdef HAVE_SYS_MKDEV_H + #include /* 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 ++#include + + #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 a92365b1344784..a796f927c12bc8 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 00000000000000..b27d1e2a409e2a --- /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 3eec5ffc2163e5..47d4bca340d33c 100644 --- a/var/spack/repos/builtin/packages/xphelloworld/package.py +++ b/var/spack/repos/builtin/packages/xphelloworld/package.py @@ -9,11 +9,13 @@ 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 901bfaa0e4836f..332064d4f4befe 100644 --- a/var/spack/repos/builtin/packages/xplsprinters/package.py +++ b/var/spack/repos/builtin/packages/xplsprinters/package.py @@ -9,11 +9,13 @@ 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 cd437e3cf76530..20d88b8ced1dd9 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 291aa4e031add6..1ab58ef195ba9c 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 5ad7f37fb3ccc2..b6477d53aae4b2 100644 --- a/var/spack/repos/builtin/packages/xprehashprinterlist/package.py +++ b/var/spack/repos/builtin/packages/xprehashprinterlist/package.py @@ -9,11 +9,13 @@ 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 b4e25b86f0c9ad..da9bd6b4a94ba8 100644 --- a/var/spack/repos/builtin/packages/xprop/package.py +++ b/var/spack/repos/builtin/packages/xprop/package.py @@ -10,7 +10,7 @@ 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") @@ -22,8 +22,10 @@ class Xprop(AutotoolsPackage, XorgPackage): 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 9d8a0d1483192d..9944f6da8eb5da 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 b7403f13bd03cb..fccbd571e4d188 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 a9a148972290ed..b724478e973407 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 03efa9b1b4bbdc..22e61bd63248b8 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 cbebdf46176c46..c3b2838ae6c986 100644 --- a/var/spack/repos/builtin/packages/xrandr/package.py +++ b/var/spack/repos/builtin/packages/xrandr/package.py @@ -10,7 +10,7 @@ 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") @@ -21,11 +21,13 @@ class Xrandr(AutotoolsPackage, XorgPackage): 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 d60b5a4ddb0a6a..96fd97b88e67fc 100644 --- a/var/spack/repos/builtin/packages/xrdb/package.py +++ b/var/spack/repos/builtin/packages/xrdb/package.py @@ -9,7 +9,7 @@ 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 606fade55c4295..684715eb9f8764 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 21800da5fb75d7..7b28eb364fef73 100644 --- a/var/spack/repos/builtin/packages/xrefresh/package.py +++ b/var/spack/repos/builtin/packages/xrefresh/package.py @@ -9,7 +9,7 @@ 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") @@ -19,8 +19,10 @@ class Xrefresh(AutotoolsPackage, XorgPackage): 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 fef72679a5a466..73482d79201275 100644 --- a/var/spack/repos/builtin/packages/xrootd/package.py +++ b/var/spack/repos/builtin/packages/xrootd/package.py @@ -11,15 +11,20 @@ class Xrootd(CMakePackage): """The XROOTD project aims at giving high performance, scalable fault tolerant access to data repositories of many kinds.""" - homepage = "https://xrootd.slac.stanford.edu" - 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") @@ -63,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") @@ -93,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( @@ -121,6 +144,7 @@ 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:") @@ -203,6 +227,7 @@ def cmake_args(self): 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), @@ -210,6 +235,7 @@ def cmake_args(self): 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: diff --git a/var/spack/repos/builtin/packages/xrx/package.py b/var/spack/repos/builtin/packages/xrx/package.py index b354252f5c1ca3..bb4f3d9f22592f 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 5525b5be471770..f92a0c4fb6fa4a 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 43b8a3aa4dcd24..9bb0cf44bf5a8d 100644 --- a/var/spack/repos/builtin/packages/xscope/package.py +++ b/var/spack/repos/builtin/packages/xscope/package.py @@ -9,7 +9,7 @@ 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 44fa3fc14b1110..d820ef58fc4b70 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 4978f57049d925..66f1ee05a7f0be 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 @@ 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:") diff --git a/var/spack/repos/builtin/packages/xsdk/package.py b/var/spack/repos/builtin/packages/xsdk/package.py index cf4990a99c1265..85bf27ae2b092b 100644 --- a/var/spack/repos/builtin/packages/xsdk/package.py +++ b/var/spack/repos/builtin/packages/xsdk/package.py @@ -84,14 +84,13 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): homepage = "https://xsdk.info" maintainers("balay", "luszczek", "balos1", "shuds13", "v-dobrev") - version("develop") 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") @@ -111,21 +110,11 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): variant("raja", default=(sys.platform != "darwin"), description="Enable raja for hiop, exago") variant("pflotran", default=True, description="Enable pflotran package build") - xsdk_depends_on( - "hypre@develop+superlu-dist+shared", when="@develop", 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", - cuda_var="cuda", - rocm_var="rocm", - ) xsdk_depends_on( "mfem@4.6.0+shared+mpi+superlu-dist+petsc+sundials+examples+miniapps", when="@1.0.0", @@ -138,26 +127,11 @@ 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@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" - + "~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2" - + "~exodus~dtk+intrepid2+shards+stratimikos gotype=int" - + " cxxstd=14", - when="@develop +trilinos", - ) xsdk_depends_on( "trilinos@14.4.0+hypre+hdf5~mumps+boost" + "~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2" @@ -172,28 +146,13 @@ 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.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", - cuda_var="cuda", - rocm_var="rocm", - ) xsdk_depends_on( "petsc@3.20.1+mpi+hypre+superlu-dist+metis+hdf5~mumps+double~int64", when="@1.0.0", @@ -206,19 +165,9 @@ 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", - ) xsdk_depends_on( "dealii@9.5.1~assimp~python~doc~gmsh+petsc+slepc+mpi~int64" + "~netcdf+metis+sundials~ginkgo~symengine~simplex~arborx~cgal~oce", @@ -229,31 +178,16 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): + "~netcdf+metis+sundials~ginkgo~symengine~simplex~arborx~cgal", 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", - cuda_var=["cuda", "?magma"], - rocm_var=["rocm", "?magma"], - ) xsdk_depends_on( "sundials@6.6.2~int64+hypre+petsc+superlu-dist", when="@1.0.0", @@ -266,74 +200,34 @@ 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@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.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@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.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@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@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.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"], - ) xsdk_depends_on( "tasmanian@8.0+mpi+blas" + tasmanian_openmp, when="@1.0.0", cuda_var=["cuda", "?magma"] ) @@ -342,17 +236,10 @@ 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.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,52 +249,30 @@ 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.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" - ) xsdk_depends_on( "ginkgo@1.7.0 +mpi ~openmp", when="@1.0.0 +ginkgo", cuda_var="cuda", rocm_var="rocm" ) 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.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@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@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@develop+fftw", - when="@develop +heffte", - cuda_var=["cuda", "?magma"], - rocm_var=["rocm", "?magma"], - ) xsdk_depends_on( "heffte@2.4.0+fftw", when="@1.0.0 +heffte", @@ -420,27 +285,15 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): 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@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.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 8727bbdb435fca..c47e76d5702522 100644 --- a/var/spack/repos/builtin/packages/xset/package.py +++ b/var/spack/repos/builtin/packages/xset/package.py @@ -9,7 +9,7 @@ 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 bc477070784267..0b9012cdb91198 100644 --- a/var/spack/repos/builtin/packages/xsetmode/package.py +++ b/var/spack/repos/builtin/packages/xsetmode/package.py @@ -9,11 +9,13 @@ 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 0a77e1f8440269..6205461c5fd25d 100644 --- a/var/spack/repos/builtin/packages/xsetpointer/package.py +++ b/var/spack/repos/builtin/packages/xsetpointer/package.py @@ -9,14 +9,16 @@ 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 4c701d31dd39b8..9427a96bc40c64 100644 --- a/var/spack/repos/builtin/packages/xsetroot/package.py +++ b/var/spack/repos/builtin/packages/xsetroot/package.py @@ -9,7 +9,7 @@ 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 b17899e084dee5..e869da903cedd6 100644 --- a/var/spack/repos/builtin/packages/xsimd/package.py +++ b/var/spack/repos/builtin/packages/xsimd/package.py @@ -33,6 +33,8 @@ 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 diff --git a/var/spack/repos/builtin/packages/xsm/package.py b/var/spack/repos/builtin/packages/xsm/package.py index 5104bb886f8ad4..f14a71f49c5f4e 100644 --- a/var/spack/repos/builtin/packages/xsm/package.py +++ b/var/spack/repos/builtin/packages/xsm/package.py @@ -9,13 +9,15 @@ 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 bf4d21b0edc909..88b23d029f220b 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 b8bab6d0d17079..6dfc4ed96550a1 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 fa87a2f6cf1792..1fb2064788aaad 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 c43cd4a4da3cc8..3d4060979afed3 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 0d277428cdf3fd..cd5d6caba30b7e 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") diff --git a/var/spack/repos/builtin/packages/xtensor/package.py b/var/spack/repos/builtin/packages/xtensor/package.py index b7f1a3fa9e9858..58c20ab95e585d 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") diff --git a/var/spack/repos/builtin/packages/xterm/package.py b/var/spack/repos/builtin/packages/xterm/package.py index 8e8f48ec587914..7edbe346e29b78 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 c9d3029548c8d9..f3dcf90fa0bf76 100644 --- a/var/spack/repos/builtin/packages/xtl/package.py +++ b/var/spack/repos/builtin/packages/xtl/package.py @@ -25,6 +25,8 @@ 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") diff --git a/var/spack/repos/builtin/packages/xtrans/package.py b/var/spack/repos/builtin/packages/xtrans/package.py index 83b2c02c38f58e..92a5c73d87dea3 100644 --- a/var/spack/repos/builtin/packages/xtrans/package.py +++ b/var/spack/repos/builtin/packages/xtrans/package.py @@ -12,7 +12,7 @@ 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") @@ -23,5 +23,7 @@ class Xtrans(AutotoolsPackage, XorgPackage): 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 9f2abfbb095a0b..99fef53039b9e8 100644 --- a/var/spack/repos/builtin/packages/xtrap/package.py +++ b/var/spack/repos/builtin/packages/xtrap/package.py @@ -9,12 +9,14 @@ 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 31ff532a8dc482..d2a76cb30248ad 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 1c7d328897b4ae..8947f35608f301 100644 --- a/var/spack/repos/builtin/packages/xv/package.py +++ b/var/spack/repos/builtin/packages/xv/package.py @@ -23,6 +23,8 @@ class Xv(CMakePackage): version("4.2.0", sha256="2871338c517a7444fc9d6a3d146bc2c5c7bd98b50c83369b24d24ad49fa0ab87") + depends_on("c", type="build") # generated + depends_on("libjpeg") depends_on("libpng") depends_on("libtiff") diff --git a/var/spack/repos/builtin/packages/xvidtune/package.py b/var/spack/repos/builtin/packages/xvidtune/package.py index eeb9d3096a2fb9..c1c8dd40928b67 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 5b1f3aabb1a773..eb176b410d4fdb 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 954b8b2d6d8d52..662895c73f3e8b 100644 --- a/var/spack/repos/builtin/packages/xwd/package.py +++ b/var/spack/repos/builtin/packages/xwd/package.py @@ -9,7 +9,7 @@ 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 aa108f75876e32..2ccdec69e0f35c 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 7fb046f5f501c3..8ffeedad1d649d 100644 --- a/var/spack/repos/builtin/packages/xwininfo/package.py +++ b/var/spack/repos/builtin/packages/xwininfo/package.py @@ -10,7 +10,7 @@ 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") @@ -20,9 +20,11 @@ class Xwininfo(AutotoolsPackage, XorgPackage): 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 9a5098c512d0c4..4618088d60a0f3 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 c0bf61e3c76574..7ba6f40e850f57 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 6acd871f836701..52fa2f0a3dbf57 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 99661986c42598..a4a94e56f39742 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 7422419c30ac59..94b6fbeffcb696 100644 --- a/var/spack/repos/builtin/packages/xyce/package.py +++ b/var/spack/repos/builtin/packages/xyce/package.py @@ -60,6 +60,9 @@ class Xyce(CMakePackage): deprecated=True, ) + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + depends_on("cmake@3.22:", type="build") depends_on("flex") depends_on("bison") @@ -224,7 +227,11 @@ def flag_handler(self, name, flags): 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 383e69cee280e2..0ff6ea0d3e269e 100644 --- a/var/spack/repos/builtin/packages/xz/package.py +++ b/var/spack/repos/builtin/packages/xz/package.py @@ -41,6 +41,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 eabbcc4ccd4b1c..5590d270a3a346 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 72d6527dfe00f4..996b57fa1e62e2 100644 --- a/var/spack/repos/builtin/packages/yafyaml/package.py +++ b/var/spack/repos/builtin/packages/yafyaml/package.py @@ -51,6 +51,8 @@ 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") diff --git a/var/spack/repos/builtin/packages/yajl/package.py b/var/spack/repos/builtin/packages/yajl/package.py index 686714cadbd358..24572d06f74cd3 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 e24ee70d050be5..7a3c16d023d5d9 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 7df990c6f4425b..f8a24d2d125f22 100644 --- a/var/spack/repos/builtin/packages/yambo/package.py +++ b/var/spack/repos/builtin/packages/yambo/package.py @@ -17,7 +17,7 @@ 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" license("GPL-2.0-or-later") @@ -28,6 +28,9 @@ class Yambo(AutotoolsPackage): 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", diff --git a/var/spack/repos/builtin/packages/yaml-cpp/package.py b/var/spack/repos/builtin/packages/yaml-cpp/package.py index 5954481cff980c..f44cce75d8b07b 100644 --- a/var/spack/repos/builtin/packages/yaml-cpp/package.py +++ b/var/spack/repos/builtin/packages/yaml-cpp/package.py @@ -14,19 +14,22 @@ 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("cxx", type="build") # generated + 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 +87,10 @@ def cmake_args(self): 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 e80978bd1c83db..cce0191a10413e 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 4c2f9ae8b690a4..46a921ac91e328 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 9735ea9b5891d0..a545be413a6d75 100644 --- a/var/spack/repos/builtin/packages/yoda/package.py +++ b/var/spack/repos/builtin/packages/yoda/package.py @@ -73,6 +73,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 fa3ef816f07b89..c4a97d688be80d 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 072ff2970537ba..d37712955a6536 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.40.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,12 @@ class Yosys(MakefilePackage): version("master", branch="master") + 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") @@ -51,6 +57,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") 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 00000000000000..9c94f459fe3404 --- /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/z-checker/package.py b/var/spack/repos/builtin/packages/z-checker/package.py index fde46b05137a8c..87c22c954768a5 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 b42d46655abc8b..219fbe7b15ab75 100644 --- a/var/spack/repos/builtin/packages/z3/package.py +++ b/var/spack/repos/builtin/packages/z3/package.py @@ -28,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") diff --git a/var/spack/repos/builtin/packages/zabbix/package.py b/var/spack/repos/builtin/packages/zabbix/package.py index 0d3b389b73360b..aeb8bfd1d11037 100644 --- a/var/spack/repos/builtin/packages/zabbix/package.py +++ b/var/spack/repos/builtin/packages/zabbix/package.py @@ -19,6 +19,9 @@ class Zabbix(AutotoolsPackage): version("4.0.24", sha256="c7e4962d745277d67797d90e124555ce27d198822a7e65c55d86aee45d3e93fc") version("4.0.23", sha256="652143614f52411cad47db64e93bf3ba1cd547d6ca9591296223b5f0528b3b61") + 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/zerosum/package.py b/var/spack/repos/builtin/packages/zerosum/package.py new file mode 100644 index 00000000000000..01b16b70decf9c --- /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 805c4dcafd3e82..00c671ddc9d4a4 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 fb31c68811b315..b4197c639a4977 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 87ada871d1bd62..aea0a86818ce81 100644 --- a/var/spack/repos/builtin/packages/zig/package.py +++ b/var/spack/repos/builtin/packages/zig/package.py @@ -17,12 +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", @@ -32,10 +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 00000000000000..aa61ba5fc5be19 --- /dev/null +++ b/var/spack/repos/builtin/packages/zip/11-typo-it-is-ambiguities-not-amgibuities.patch @@ -0,0 +1,26 @@ +From: Santiago Vila +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 00000000000000..2f2f7c164b7c36 --- /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 ++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 +-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 + 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 + #include + #include + diff --git a/var/spack/repos/builtin/packages/zip/package.py b/var/spack/repos/builtin/packages/zip/package.py index 354f6d624d7365..3e387ec029053c 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 @@ def determine_version(cls, exe): 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 6322d9769615b2..40de58f4e0be81 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,22 +20,17 @@ 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") @@ -49,16 +46,8 @@ 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 - # (@2.1.0:2.1.3 need the same changes but in a different file) - patch("pr-1698.patch", when="@2.1.4:%nvhpc+opt") + 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") @@ -68,9 +57,15 @@ class ZlibNg(AutotoolsPackage, CMakePackage): @property def libs(self): - name = "libz" if self.spec.satisfies("+compat") else "libz-ng" + 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") + name, + root=self.prefix, + recursive=True, + shared=self.spec.satisfies("+shared"), + runtime=False, ) def flag_handler(self, name, flags): @@ -80,12 +75,11 @@ def flag_handler(self, name, flags): 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.compiler.name in ["nvhpc"]: + if self.spec.satisfies("%nvhpc"): filter_file(r"^gcc=0$", "gcc=1", join_path(self.configure_directory, "configure")) def configure_args(self): 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 675c2c1a3d0ac5..00000000000000 --- 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 -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 --#ifdef _MSC_VER --# include --#endif -+#include - #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 -+ "#include - 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 - 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 8966cdd36bf439..00000000000000 --- 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 -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 -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 -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 f87aea684bd916..00000000000000 --- 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 -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 < - 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 < - #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 70806e900c36c5..00000000000000 --- 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 -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 -- 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 -- 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 -- 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 -- 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 - #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 -- 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 -+ __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 -- int main(void) { -- __m512i a = _mm512_setzero_si512(); -+ #include -+ __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 -- 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 -- 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 -- 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 -- #else -- # include -- #endif -- int main(void) { -- return _xgetbv(0); -- }" -+ # include -+ #else -+ # include -+ #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 --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 --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 --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 --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 - #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 - #include --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 - #include --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 - #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 --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 --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 --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/package.py b/var/spack/repos/builtin/packages/zlib/package.py index 7206d17915c715..c579a8381300ac 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,9 @@ 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") @@ -48,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)") @@ -63,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 @@ -96,7 +115,7 @@ def edit(self, pkg, spec, prefix): # 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. @@ -106,9 +125,8 @@ def edit(self, pkg, spec, prefix): 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 63427a6a9000c5..86121f412e65e6 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.") diff --git a/var/spack/repos/builtin/packages/zookeeper/package.py b/var/spack/repos/builtin/packages/zookeeper/package.py index edac1784e72827..3e57b856e69667 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 b1ec085cfb6230..8e5931a67d011a 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 index d352495c5a407b..7c25679b34bad4 100644 --- a/var/spack/repos/builtin/packages/zoxide/package.py +++ b/var/spack/repos/builtin/packages/zoxide/package.py @@ -19,4 +19,6 @@ class Zoxide(CargoPackage): 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 11ca3f8cce1430..5e68d304652073 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 4b29339a02ce2f..bf7df1c36d417f 100644 --- a/var/spack/repos/builtin/packages/zstd/package.py +++ b/var/spack/repos/builtin/packages/zstd/package.py @@ -41,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", diff --git a/var/spack/repos/builtin/packages/zstr/package.py b/var/spack/repos/builtin/packages/zstr/package.py index 26131cecf4764d..e056d9aea9452d 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 13fc3fee33fef0..d91c0cf2ce07b2 100644 --- a/var/spack/repos/builtin/packages/zziplib/package.py +++ b/var/spack/repos/builtin/packages/zziplib/package.py @@ -17,9 +17,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 ef28e411d304d5..6d8decc26b2dca 100644 --- a/var/spack/repos/compiler_runtime.test/packages/gcc/package.py +++ b/var/spack/repos/compiler_runtime.test/packages/gcc/package.py @@ -30,3 +30,6 @@ def runtime_constraints(cls, *, spec, pkg): ) # The version of gcc-runtime is the same as the %gcc used to "compile" it 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 similarity index 87% rename from var/spack/repos/compiler_runtime.test/packages/a/package.py rename to var/spack/repos/compiler_runtime.test/packages/pkg-a/package.py index 01cb6fe3ccc9ae..22ca47cf130330 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 similarity index 93% rename from var/spack/repos/compiler_runtime.test/packages/b/package.py rename to var/spack/repos/compiler_runtime.test/packages/pkg-b/package.py index e840a363a5c476..d4147bf47e646f 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/flags.test/packages/t/package.py b/var/spack/repos/flags.test/packages/t/package.py new file mode 100644 index 00000000000000..359f8f4f0345e8 --- /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 00000000000000..7839ab8191af5d --- /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 00000000000000..afc8c5117c8d10 --- /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 00000000000000..dbfadf6851a9c0 --- /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 00000000000000..d7c1c076306dc9 --- /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 00000000000000..ea736afb8a7933 --- /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 00000000000000..a87dc9ca963093 --- /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 00000000000000..f0ca8563dac874 --- /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 00000000000000..b2203459089fa1 --- /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 00000000000000..426edbfb80bf0b --- /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 00000000000000..93771c3311c991 --- /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 00000000000000..0ba70acf0603be --- /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 00000000000000..7be2a780ea7223 --- /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 06138bee9462cd..c625ecbc175da8 100644 --- a/var/spack/repos/tutorial/packages/mpich/package.py +++ b/var/spack/repos/tutorial/packages/mpich/package.py @@ -88,16 +88,10 @@ def setup_dependent_build_environment(self, env, dependent_spec): 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)),