diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-18 11:13:17 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-18 11:13:17 -0700 |
commit | 4e9ba4927224602216c8146aeb88cdc0d4342f98 (patch) | |
tree | eb59c8ecbc981c9476c2f0dc22158a4dd4cb5324 /lib | |
parent | fb60d01f6a65881d7eb53c402fc04843380c9076 (diff) | |
parent | 6acb830263e663b57bc8c077b348c897b0d1f612 (diff) | |
download | spack-4e9ba4927224602216c8146aeb88cdc0d4342f98.tar.gz spack-4e9ba4927224602216c8146aeb88cdc0d4342f98.tar.bz2 spack-4e9ba4927224602216c8146aeb88cdc0d4342f98.tar.xz spack-4e9ba4927224602216c8146aeb88cdc0d4342f98.zip |
Merge pull request #576 from adamjstewart/features/tar
Add support for .tar files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/url.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/util/compression.py | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index ad551a6ded..f51f05cad7 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -142,7 +142,7 @@ def split_url_extension(path): def downloaded_file_extension(path): """This returns the type of archive a URL refers to. This is - sometimes confusing becasue of URLs like: + sometimes confusing because of URLs like: (1) https://github.com/petdance/ack/tarball/1.93_02 diff --git a/lib/spack/spack/util/compression.py b/lib/spack/spack/util/compression.py index ea1f233bce..5ae5867428 100644 --- a/lib/spack/spack/util/compression.py +++ b/lib/spack/spack/util/compression.py @@ -27,13 +27,12 @@ import os from itertools import product from spack.util.executable import which -# Supported archvie extensions. +# Supported archive extensions. PRE_EXTS = ["tar"] EXTS = ["gz", "bz2", "xz", "Z", "zip", "tgz"] -# Add EXTS last so that .tar.gz is matched *before* tar.gz -ALLOWED_ARCHIVE_TYPES = [".".join(l) for l in product(PRE_EXTS, EXTS)] + EXTS - +# 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(PRE_EXTS, EXTS)] + PRE_EXTS + EXTS def allowed_archive(path): return any(path.endswith(t) for t in ALLOWED_ARCHIVE_TYPES) |