diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2016-03-18 13:03:55 -0500 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2016-03-18 13:03:55 -0500 |
commit | 6acb830263e663b57bc8c077b348c897b0d1f612 (patch) | |
tree | ef286f3031bb6e51ddc81eba061e8733262470dc | |
parent | 179ed7cce642040f07ad94140b1e3cf6867b6936 (diff) | |
download | spack-6acb830263e663b57bc8c077b348c897b0d1f612.tar.gz spack-6acb830263e663b57bc8c077b348c897b0d1f612.tar.bz2 spack-6acb830263e663b57bc8c077b348c897b0d1f612.tar.xz spack-6acb830263e663b57bc8c077b348c897b0d1f612.zip |
Add support for .tar files
-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) |