Add new Version property to handle joined version numbers (#2062)

* Add new version property to handle joined version numbers

* Add unit test for new joined property

* Add documentation on version.up_to() and version.joined
This commit is contained in:
Adam J. Stewart
2016-10-21 09:49:36 -05:00
committed by Todd Gamblin
parent c513fd72fb
commit 52158d9316
9 changed files with 68 additions and 39 deletions

View File

@@ -35,16 +35,16 @@ class Cdd(Package):
homepage = "https://www.inf.ethz.ch/personal/fukudak/cdd_home/cdd.html"
url = "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cdd-061a.tar.gz"
def url_for_version(self, version):
return ("ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cdd-%s.tar.gz" %
str(version.dotted).replace('.', ''))
version('0.61a', '22c24a7a9349dd7ec0e24531925a02d9')
depends_on("libtool", type="build")
patch("Makefile.spack.patch")
def url_for_version(self, version):
url = "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cdd-{0}.tar.gz"
return url.format(version.joined)
def install(self, spec, prefix):
# The Makefile isn't portable; use our own instead
makeargs = ["-f", "Makefile.spack", "PREFIX=%s" % prefix]