New operations for manipulating spec and package DAGs.
For specs:
flatten: gather all deps to the root
normalize: Merge constraints and make spec match package DAG
For packages:
validate_dependencies: Make sure spec constraints in package DAG are sane.
Added tests for above methods. Also added beginnings of concretization logic,
to turn abstract spec into a concrete one.
Still need proper tests for normalize().
- Specs can be "constrained" by other specs, throw exceptions when constraint
can't be satisfied.
- Normalize will put a spec in DAG form and merge all package constraints with
the spec.
- Ready to add concretization policies for abstract specs now.
Experimental feature automatically parses versions out of web pages and prints what
it thinks are avaialble versions of a package, e.g.:
$ spack list -v libunwind
1.1 1.0 0.98.6 0.98.4 0.98.2 0.98 0.96 0.93 0.91 0.1
1.0.1 0.99 0.98.5 0.98.3 0.98.1 0.97 0.95 0.92 0.9 0.0
spec.py can parse full dependence specs like this:
openmpi@1.4.3:1.4.5%intel+debug ^hwloc@1.2
These will be used to specify how to install packages and their dependencies,
as well as to specify restrictions (e.g., on particular versions) for
dependencies. e.g.:
class SomePackage(Package):
depends_on('boost@1.46,1.49')
This would require either of those two versions of boost.
This also moves depends_on out to relations.py and adds
"provides", which will allow packages to provide virtual
dependences.
This is just initial implementation of the parsing and objects
to represent specs. They're not integrated with packages yet.
You can now do this:
class MyPackage(Package):
def install(self):
...default install...
@platform('bgqos_0')
def install(self):
...specialized install for bgq...
This works on functions other than install, as well (as long as they're in a Package)