summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-12-19 14:17:18 -0800
committerGitHub <noreply@github.com>2016-12-19 14:17:18 -0800
commit4b7b6768e66635241a24f546c4c5aecf64cd66d3 (patch)
tree8ab60a297ae744e23cd89631fc01c80650dc7d2d /lib
parent46436a09092760dc9d97838701d6b08521a0fc2e (diff)
downloadspack-4b7b6768e66635241a24f546c4c5aecf64cd66d3.tar.gz
spack-4b7b6768e66635241a24f546c4c5aecf64cd66d3.tar.bz2
spack-4b7b6768e66635241a24f546c4c5aecf64cd66d3.tar.xz
spack-4b7b6768e66635241a24f546c4c5aecf64cd66d3.zip
Modify github regex to support NCO. (#2633)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/url_parse.py9
-rw-r--r--lib/spack/spack/url.py2
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py
index 818903c909..1131d2debc 100644
--- a/lib/spack/spack/test/url_parse.py
+++ b/lib/spack/spack/test/url_parse.py
@@ -331,3 +331,12 @@ class UrlParseTest(unittest.TestCase):
self.check(
'xml', '3.98-1.4',
'https://cran.r-project.org/src/contrib/XML_3.98-1.4.tar.gz')
+
+ def test_nco_version(self):
+ self.check(
+ 'nco', '4.6.2-beta03',
+ 'https://github.com/nco/nco/archive/4.6.2-beta03.tar.gz')
+
+ self.check(
+ 'nco', '4.6.3-alpha04',
+ 'https://github.com/nco/nco/archive/4.6.3-alpha04.tar.gz')
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index d377a88bcc..6921770f6c 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -189,7 +189,7 @@ def parse_version_offset(path, debug=False):
(r'github.com/.+/(?:zip|tar)ball/v?((\d+\.)+\d+_(\d+))$', path),
# e.g. https://github.com/hpc/lwgrp/archive/v1.0.1.tar.gz
- (r'github.com/[^/]+/[^/]+/archive/v?(\d+(?:\.\d+)*)$', path),
+ (r'github.com/[^/]+/[^/]+/archive/v?(\w+(?:[.-]\w+)*)$', path),
# e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style)
(r'[-_](R\d+[AB]\d*(-\d+)?)', path),