
- Can depend conditionally based on variant, compiler, arch, deps, etc - normalize() is not iterative yet: no chaining depends_ons - really need a SAT solver, but iterative will at least handle simple cases. - Added "strict" option to Spec.satisfies() - strict checks that ALL of other's constraints are met (not just the ones self shares) - Consider splitting these out into two methods: could_satisfy() and satisfies() - didn't do this yet as it would require changing code that uses satisfies() - Changed semantics of __contains__ to use strict satisfaction (SPACK-56) - Added tests for optional dependencies. - The constrain() method on Specs, compilers, versions, etc. now returns whether the spec changed as a result of the call.
19 lines
496 B
Python
19 lines
496 B
Python
from spack import *
|
|
|
|
class OptionalDepTest2(Package):
|
|
"""Depends on the optional-dep-test package"""
|
|
|
|
homepage = "http://www.example.com"
|
|
url = "http://www.example.com/optional-dep-test-2-1.0.tar.gz"
|
|
|
|
version('1.0', '0123456789abcdef0123456789abcdef')
|
|
|
|
variant('odt', default=False)
|
|
variant('mpi', default=False)
|
|
|
|
depends_on('optional-dep-test', when='+odt')
|
|
depends_on('optional-dep-test+mpi', when='+mpi')
|
|
|
|
def install(self, spec, prefix):
|
|
pass
|