summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-12-19 14:55:23 -0800
committerGitHub <noreply@github.com>2016-12-19 14:55:23 -0800
commitc89de04f40aa19c33a5f0279793918ac6fe217fd (patch)
treeaa68d8eb6af4f4f83b5531a72eb5cd1360f37c9b
parentd306893d8327fc27fec97971ab2194cef1a9d36c (diff)
downloadspack-c89de04f40aa19c33a5f0279793918ac6fe217fd.tar.gz
spack-c89de04f40aa19c33a5f0279793918ac6fe217fd.tar.bz2
spack-c89de04f40aa19c33a5f0279793918ac6fe217fd.tar.xz
spack-c89de04f40aa19c33a5f0279793918ac6fe217fd.zip
Support Yorick versions (#2640)
-rw-r--r--lib/spack/spack/test/url_parse.py5
-rw-r--r--lib/spack/spack/url.py4
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 1131d2debc..65b49faaa1 100644
--- a/lib/spack/spack/test/url_parse.py
+++ b/lib/spack/spack/test/url_parse.py
@@ -340,3 +340,8 @@ class UrlParseTest(unittest.TestCase):
self.check(
'nco', '4.6.3-alpha04',
'https://github.com/nco/nco/archive/4.6.3-alpha04.tar.gz')
+
+ def test_yorick_version(self):
+ self.check(
+ 'yorick', '2_2_04',
+ 'https://github.com/dhmunro/yorick/archive/y_2_2_04.tar.gz')
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index 6921770f6c..aa3867b792 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -188,6 +188,10 @@ def parse_version_offset(path, debug=False):
# e.g. https://github.com/petdance/ack/tarball/1.93_02
(r'github.com/.+/(?:zip|tar)ball/v?((\d+\.)+\d+_(\d+))$', path),
+ # Yorick is very special.
+ # e.g. https://github.com/dhmunro/yorick/archive/y_2_2_04.tar.gz
+ (r'github.com/[^/]+/yorick/archive/y_(\d+(?:_\d+)*)$', path),
+
# e.g. https://github.com/hpc/lwgrp/archive/v1.0.1.tar.gz
(r'github.com/[^/]+/[^/]+/archive/v?(\w+(?:[.-]\w+)*)$', path),