summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-03-13 16:07:38 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2014-03-13 16:08:07 -0700
commitc3b72c3d7c1557a83da48937306709c17404fa27 (patch)
tree3eda8168999d215f4154026589984a7d040d486d
parent03ee31e0e8cf7c58eb4aafc6912e698c0a23427e (diff)
downloadspack-c3b72c3d7c1557a83da48937306709c17404fa27.tar.gz
spack-c3b72c3d7c1557a83da48937306709c17404fa27.tar.bz2
spack-c3b72c3d7c1557a83da48937306709c17404fa27.tar.xz
spack-c3b72c3d7c1557a83da48937306709c17404fa27.zip
Added a force_url option for packages that do not have nice URLs
-rw-r--r--lib/spack/spack/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 24c3ffd35b..9ea0498a87 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -321,6 +321,9 @@ class Package(object):
"""Controls whether install and uninstall check deps before running."""
ignore_dependencies = False
+ """Dirty hack for forcing packages with uninterpretable URLs"""
+ force_url = False
+
def __init__(self, spec):
# These attributes are required for all packages.
@@ -552,11 +555,15 @@ class Package(object):
override this, e.g. for boost versions where you need to ensure that there
are _'s in the download URL.
"""
+ if self.force_url:
+ return self.default_version
return str(version)
def url_for_version(self, version):
"""Gives a URL that you can download a new version of this package from."""
+ if self.force_url:
+ return self.url
return url.substitute_version(self.__class__.url, self.url_version(version))