Add support for .txz and .tbz2 file extensions (#12048)

This commit is contained in:
Adam J. Stewart 2019-07-17 16:23:23 -05:00 committed by GitHub
parent b856e24444
commit 7f3048c8af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 9 deletions

View File

@ -219,6 +219,7 @@ def test_url_parse_offset(name, noffset, ver, voffset, path):
# name/downloads/name-ver.ver
('dolfin', '2016.1.0',
'https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-2016.1.0.tar.gz'),
# Common Repositories - sourceforge downloads
# name-ver.ver
@ -357,6 +358,47 @@ def test_url_parse_offset(name, noffset, ver, voffset, path):
('STAR-CCM+', '11.06.010_02',
'file://{0}/STAR-CCM+11.06.010_02_linux-x86_64.tar.gz'.format(os.getcwd())),
# Various extensions
# .tar.gz
('libXcursor', '1.1.14',
'https://www.x.org/archive/individual/lib/libXcursor-1.1.14.tar.gz'),
# .tar.bz2
('mpfr', '4.0.1', 'https://ftpmirror.gnu.org/mpfr/mpfr-4.0.1.tar.bz2'),
# .tar.xz
('pkgconf', '1.5.4',
'http://distfiles.dereferenced.org/pkgconf/pkgconf-1.5.4.tar.xz'),
# .tar.Z
('Gblocks', '0.91b',
'http://molevol.cmima.csic.es/castresana/Gblocks/Gblocks_Linux64_0.91b.tar.Z'),
# .tar.zip
('bcl2fastq2', '2.19.1.403',
'ftp://webdata2:webdata2@ussd-ftp.illumina.com/downloads/software/bcl2fastq/bcl2fastq2-v2.19.1.403-tar.zip'),
# .tar, .TAR
('python-meep', '1.4.2',
'https://launchpad.net/python-meep/1.4/1.4/+download/python-meep-1.4.2.tar'),
('python-meep', '1.4.2',
'https://launchpad.net/python-meep/1.4/1.4/+download/python-meep-1.4.2.TAR'),
# .gz
('libXcursor', '1.1.14',
'https://www.x.org/archive/individual/lib/libXcursor-1.1.14.gz'),
# .bz2
('mpfr', '4.0.1', 'https://ftpmirror.gnu.org/mpfr/mpfr-4.0.1.bz2'),
# .xz
('pkgconf', '1.5.4',
'http://distfiles.dereferenced.org/pkgconf/pkgconf-1.5.4.xz'),
# .Z
('Gblocks', '0.91b',
'http://molevol.cmima.csic.es/castresana/Gblocks/Gblocks_Linux64_0.91b.Z'),
# .zip
('bliss', '0.73', 'http://www.tcs.hut.fi/Software/bliss/bliss-0.73.zip'),
# .tgz
('ADOL-C', '2.6.1',
'http://www.coin-or.org/download/source/ADOL-C/ADOL-C-2.6.1.tgz'),
# .tbz2
('mpfr', '4.0.1', 'https://ftpmirror.gnu.org/mpfr/mpfr-4.0.1.tbz2'),
# .txz
('kim-api', '2.1.0', 'https://s3.openkim.org/kim-api/kim-api-2.1.0.txz'),
# Weird URLS
# github.com/repo/name/releases/download/name-vver/name

View File

@ -285,6 +285,9 @@ def strip_name_suffixes(path, version):
r'snapshot',
r'distrib',
# Arch
r'Linux64',
# VCS
r'0\+bzr',

View File

@ -10,7 +10,7 @@
# Supported archive extensions.
PRE_EXTS = ["tar", "TAR"]
EXTS = ["gz", "bz2", "xz", "Z", "zip", "tgz"]
EXTS = ["gz", "bz2", "xz", "Z", "zip", "tgz", "tbz2", "txz"]
# Add PRE_EXTS and EXTS last so that .tar.gz is matched *before* .tar or .gz
ALLOWED_ARCHIVE_TYPES = [".".join(l) for l in product(

View File

@ -20,7 +20,7 @@ class KimApi(CMakePackage):
To obtain all models archived at https://openkim.org that are
compatible with the kim-api package, install and activate the
openkim-models pacakge too.
openkim-models package too.
"""
extendable = True
homepage = "https://openkim.org/"
@ -28,5 +28,5 @@ class KimApi(CMakePackage):
git = "https://github.com/openkim/kim-api.git"
version('develop', branch='devel')
version('2.1.0', sha256="d6b154b31b288ec0a5643db176950ed71f1ca83a146af210a1d5d01cce8ce958", extension='txz', url='https://s3.openkim.org/kim-api/kim-api-2.1.0.txz')
version('2.0.2', sha256="26e7cf91066692f316b8ba1548ccb7152bf56aad75902bce2338cff53e74e63d", extension='txz', url='https://s3.openkim.org/kim-api/kim-api-2.0.2.txz')
version('2.1.0', sha256="d6b154b31b288ec0a5643db176950ed71f1ca83a146af210a1d5d01cce8ce958")
version('2.0.2', sha256="26e7cf91066692f316b8ba1548ccb7152bf56aad75902bce2338cff53e74e63d")

View File

@ -23,11 +23,7 @@ class OpenkimModels(CMakePackage):
extends('kim-api')
version(
'2019-03-29',
sha256='053dda2023fe4bb6d7c1d66530c758c4e633bbf1f1be17b6b075b276fe8874f6',
extension='txz',
url='https://s3.openkim.org/archives/collection/openkim-models-2019-03-29.txz')
version('2019-03-29', sha256='053dda2023fe4bb6d7c1d66530c758c4e633bbf1f1be17b6b075b276fe8874f6')
def cmake_args(self):
args = []