summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/url_parse.py7
-rw-r--r--lib/spack/spack/url.py2
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py
index 2a3e3e7e72..00591b2f37 100644
--- a/lib/spack/spack/test/url_parse.py
+++ b/lib/spack/spack/test/url_parse.py
@@ -87,6 +87,13 @@ def test_url_strip_name_suffixes(url, version, expected):
59,
"https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow",
),
+ (
+ "hpcviewer",
+ 30,
+ "2024.02",
+ 51,
+ "https://gitlab.com/hpctoolkit/hpcviewer/-/releases/2024.02/downloads/hpcviewer.tgz",
+ ),
# Version in stem
("zlib", 24, "1.2.10", 29, "http://zlib.net/fossils/zlib-1.2.10.tar.gz"),
(
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index e9f89b02f1..e81eca22f7 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -258,7 +258,9 @@ def parse_version_offset(path):
# 9th Pass: Version in path
# github.com/repo/name/releases/download/vver/name
# e.g. https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow
+ # e.g. https://gitlab.com/hpctoolkit/hpcviewer/-/releases/2024.02/downloads/hpcviewer.tgz
(r"github\.com/[^/]+/[^/]+/releases/download/[a-zA-Z+._-]*v?(\d[\da-zA-Z._-]*)/", path),
+ (r"gitlab\.com/[^/]+/.+/-/releases/[a-zA-Z+._-]*v?(\d[\da-zA-Z._-]*)/downloads/", path),
# e.g. ftp://ftp.ncbi.nlm.nih.gov/blast/executables/legacy.NOTSUPPORTED/2.2.26/ncbi.tar.gz
(r"(\d[\da-zA-Z._-]*)/[^/]+$", path),
]