summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-12-25 15:32:19 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2016-12-25 12:32:19 -0800
commitc3cd948537dc357d4a5e227e9c2f8e85a7a7342d (patch)
treee98bb5a28a8f0fc9ba81e7bcaee5e9b6f71b93f6
parente340f275b81beebd25df2aec368a11c4370abe64 (diff)
downloadspack-c3cd948537dc357d4a5e227e9c2f8e85a7a7342d.tar.gz
spack-c3cd948537dc357d4a5e227e9c2f8e85a7a7342d.tar.bz2
spack-c3cd948537dc357d4a5e227e9c2f8e85a7a7342d.tar.xz
spack-c3cd948537dc357d4a5e227e9c2f8e85a7a7342d.zip
Modify github archive regex to support luaposix (#2677)
-rw-r--r--lib/spack/spack/test/url_parse.py5
-rw-r--r--lib/spack/spack/url.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py
index 65b49faaa1..1466698dbf 100644
--- a/lib/spack/spack/test/url_parse.py
+++ b/lib/spack/spack/test/url_parse.py
@@ -345,3 +345,8 @@ class UrlParseTest(unittest.TestCase):
self.check(
'yorick', '2_2_04',
'https://github.com/dhmunro/yorick/archive/y_2_2_04.tar.gz')
+
+ def test_luaposix_version(self):
+ self.check(
+ 'luaposix', '33.4.0',
+ 'https://github.com/luaposix/luaposix/archive/release-v33.4.0.tar.gz')
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index aa3867b792..9043a5ad3e 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -193,7 +193,7 @@ def parse_version_offset(path, debug=False):
(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),
+ (r'github.com/[^/]+/[^/]+/archive/(?:release-)?v?(\w+(?:[.-]\w+)*)$', path), # noqa
# e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style)
(r'[-_](R\d+[AB]\d*(-\d+)?)', path),