Compare commits
140 Commits
packages/l
...
bugfix/inv
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c899dcac5b | ||
|
|
94dc25ecfa | ||
|
|
aded859856 | ||
|
|
f7b9c30456 | ||
|
|
884620a38a | ||
|
|
7503a41773 | ||
|
|
9a5fc6b4a3 | ||
|
|
a31aeed167 | ||
|
|
71f542a951 | ||
|
|
322bd48788 | ||
|
|
b752fa59d4 | ||
|
|
d53e4cc426 | ||
|
|
ee4b7fa3a1 | ||
|
|
d6f02c86d9 | ||
|
|
62efde8e3c | ||
|
|
bda1d94d49 | ||
|
|
3f472039c5 | ||
|
|
912ef34206 | ||
|
|
9c88a48a73 | ||
|
|
4bf5cc9a9a | ||
|
|
08834e2b03 | ||
|
|
8020a111df | ||
|
|
86fb547f7c | ||
|
|
b9556c7c44 | ||
|
|
7bdb106b1b | ||
|
|
2b191cd7f4 | ||
|
|
774f0a4e60 | ||
|
|
faf11efa72 | ||
|
|
5a99142b41 | ||
|
|
a3aca0242a | ||
|
|
72f276fab3 | ||
|
|
21139945df | ||
|
|
900bd2f477 | ||
|
|
29d4a5af44 | ||
|
|
dd9b7ed6a7 | ||
|
|
09ff74be62 | ||
|
|
a94ebfea11 | ||
|
|
8f5fe1d123 | ||
|
|
d4fb58efa3 | ||
|
|
ce900346cc | ||
|
|
7cb64e465f | ||
|
|
eb70c9f5b9 | ||
|
|
a28405700e | ||
|
|
f8f4d94d7a | ||
|
|
32dfb522d6 | ||
|
|
c61c707aa5 | ||
|
|
60d10848c8 | ||
|
|
dcd6b530f9 | ||
|
|
419f0742a0 | ||
|
|
c99174798b | ||
|
|
8df2a4b511 | ||
|
|
c174cf6830 | ||
|
|
5eebd65366 | ||
|
|
625f5323c0 | ||
|
|
e05a32cead | ||
|
|
c69af5d1e5 | ||
|
|
1ac2ee8043 | ||
|
|
36af1c1c73 | ||
|
|
e2fa087002 | ||
|
|
df02bfbad2 | ||
|
|
fecb63843e | ||
|
|
b33e2d09d3 | ||
|
|
f8054aa21a | ||
|
|
8f3a2acc54 | ||
|
|
d1a20908b8 | ||
|
|
dd781f7368 | ||
|
|
9bcc43c4c1 | ||
|
|
77c83af17d | ||
|
|
574bd2db99 | ||
|
|
a76f37da96 | ||
|
|
9e75f3ec0a | ||
|
|
4d42d45897 | ||
|
|
a4b4bfda73 | ||
|
|
1bcdd3a57e | ||
|
|
297a3a1bc9 | ||
|
|
8d01e8c978 | ||
|
|
6be28aa303 | ||
|
|
5e38310515 | ||
|
|
ddfed65485 | ||
|
|
2a16d8bfa8 | ||
|
|
6a40a50a29 | ||
|
|
b2924f68c0 | ||
|
|
41ffe36636 | ||
|
|
24edc72252 | ||
|
|
83b38a26a0 | ||
|
|
914d785e3b | ||
|
|
f99f642fa8 | ||
|
|
e0bf3667e3 | ||
|
|
a24ca50fed | ||
|
|
51e9f37252 | ||
|
|
453900c884 | ||
|
|
4696459d2d | ||
|
|
ad1e3231e5 | ||
|
|
2ef7eb1826 | ||
|
|
fe86019f9a | ||
|
|
9dbb18219f | ||
|
|
451a977de0 | ||
|
|
e604929a4c | ||
|
|
9d591f9f7c | ||
|
|
f8ad915100 | ||
|
|
cbbabe6920 | ||
|
|
81fe460194 | ||
|
|
b894f996c0 | ||
|
|
1ce09847d9 | ||
|
|
722d401394 | ||
|
|
e6f04d5ef9 | ||
|
|
b8e3ecbf00 | ||
|
|
d189387c24 | ||
|
|
9e96ddc5ae | ||
|
|
543bd189af | ||
|
|
43291aa723 | ||
|
|
d0589285f7 | ||
|
|
d079aaa083 | ||
|
|
6c65977e0d | ||
|
|
1b5d786cf5 | ||
|
|
4cf00645bd | ||
|
|
e9149cfc3c | ||
|
|
a5c8111076 | ||
|
|
c3576f712d | ||
|
|
410e6a59b7 | ||
|
|
bd2b2fb75a | ||
|
|
7ae318efd0 | ||
|
|
73e9d56647 | ||
|
|
f87a752b63 | ||
|
|
ae2fec30c3 | ||
|
|
1af5564cbe | ||
|
|
a8f057a701 | ||
|
|
7f3dd38ccc | ||
|
|
8e9adefcd5 | ||
|
|
d276f9700f | ||
|
|
4f111659ec | ||
|
|
eaf330f2a8 | ||
|
|
cdaeb74dc7 | ||
|
|
fbaac46604 | ||
|
|
7f6210ee90 | ||
|
|
63f6e6079a | ||
|
|
d4fd6caae0 | ||
|
|
fd3c18b6fd | ||
|
|
725f427f25 | ||
|
|
2e3fc288ae |
4
.github/workflows/audit.yaml
vendored
4
.github/workflows/audit.yaml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
run:
|
||||
shell: ${{ matrix.system.shell }}
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
with:
|
||||
python-version: ${{inputs.python_version}}
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
./share/spack/qa/validate_last_exit.ps1
|
||||
spack -d audit externals
|
||||
./share/spack/qa/validate_last_exit.ps1
|
||||
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
|
||||
if: ${{ inputs.with_coverage == 'true' }}
|
||||
with:
|
||||
flags: unittests,audits
|
||||
|
||||
8
.github/workflows/bootstrap.yml
vendored
8
.github/workflows/bootstrap.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
||||
make patch unzip which xz python3 python3-devel tree \
|
||||
cmake bison
|
||||
- name: Checkout
|
||||
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Bootstrap clingo
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
run: |
|
||||
brew install cmake bison tree
|
||||
- name: Checkout
|
||||
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
@@ -92,7 +92,7 @@ jobs:
|
||||
run: |
|
||||
sudo rm -rf $(which gpg) $(which gpg2) $(which patchelf)
|
||||
- name: Checkout
|
||||
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Bootstrap GnuPG
|
||||
@@ -121,7 +121,7 @@ jobs:
|
||||
run: |
|
||||
sudo rm -rf $(which gpg) $(which gpg2) $(which patchelf)
|
||||
- name: Checkout
|
||||
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
|
||||
2
.github/workflows/build-containers.yml
vendored
2
.github/workflows/build-containers.yml
vendored
@@ -56,7 +56,7 @@ jobs:
|
||||
if: github.repository == 'spack/spack'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
|
||||
- uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
|
||||
id: docker_meta
|
||||
|
||||
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
core: ${{ steps.filter.outputs.core }}
|
||||
packages: ${{ steps.filter.outputs.packages }}
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
2
.github/workflows/nightly-win-builds.yml
vendored
2
.github/workflows/nightly-win-builds.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
build-paraview-deps:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
|
||||
2
.github/workflows/style/requirements.txt
vendored
2
.github/workflows/style/requirements.txt
vendored
@@ -3,5 +3,5 @@ clingo==5.7.1
|
||||
flake8==7.0.0
|
||||
isort==5.13.2
|
||||
mypy==1.8.0
|
||||
types-six==1.16.21.9
|
||||
types-six==1.16.21.20240513
|
||||
vermin==1.6.0
|
||||
|
||||
18
.github/workflows/unit_tests.yaml
vendored
18
.github/workflows/unit_tests.yaml
vendored
@@ -51,7 +51,7 @@ jobs:
|
||||
on_develop: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
|
||||
run: |
|
||||
share/spack/qa/run-unit-tests
|
||||
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
|
||||
with:
|
||||
flags: unittests,linux,${{ matrix.concretizer }}
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
@@ -100,7 +100,7 @@ jobs:
|
||||
shell:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
COVERAGE: true
|
||||
run: |
|
||||
share/spack/qa/run-shell-tests
|
||||
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
|
||||
with:
|
||||
flags: shelltests,linux
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
@@ -141,7 +141,7 @@ 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@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
- name: Setup repo and non-root user
|
||||
run: |
|
||||
git --version
|
||||
@@ -160,7 +160,7 @@ jobs:
|
||||
clingo-cffi:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
@@ -185,7 +185,7 @@ jobs:
|
||||
SPACK_TEST_SOLVER: clingo
|
||||
run: |
|
||||
share/spack/qa/run-unit-tests
|
||||
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
|
||||
with:
|
||||
flags: unittests,linux,clingo
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
@@ -198,7 +198,7 @@ jobs:
|
||||
os: [macos-13, macos-14]
|
||||
python-version: ["3.11"]
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
@@ -223,7 +223,7 @@ jobs:
|
||||
$(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: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
|
||||
with:
|
||||
flags: unittests,macos
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
6
.github/workflows/valid-style.yml
vendored
6
.github/workflows/valid-style.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
with:
|
||||
python-version: '3.11'
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
style:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
@@ -70,7 +70,7 @@ 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@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
- name: Setup repo and non-root user
|
||||
run: |
|
||||
git --version
|
||||
|
||||
10
.github/workflows/windows_python.yml
vendored
10
.github/workflows/windows_python.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
unit-tests:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
./share/spack/qa/validate_last_exit.ps1
|
||||
coverage combine -a
|
||||
coverage xml
|
||||
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
|
||||
with:
|
||||
flags: unittests,windows
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
unit-tests-cmd:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
./share/spack/qa/validate_last_exit.ps1
|
||||
coverage combine -a
|
||||
coverage xml
|
||||
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
|
||||
with:
|
||||
flags: unittests,windows
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
build-abseil:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||
|
||||
@@ -144,3 +144,5 @@ switch($SpackSubCommand)
|
||||
"unload" {Invoke-SpackLoad}
|
||||
default {python "$Env:SPACK_ROOT/bin/spack" $SpackCMD_params $SpackSubCommand $SpackSubCommandArgs}
|
||||
}
|
||||
|
||||
exit $LASTEXITCODE
|
||||
|
||||
@@ -38,10 +38,9 @@ packages:
|
||||
lapack: [openblas, amdlibflame]
|
||||
libc: [glibc, musl]
|
||||
libgfortran: [ gcc-runtime ]
|
||||
libglx: [mesa+glx, mesa18+glx]
|
||||
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]
|
||||
|
||||
@@ -147,6 +147,15 @@ example, the ``bash`` shell is used to run the ``autogen.sh`` script.
|
||||
def autoreconf(self, spec, prefix):
|
||||
which("bash")("autogen.sh")
|
||||
|
||||
If the ``package.py`` has build instructions in a separate
|
||||
:ref:`builder class <multiple_build_systems>`, the signature for a phase changes slightly:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class AutotoolsBuilder(AutotoolsBuilder):
|
||||
def autoreconf(self, pkg, spec, prefix):
|
||||
which("bash")("autogen.sh")
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""
|
||||
patching configure or Makefile.in files
|
||||
"""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
@@ -25,7 +25,7 @@ use Spack to build packages with the tools.
|
||||
The Spack Python class ``IntelOneapiPackage`` is a base class that is
|
||||
used by ``IntelOneapiCompilers``, ``IntelOneapiMkl``,
|
||||
``IntelOneapiTbb`` and other classes to implement the oneAPI
|
||||
packages. Search for ``oneAPI`` at `<packages.spack.io>`_ for the full
|
||||
packages. Search for ``oneAPI`` at `packages.spack.io <https://packages.spack.io>`_ for the full
|
||||
list of available oneAPI packages, or use::
|
||||
|
||||
spack list -d oneAPI
|
||||
|
||||
@@ -476,9 +476,3 @@ implemented using Python's built-in `sys.path
|
||||
:py:mod:`spack.repo` module implements a custom `Python importer
|
||||
<https://docs.python.org/2/library/imp.html>`_.
|
||||
|
||||
.. warning::
|
||||
|
||||
The mechanism for extending packages is not yet extensively tested,
|
||||
and extending packages across repositories imposes inter-repo
|
||||
dependencies, which may be hard to manage. Use this feature at your
|
||||
own risk, but let us know if you have a use case for it.
|
||||
|
||||
@@ -6,7 +6,7 @@ python-levenshtein==0.25.1
|
||||
docutils==0.20.1
|
||||
pygments==2.18.0
|
||||
urllib3==2.2.1
|
||||
pytest==8.2.0
|
||||
pytest==8.2.1
|
||||
isort==5.13.2
|
||||
black==24.4.2
|
||||
flake8==7.0.0
|
||||
|
||||
@@ -843,7 +843,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):
|
||||
@@ -2531,8 +2531,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
|
||||
|
||||
@@ -421,6 +421,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 +440,24 @@ def _check_patch_urls(pkgs, error_cls):
|
||||
if not isinstance(patch, spack.patch.UrlPatch):
|
||||
continue
|
||||
|
||||
if re.match(github_patch_url_re, patch.url):
|
||||
if re.match(github_pull_commits_re, patch.url):
|
||||
url = re.sub(r"/pull/\d+/commits/", r"/commit/", patch.url)
|
||||
url = re.sub(r"^(.*)(?<!full_index=1)$", r"\1?full_index=1", url)
|
||||
errors.append(
|
||||
error_cls(
|
||||
f"patch URL in package {pkg_cls.name} "
|
||||
+ "must not be a pull request commit; "
|
||||
+ f"instead use {url}",
|
||||
[patch.url],
|
||||
)
|
||||
)
|
||||
elif re.match(github_patch_url_re, patch.url):
|
||||
full_index_arg = "?full_index=1"
|
||||
if not patch.url.endswith(full_index_arg):
|
||||
errors.append(
|
||||
error_cls(
|
||||
"patch URL in package {0} must end with {1}".format(
|
||||
pkg_cls.name, full_index_arg
|
||||
),
|
||||
f"patch URL in package {pkg_cls.name} "
|
||||
+ f"must end with {full_index_arg}",
|
||||
[patch.url],
|
||||
)
|
||||
)
|
||||
@@ -451,9 +465,7 @@ def _check_patch_urls(pkgs, error_cls):
|
||||
if not patch.url.endswith(".diff"):
|
||||
errors.append(
|
||||
error_cls(
|
||||
"patch URL in package {0} must end with .diff".format(
|
||||
pkg_cls.name
|
||||
),
|
||||
f"patch URL in package {pkg_cls.name} must end with .diff",
|
||||
[patch.url],
|
||||
)
|
||||
)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
from collections import defaultdict
|
||||
from enum import Flag, auto
|
||||
from itertools import chain
|
||||
from typing import List, Set, Tuple
|
||||
from typing import Dict, List, Set, Tuple
|
||||
|
||||
import llnl.util.tty as tty
|
||||
from llnl.string import plural
|
||||
@@ -730,12 +730,28 @@ def _static_to_shared_library(arch, compiler, static_lib, shared_lib=None, **kwa
|
||||
return compiler(*compiler_args, output=compiler_output)
|
||||
|
||||
|
||||
def get_rpath_deps(pkg):
|
||||
"""Return immediate or transitive RPATHs depending on the package."""
|
||||
if pkg.transitive_rpaths:
|
||||
return [d for d in pkg.spec.traverse(root=False, deptype=("link"))]
|
||||
else:
|
||||
return pkg.spec.dependencies(deptype="link")
|
||||
def _get_rpath_deps_from_spec(
|
||||
spec: spack.spec.Spec, transitive_rpaths: bool
|
||||
) -> List[spack.spec.Spec]:
|
||||
if not transitive_rpaths:
|
||||
return spec.dependencies(deptype=dt.LINK)
|
||||
|
||||
by_name: Dict[str, spack.spec.Spec] = {}
|
||||
|
||||
for dep in spec.traverse(root=False, deptype=dt.LINK):
|
||||
lookup = by_name.get(dep.name)
|
||||
if lookup is None:
|
||||
by_name[dep.name] = dep
|
||||
elif lookup.version < dep.version:
|
||||
by_name[dep.name] = dep
|
||||
|
||||
return list(by_name.values())
|
||||
|
||||
|
||||
def get_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 get_rpaths(pkg):
|
||||
|
||||
@@ -137,11 +137,14 @@ 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.4")
|
||||
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.4")
|
||||
|
||||
# https://gist.github.com/ax3l/9489132#gistcomment-3860114
|
||||
conflicts("%gcc@10", when="+cuda ^cuda@:11.4.0")
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
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
|
||||
|
||||
# See https://docs.gitlab.com/ee/ci/yaml/#retry for descriptions of conditions
|
||||
@@ -683,6 +684,22 @@ def generate_gitlab_ci_yaml(
|
||||
"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
|
||||
@@ -806,7 +823,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
|
||||
env_yaml_root["spack"]["include"] = [ensure_expected_target_path(i) for i in 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")
|
||||
@@ -1227,6 +1244,9 @@ def main_script_replacements(cmd):
|
||||
"SPACK_REBUILD_EVERYTHING": str(rebuild_everything),
|
||||
"SPACK_REQUIRE_SIGNING": os.environ.get("SPACK_REQUIRE_SIGNING", "False"),
|
||||
}
|
||||
output_vars = output_object["variables"]
|
||||
for item, val in output_vars.items():
|
||||
output_vars[item] = ensure_expected_target_path(val)
|
||||
|
||||
# TODO: Remove this block in Spack 0.23
|
||||
if deprecated_mirror_config and remote_mirror_override:
|
||||
@@ -1283,7 +1303,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)
|
||||
@@ -1506,7 +1525,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:
|
||||
@@ -2254,7 +2273,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]:
|
||||
@@ -2300,7 +2319,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:
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import urllib.request
|
||||
from typing import Dict, List, Optional, Tuple, Union
|
||||
|
||||
import llnl.util.tty as tty
|
||||
@@ -54,6 +53,7 @@
|
||||
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,
|
||||
)
|
||||
@@ -856,10 +856,7 @@ def _config_from_tag(image_ref: ImageReference, tag: str) -> Optional[dict]:
|
||||
|
||||
|
||||
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"]
|
||||
tags = list_tags(image_ref)
|
||||
|
||||
# Fetch all image config files in parallel
|
||||
spec_dicts = pool.starmap(
|
||||
|
||||
@@ -151,7 +151,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(
|
||||
@@ -239,6 +240,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()
|
||||
|
||||
@@ -156,7 +156,15 @@ def get_compiler_config_from_packages(
|
||||
def _compiler_config_from_package_config(config):
|
||||
compilers = []
|
||||
for entry in config:
|
||||
compiler = _compiler_config_from_external(entry)
|
||||
try:
|
||||
compiler = _compiler_config_from_external(entry)
|
||||
except Exception as e:
|
||||
msg = "Reading compiler from packages config section failed\n"
|
||||
msg += f" Compiler: {entry.get('spec', None)}\n"
|
||||
msg += f" Prefix: {entry.get('prefix', None)}\n"
|
||||
msg += f" Failure: {e}"
|
||||
warnings.warn(msg)
|
||||
compiler = None
|
||||
if compiler:
|
||||
compilers.append(compiler)
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
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
|
||||
@@ -181,7 +182,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(
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
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.compilers
|
||||
import spack.concretize
|
||||
@@ -662,7 +662,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
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
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
|
||||
@@ -27,6 +27,7 @@
|
||||
import spack.stage
|
||||
import spack.traverse
|
||||
import spack.util.crypto
|
||||
import spack.util.url
|
||||
|
||||
from .image import Digest, ImageReference
|
||||
|
||||
@@ -69,6 +70,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,
|
||||
|
||||
@@ -161,7 +161,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()
|
||||
@@ -2446,9 +2450,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))
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
import archspec.cpu
|
||||
|
||||
import llnl.util.tty as tty
|
||||
from llnl.util.symlink import readlink
|
||||
|
||||
import spack.target
|
||||
import spack.version
|
||||
@@ -133,7 +134,7 @@ def craype_type_and_version(cls):
|
||||
# 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))
|
||||
version = spack.version.Version(readlink(default_path))
|
||||
return (craype_type, version)
|
||||
|
||||
# If no default version, sort available versions and return latest
|
||||
|
||||
@@ -566,7 +566,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)
|
||||
|
||||
@@ -241,7 +241,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 +264,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)
|
||||
|
||||
|
||||
@@ -58,7 +58,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"]
|
||||
@@ -447,7 +448,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):
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
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.error
|
||||
@@ -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)
|
||||
|
||||
@@ -314,6 +314,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.
|
||||
|
||||
@@ -2975,6 +2979,13 @@ class CompilerParser:
|
||||
def __init__(self, configuration) -> None:
|
||||
self.compilers: Set[KnownCompiler] = set()
|
||||
for c in all_compilers_in_config(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 "
|
||||
|
||||
@@ -1432,11 +1432,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)
|
||||
@@ -1526,13 +1526,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)
|
||||
}.
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
(["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
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
import archspec.cpu
|
||||
|
||||
from llnl.util.filesystem import join_path, visit_directory_tree
|
||||
from llnl.util.symlink import readlink
|
||||
|
||||
import spack.binary_distribution as bindist
|
||||
import spack.caches
|
||||
@@ -1062,10 +1063,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"
|
||||
)
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
import spack.build_environment
|
||||
import spack.config
|
||||
import spack.deptypes as dt
|
||||
import spack.package_base
|
||||
import spack.spec
|
||||
import spack.util.spack_yaml as syaml
|
||||
@@ -716,3 +717,21 @@ 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
|
||||
|
||||
@@ -51,7 +51,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):
|
||||
|
||||
@@ -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
|
||||
@@ -4414,8 +4415,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 +4427,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
|
||||
|
||||
@@ -1914,11 +1914,11 @@ 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 criterion in result.criteria, criterion
|
||||
assert result_spec.satisfies("^b@1.0")
|
||||
|
||||
@pytest.mark.only_clingo("Use case not supported by the original concretizer")
|
||||
|
||||
@@ -1492,3 +1492,26 @@ def test_config_path_dsl(path, it_should_work, expected_parsed):
|
||||
else:
|
||||
with pytest.raises(ValueError):
|
||||
spack.config.ConfigPath._validate(path)
|
||||
|
||||
|
||||
def test_compiler_parsing_errors(tmpdir):
|
||||
content = """\
|
||||
packages:
|
||||
gcc:
|
||||
externals:
|
||||
- spec: gcc@8.5.0 languages='c,c++,fortran'
|
||||
prefix: /usr
|
||||
extra_attributes:
|
||||
compilers:
|
||||
c: /usr/bin/gcc
|
||||
cxx: /usr/bin/g++
|
||||
fortran: /usr/bin/gfortran
|
||||
"""
|
||||
|
||||
testscope = join_path(tmpdir.strpath, "packages.yaml")
|
||||
with open(testscope, "w") as f:
|
||||
f.write(content)
|
||||
|
||||
with spack.config.use_configuration(tmpdir.strpath):
|
||||
compilers = spack.compilers.get_compiler_config_from_packages(spack.config.CONFIG)
|
||||
assert spack.spec.Spec(compilers[0]["compiler"]["spec"]).satisfies("gcc@8.5.0")
|
||||
|
||||
@@ -2053,3 +2053,11 @@ 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
|
||||
|
||||
@@ -813,3 +813,33 @@ def test_deconcretize_then_concretize_does_not_error(mutable_mock_env_path, mock
|
||||
assert len(e.concrete_roots()) == 3
|
||||
all_root_hashes = set(x.dag_hash() for x in e.concrete_roots())
|
||||
assert len(all_root_hashes) == 2
|
||||
|
||||
|
||||
@pytest.mark.regression("44216")
|
||||
@pytest.mark.only_clingo()
|
||||
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")
|
||||
|
||||
@@ -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")
|
||||
@@ -281,7 +281,7 @@ def test_allow_broken_symlinks(self, stage):
|
||||
symlink("nonexistant.txt", "source/broken", allow_broken_symlinks=True)
|
||||
fs.install_tree("source", "dest", symlinks=True, allow_broken_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."""
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
import pytest
|
||||
|
||||
from llnl.util.symlink import readlink
|
||||
|
||||
import spack.cmd.modules
|
||||
import spack.config
|
||||
import spack.error
|
||||
@@ -78,7 +80,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)
|
||||
|
||||
@@ -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<name>.+)/blobs/(?P<digest>.+)", 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'</v2/{name}/tags/list?last={tags[-1]}&n={n}>; rel="next"'}
|
||||
else:
|
||||
headers = None
|
||||
|
||||
return MockHTTPResponse.with_json(200, "OK", headers=headers, body={"tags": tags})
|
||||
|
||||
|
||||
class DummyServerUrllibHandler(urllib.request.BaseHandler):
|
||||
|
||||
@@ -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)
|
||||
]
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
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
|
||||
@@ -181,12 +181,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():
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
import pytest
|
||||
|
||||
from llnl.util.filesystem import getuid, mkdirp, partition_path, touch, working_dir
|
||||
from llnl.util.symlink import readlink
|
||||
|
||||
import spack.error
|
||||
import spack.paths
|
||||
@@ -872,7 +873,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):
|
||||
|
||||
@@ -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"),
|
||||
(
|
||||
|
||||
@@ -207,3 +207,29 @@ def test_default_download_name_dot_dot():
|
||||
assert url_util.default_download_filename("https://example.com/.") == "_"
|
||||
assert url_util.default_download_filename("https://example.com/..") == "_."
|
||||
assert url_util.default_download_filename("https://example.com/.abcdef") == "_abcdef"
|
||||
|
||||
|
||||
def test_parse_link_rel_next():
|
||||
parse = url_util.parse_link_rel_next
|
||||
assert parse(r'</abc>; rel="next"') == "/abc"
|
||||
assert parse(r'</abc>; x=y; rel="next", </def>; x=y; rel="prev"') == "/abc"
|
||||
assert parse(r'</abc>; rel="prev"; x=y, </def>; x=y; rel="next"') == "/def"
|
||||
|
||||
# example from RFC5988
|
||||
assert (
|
||||
parse(
|
||||
r"""</TheBook/chapter2>; title*=UTF-8'de'letztes%20Kapitel; rel="previous","""
|
||||
r"""</TheBook/chapter4>; title*=UTF-8'de'n%c3%a4chstes%20Kapitel; rel="next" """
|
||||
)
|
||||
== "/TheBook/chapter4"
|
||||
)
|
||||
|
||||
assert (
|
||||
parse(r"""<https://example.com/example>; key=";a=b, </c/d>; e=f"; rel="next" """)
|
||||
== "https://example.com/example"
|
||||
)
|
||||
|
||||
assert parse("https://example.com/example") is None
|
||||
assert parse("<https://example.com/example; broken=broken") is None
|
||||
assert parse("https://example.com/example; rel=prev") is None
|
||||
assert parse("https://example.com/example; a=b; c=d; g=h") is None
|
||||
|
||||
@@ -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),
|
||||
]
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
@@ -75,7 +75,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:
|
||||
|
||||
@@ -296,8 +296,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
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
import itertools
|
||||
import os
|
||||
import posixpath
|
||||
import re
|
||||
import sys
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
from typing import Optional
|
||||
|
||||
from llnl.path import convert_to_posix_path
|
||||
|
||||
@@ -254,3 +256,43 @@ def default_download_filename(url: str) -> str:
|
||||
valid_name = "_" + valid_name[1:]
|
||||
|
||||
return valid_name
|
||||
|
||||
|
||||
def parse_link_rel_next(link_value: str) -> Optional[str]:
|
||||
"""Return the next link from a Link header value, if any."""
|
||||
|
||||
# Relaxed version of RFC5988
|
||||
uri = re.compile(r"\s*<([^>]+)>\s*")
|
||||
param_key = r"[^;=\s]+"
|
||||
quoted_string = r"\"([^\"]+)\""
|
||||
unquoted_param_value = r"([^;,\s]+)"
|
||||
param = re.compile(rf";\s*({param_key})\s*=\s*(?:{quoted_string}|{unquoted_param_value})\s*")
|
||||
|
||||
data = link_value
|
||||
|
||||
# Parse a list of <url>; key=value; key=value, <url>; key=value; key=value, ... links.
|
||||
while True:
|
||||
uri_match = re.match(uri, data)
|
||||
if not uri_match:
|
||||
break
|
||||
uri_reference = uri_match.group(1)
|
||||
data = data[uri_match.end() :]
|
||||
|
||||
# Parse parameter list
|
||||
while True:
|
||||
param_match = re.match(param, data)
|
||||
if not param_match:
|
||||
break
|
||||
key, quoted_value, unquoted_value = param_match.groups()
|
||||
value = quoted_value or unquoted_value
|
||||
data = data[param_match.end() :]
|
||||
|
||||
if key == "rel" and value == "next":
|
||||
return uri_reference
|
||||
|
||||
if not data.startswith(","):
|
||||
break
|
||||
|
||||
data = data[1:]
|
||||
|
||||
return None
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import llnl.util.tty as tty
|
||||
from llnl.util.symlink import readlink
|
||||
|
||||
import spack.filesystem_view
|
||||
import spack.store
|
||||
@@ -38,7 +39,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 +91,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
|
||||
|
||||
@@ -64,6 +64,11 @@ default:
|
||||
SPACK_TARGET_PLATFORM: "linux"
|
||||
SPACK_TARGET_ARCH: "ppc64le"
|
||||
|
||||
.win64-msvc2019:
|
||||
variables:
|
||||
SPACK_TARGET_PLATFORM: "win64"
|
||||
SPACK_TARGET_ARCH: "x86_64"
|
||||
|
||||
########################################
|
||||
# Job templates
|
||||
########################################
|
||||
@@ -72,6 +77,8 @@ default:
|
||||
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
|
||||
@@ -114,16 +121,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 +133,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,6 +174,16 @@ 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"
|
||||
after_script:
|
||||
- cat /proc/loadavg || true
|
||||
- cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
|
||||
|
||||
.generate-x86_64:
|
||||
extends: [ ".generate-base" ]
|
||||
@@ -196,6 +201,25 @@ default:
|
||||
extends: [ ".generate-base" ]
|
||||
tags: ["spack", "public", "medium", "neoverse_v2"]
|
||||
|
||||
.generate-win64:
|
||||
extends: [ ".base-job", ".generate-common" ]
|
||||
before_script:
|
||||
- $ErrorActionOld=$ErrorActionPreference
|
||||
- $ErrorActionPreference="SilentlyContinue"
|
||||
- python -c"import psutil;print(psutil.getloadavg())"
|
||||
- (Get-WmiObject Win32_PhysicalMemory | measure-object Capacity -sum).sum/1kb
|
||||
- $ErrorActionPreference=$ErrorActionOld
|
||||
- . .\share\spack\setup-env.ps1
|
||||
after_script:
|
||||
- $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-c749cf3"
|
||||
|
||||
.generate-deprecated:
|
||||
extends: [ ".base-job" ]
|
||||
stage: generate
|
||||
@@ -718,7 +742,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-22.04:v2024-05-07
|
||||
|
||||
ml-linux-x86_64-cpu-build:
|
||||
extends: [ ".build", ".ml-linux-x86_64-cpu" ]
|
||||
@@ -741,7 +765,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-22.04:v2024-05-07
|
||||
|
||||
ml-linux-x86_64-cuda-build:
|
||||
extends: [ ".build", ".ml-linux-x86_64-cuda" ]
|
||||
@@ -859,6 +883,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" ]
|
||||
@@ -912,3 +945,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
|
||||
|
||||
18
share/spack/gitlab/cloud_pipelines/configs/win64/ci.yaml
Normal file
18
share/spack/gitlab/cloud_pipelines/configs/win64/ci.yaml
Normal file
@@ -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-c749cf3"
|
||||
10
share/spack/gitlab/cloud_pipelines/configs/win64/config.yaml
Normal file
10
share/spack/gitlab/cloud_pipelines/configs/win64/config.yaml
Normal file
@@ -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}'
|
||||
@@ -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
|
||||
@@ -0,0 +1,4 @@
|
||||
ci:
|
||||
pipeline-gen:
|
||||
- build-job:
|
||||
tags: [x86_64-win]
|
||||
@@ -0,0 +1,3 @@
|
||||
packages:
|
||||
all:
|
||||
target: [x86_64]
|
||||
@@ -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()))
|
||||
@@ -30,8 +30,6 @@ spack:
|
||||
variants: +pic +xz
|
||||
mesa:
|
||||
variants: ~llvm
|
||||
mesa18:
|
||||
variants: ~llvm
|
||||
mpich:
|
||||
variants: ~wrapperrpath netmod=ofi device=ch4
|
||||
ncurses:
|
||||
|
||||
@@ -30,8 +30,6 @@ spack:
|
||||
variants: +pic +xz
|
||||
mesa:
|
||||
variants: ~llvm
|
||||
mesa18:
|
||||
variants: ~llvm
|
||||
mpich:
|
||||
variants: ~wrapperrpath netmod=ofi device=ch4
|
||||
ncurses:
|
||||
|
||||
@@ -4,8 +4,8 @@ spack:
|
||||
definitions:
|
||||
- apps:
|
||||
- gromacs
|
||||
# - mpas-model: Spack currently forces REAL(8) when using GCC. This conflicts with `precision=single`
|
||||
# Fix proposed in https://github.com/spack/spack/pull/43547
|
||||
- mpas-model
|
||||
- mpich
|
||||
- openfoam
|
||||
# - quantum-espresso : %gcc@12.3.0 on neoverse_v1 fails.
|
||||
# Root cause: internal compiler error: in compute_live_loop_exits, at tree-ssa-loop-manip.cc:247
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -56,6 +56,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'
|
||||
|
||||
@@ -79,7 +79,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-22.04:v2024-05-07
|
||||
entrypoint: ['']
|
||||
|
||||
cdash:
|
||||
|
||||
@@ -83,7 +83,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-22.04:v2024-05-07
|
||||
entrypoint: ['']
|
||||
|
||||
cdash:
|
||||
|
||||
@@ -22,7 +22,6 @@ spack:
|
||||
- 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
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Windows Visualization Stack
|
||||
# maintainers:
|
||||
# - John Parent (@johnwparent)
|
||||
# - Ryan Krattiger (@kwryankrattiger)
|
||||
|
||||
spack:
|
||||
view: false
|
||||
specs:
|
||||
- vtk
|
||||
|
||||
cdash:
|
||||
build-group: Windows Visualization (Kitware)
|
||||
@@ -0,0 +1,20 @@
|
||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class InvalidGithubPullCommitsPatchUrl(Package):
|
||||
"""Package that has a GitHub pull request commit patch URL that fails auditing."""
|
||||
|
||||
homepage = "http://www.example.com"
|
||||
url = "http://www.example.com/patch-1.0.tar.gz"
|
||||
|
||||
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
||||
|
||||
patch(
|
||||
"https://github.com/spack/spack/pull/1/commits/b4da28f71e2cef84c6e289afe89aa4bdf7936048.patch?full_index=1",
|
||||
sha256="eae9035b832792549fac00680db5f180a88ff79feb7d7a535b4fd71f9d885e73",
|
||||
)
|
||||
@@ -21,6 +21,12 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage):
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("main", branch="main", submodules=True)
|
||||
version(
|
||||
"2.1.0", tag="v2.1.0", commit="bc787f21deca9239928182e27400133934c62658", submodules=True
|
||||
)
|
||||
version(
|
||||
"2.0.0", tag="v2.0.0", commit="ea448365033fc6bc9ee0febeb369b377f4fd8240", submodules=True
|
||||
)
|
||||
version(
|
||||
"1.4.0", tag="v1.4.0", commit="bdddf133e41a9b7b4c8ce28f1ea1bebec47678f5", submodules=True
|
||||
)
|
||||
@@ -91,7 +97,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 +110,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
|
||||
|
||||
@@ -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",
|
||||
)
|
||||
|
||||
@@ -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",
|
||||
)
|
||||
|
||||
@@ -11,29 +11,32 @@ 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")
|
||||
depends_on("py-cryptography@3.3.2:40.0.1")
|
||||
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)
|
||||
|
||||
@@ -14,14 +14,21 @@ 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("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")
|
||||
|
||||
@@ -44,6 +44,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"),
|
||||
|
||||
@@ -27,7 +27,7 @@ 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")
|
||||
|
||||
@@ -59,6 +59,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.
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -94,6 +94,7 @@ 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")
|
||||
|
||||
@@ -109,6 +110,7 @@ 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")
|
||||
|
||||
@@ -149,6 +151,7 @@ def cmake_args(self):
|
||||
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_VTUNE", "vtune"),
|
||||
self.define_from_variant("WITH_KOKKOS", "kokkos"),
|
||||
]
|
||||
|
||||
@@ -181,6 +184,10 @@ def cmake_args(self):
|
||||
# ${CUDA_TOOLKIT_ROOT_DIR}/extras/CUPTI
|
||||
args.append("-DCUPTI_PREFIX=%s" % spec["cuda"].prefix)
|
||||
|
||||
if "+vtune" in spec:
|
||||
itt_dir = join_path(spec["intel-oneapi-vtune"].prefix, "vtune", "latest")
|
||||
args.append("-DITT_PREFIX=%s" % itt_dir)
|
||||
|
||||
if "+rocm" in spec:
|
||||
args.append("-DCMAKE_CXX_COMPILER={0}".format(spec["hip"].hipcc))
|
||||
args.append("-DROCM_PREFIX=%s" % spec["hsa-rocr-dev"].prefix)
|
||||
|
||||
@@ -16,6 +16,7 @@ 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")
|
||||
|
||||
@@ -15,4 +15,5 @@ class Cjson(CMakePackage):
|
||||
|
||||
license("MIT")
|
||||
|
||||
version("1.7.17", sha256="51f3b07aece8d1786e74b951fd92556506586cb36670741b6bfb79bf5d484216")
|
||||
version("1.7.15", sha256="c55519316d940757ef93a779f1db1ca809dbf979c551861f339d35aaea1c907c")
|
||||
|
||||
@@ -14,8 +14,9 @@ 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.1", sha256="73b7ec52261ce8fe980a29df6b4ceb66243bb0b779451dbd3d014cfec9fdbb58")
|
||||
version("2.3.2", sha256="aac0ab42108131ac5d3344a9db0fdf25c4db652296641955720a4fbe52334e22")
|
||||
version("2.3.1", sha256="378da73d2d1d9a7b82ad6ed2b5bda3e7bc7093c4034a1d680a2e009eb067e7b2")
|
||||
version("2.1.1", sha256="d69023d1d0ab6a22be86b4f59d449422bc5efd9121868f4e284d6042e52f682e")
|
||||
@@ -26,5 +27,10 @@ class Cli11(CMakePackage):
|
||||
depends_on("cmake@3.4:", type="build")
|
||||
|
||||
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
|
||||
|
||||
@@ -13,16 +13,17 @@ 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("pkgconfig", type="build")
|
||||
depends_on("coinutils")
|
||||
depends_on("osi")
|
||||
depends_on("pkgconfig", type="build")
|
||||
|
||||
build_directory = "spack-build"
|
||||
|
||||
@@ -29,6 +29,7 @@ class Cmake(Package):
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("master", branch="master")
|
||||
version("3.29.2", sha256="36db4b6926aab741ba6e4b2ea2d99c9193222132308b4dc824d4123cb730352e")
|
||||
version("3.27.9", sha256="609a9b98572a6a5ea477f912cffb973109ed4d0a6a6b3f9e2353d2cdc048708e")
|
||||
version("3.26.6", sha256="070b9a2422e666d2c1437e2dab239a236e8a63622d0a8d0ffe9e389613d2b76a")
|
||||
version("3.25.3", sha256="cc995701d590ca6debc4245e9989939099ca52827dd46b5d3592f093afe1901c")
|
||||
@@ -59,6 +60,12 @@ class Cmake(Package):
|
||||
version("2.8.10.2", sha256="ce524fb39da06ee6d47534bbcec6e0b50422e18b62abc4781a4ba72ea2910eb1")
|
||||
|
||||
with default_args(deprecated=True):
|
||||
version(
|
||||
"3.29.1", sha256="7fb02e8f57b62b39aa6b4cf71e820148ba1a23724888494735021e32ab0eefcc"
|
||||
)
|
||||
version(
|
||||
"3.29.0", sha256="a0669630aae7baa4a8228048bf30b622f9e9fd8ee8cedb941754e9e38686c778"
|
||||
)
|
||||
version(
|
||||
"3.27.8", sha256="fece24563f697870fbb982ea8bf17482c9d5f855d8c9bf0b82463d76c9e8d0cc"
|
||||
)
|
||||
|
||||
@@ -17,6 +17,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")
|
||||
@@ -46,22 +47,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 +72,6 @@ def check(self):
|
||||
def install(self, spec, prefix):
|
||||
make("install")
|
||||
|
||||
if "+python" in spec:
|
||||
if spec.satisfies("+python"):
|
||||
args = std_pip_args + ["--prefix=" + prefix, "."]
|
||||
pip(*args)
|
||||
|
||||
@@ -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(
|
||||
"2024.05.15",
|
||||
sha256="2534807b4f6a4a69661c82dc0da7094f685f0fce6443a9147ee90a21caba9e63",
|
||||
preferred=True,
|
||||
)
|
||||
version(
|
||||
"archive-2024.05.15",
|
||||
sha256="1d907ce5d84331ce8f78125d5fc766184f0fce9a7b340db7f3c4821a7f4b7c4c",
|
||||
)
|
||||
|
||||
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 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,
|
||||
"2015.06.23", sha256="3e955a2072f669b8f357ae746531b37aea921552e415dc219a5dd13577575fb3"
|
||||
)
|
||||
|
||||
# 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.
|
||||
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
|
||||
|
||||
@@ -45,6 +45,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")
|
||||
|
||||
@@ -14,9 +14,15 @@ class Cppad(CMakePackage):
|
||||
git = "https://github.com/coin-or/CppAD.git"
|
||||
|
||||
version("develop", branch="master")
|
||||
version(
|
||||
"20180000.0", sha256="1c355713e720fc5226ff3d6db2909922d46cd7ee0d36ee7985882f86905f655a"
|
||||
)
|
||||
version("20170114", sha256="fa3980a882be2a668a7522146273a1b4f1d8dabe66ad4aafa8964c8c1fd6f957")
|
||||
|
||||
def cmake_args(self):
|
||||
# This package does not obey CMAKE_INSTALL_PREFIX
|
||||
args = ["-Dcppad_prefix=%s" % (self.prefix), "-Dcmake_install_docdir=share/cppad/doc"]
|
||||
args = [
|
||||
self.define("cppad_prefix", self.prefix),
|
||||
self.define("cmake_install_docdir", "share/cppad/doc"),
|
||||
]
|
||||
return args
|
||||
|
||||
@@ -18,6 +18,7 @@ class Cryptopp(MakefilePackage):
|
||||
|
||||
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")
|
||||
@@ -39,7 +40,7 @@ def url_for_version(self, version):
|
||||
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 +52,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}")
|
||||
|
||||
@@ -25,6 +25,20 @@
|
||||
|
||||
preferred_ver = "11.8.0"
|
||||
_versions = {
|
||||
"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",
|
||||
|
||||
@@ -20,6 +20,7 @@ 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")
|
||||
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
"Linux-x86_64": "4fdebe94f0ba3933a422cff3dd05a0ef7a18552ca274dd12564056993f55471d",
|
||||
"Linux-ppc64le": "ad736acc94e88673b04a3156d7d3a408937cac32d083acdfbd8435582cbe15db",
|
||||
"Linux-aarch64": "5b9ac479b1dadaf40464ff3076e45f2ec92581c07df1258a155b5bcd142f6090",
|
||||
}
|
||||
},
|
||||
"2.0.1.2": {
|
||||
"Linux-x86_64": "ededa12ca622baad706ea0a500a358ea51146535466afabd96e558265dc586a2",
|
||||
"Linux-ppc64le": "7176083a4dad44cb0176771be6efb3775748ad30a39292bf7b4584510f1dd811",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
36
var/spack/repos/builtin/packages/dctz/package.py
Executable file
36
var/spack/repos/builtin/packages/dctz/package.py
Executable file
@@ -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 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")
|
||||
|
||||
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
|
||||
42
var/spack/repos/builtin/packages/dedisp/package.py
Normal file
42
var/spack/repos/builtin/packages/dedisp/package.py
Normal file
@@ -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 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)
|
||||
|
||||
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, spec, prefix):
|
||||
# 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(prefix, "lib")
|
||||
incdir = join_path(prefix, "include")
|
||||
mkdirp(libdir)
|
||||
mkdirp(incdir)
|
||||
@@ -128,8 +128,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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user