diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/package.py | 7 |
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)) |