Support scionlib version detection (#2818)

This commit is contained in:
Adam J. Stewart 2017-01-17 12:54:36 -06:00 committed by becker33
parent 1856317777
commit 061076aea9
2 changed files with 8 additions and 0 deletions

View file

@ -364,3 +364,8 @@ def test_luaposix_version(self):
self.check(
'luaposix', '33.4.0',
'https://github.com/luaposix/luaposix/archive/release-v33.4.0.tar.gz')
def test_sionlib_version(self):
self.check(
'sionlib', '1.7.1',
'http://apps.fz-juelich.de/jsc/sionlib/download.php?version=1.7.1')

View file

@ -213,7 +213,9 @@ def parse_version_offset(path, debug=False):
# Search dotted versions:
# e.g., https://gitlab.kitware.com/vtk/vtk/repository/archive.tar.bz2?ref=v7.0.0
# e.g., https://example.com/org/repo/repository/archive.tar.bz2?ref=SomePrefix-2.1.1
# e.g., http://apps.fz-juelich.de/jsc/sionlib/download.php?version=1.7.1
(r'\?ref=(?:.*-|v)*((\d+\.)+\d+).*$', suffix),
(r'\?version=((\d+\.)+\d+)', suffix),
# e.g. boost_1_39_0
(r'((\d+_)+\d+)$', stem),
@ -304,6 +306,7 @@ def parse_name_offset(path, v=None, debug=False):
(r'/([^/]+)[_.-](bin|dist|stable|src|sources)[_.-]%s' % v, path),
(r'github.com/[^/]+/([^/]+)/archive', path),
(r'[^/]+/([^/]+)/repository/archive', path), # gitlab
(r'([^/]+)/download.php', path),
(r'([^/]+)[_.-]v?%s' % v, stem), # prefer the stem
(r'([^/]+)%s' % v, stem),