From c3b72c3d7c1557a83da48937306709c17404fa27 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 13 Mar 2014 16:07:38 -0700 Subject: Added a force_url option for packages that do not have nice URLs --- lib/spack/spack/package.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') 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)) -- cgit v1.2.3-70-g09d2