diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-05-18 16:16:20 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-05-18 16:16:20 -0700 |
commit | f813d823a14f25a8f06c2f0bb7ba88db33c0af68 (patch) | |
tree | cb7be41ae3142157bd18e4f7d00107cc624ee1d2 /var | |
parent | 09151785b3353c0169a6c41771cd471c5207d2cf (diff) | |
parent | f68e64d738054a01b38fd6840fc7932c0912a85c (diff) | |
download | spack-f813d823a14f25a8f06c2f0bb7ba88db33c0af68.tar.gz spack-f813d823a14f25a8f06c2f0bb7ba88db33c0af68.tar.bz2 spack-f813d823a14f25a8f06c2f0bb7ba88db33c0af68.tar.xz spack-f813d823a14f25a8f06c2f0bb7ba88db33c0af68.zip |
Merge branch 'features/optional-deps' into develop
This includes:
- Much better variant support (+debug/-debug)
- Optional dependency support (depends_on(... , when='<condition>')
- New config file format (YAML in ~/.spack)
- New Spec format (YAML in $prefix/.spack/spec.yaml)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/mock_configs/site_spackconfig | 12 | ||||
-rw-r--r-- | var/spack/mock_configs/site_spackconfig/compilers.yaml | 12 | ||||
-rw-r--r-- | var/spack/mock_configs/user_spackconfig | 0 | ||||
-rw-r--r-- | var/spack/mock_packages/a/package.py | 12 | ||||
-rw-r--r-- | var/spack/mock_packages/b/package.py | 12 | ||||
-rw-r--r-- | var/spack/mock_packages/c/package.py | 12 | ||||
-rw-r--r-- | var/spack/mock_packages/e/package.py | 12 | ||||
-rw-r--r-- | var/spack/mock_packages/mpich/package.py | 3 | ||||
-rw-r--r-- | var/spack/mock_packages/mpileaks/package.py | 3 | ||||
-rw-r--r-- | var/spack/mock_packages/optional-dep-test-2/package.py | 18 | ||||
-rw-r--r-- | var/spack/mock_packages/optional-dep-test/package.py | 29 | ||||
-rw-r--r-- | var/spack/packages/python/package.py | 4 |
12 files changed, 116 insertions, 13 deletions
diff --git a/var/spack/mock_configs/site_spackconfig b/var/spack/mock_configs/site_spackconfig deleted file mode 100644 index 1358720362..0000000000 --- a/var/spack/mock_configs/site_spackconfig +++ /dev/null @@ -1,12 +0,0 @@ -[compiler "gcc@4.5.0"] - cc = /path/to/gcc - cxx = /path/to/g++ - f77 = /path/to/gfortran - fc = /path/to/gfortran - -[compiler "clang@3.3"] - cc = /path/to/clang - cxx = /path/to/clang++ - f77 = None - fc = None - diff --git a/var/spack/mock_configs/site_spackconfig/compilers.yaml b/var/spack/mock_configs/site_spackconfig/compilers.yaml new file mode 100644 index 0000000000..0a2dc893e2 --- /dev/null +++ b/var/spack/mock_configs/site_spackconfig/compilers.yaml @@ -0,0 +1,12 @@ +compilers: + all: + clang@3.3: + cc: /path/to/clang + cxx: /path/to/clang++ + f77: None + fc: None + gcc@4.5.0: + cc: /path/to/gcc + cxx: /path/to/g++ + f77: /path/to/gfortran + fc: /path/to/gfortran diff --git a/var/spack/mock_configs/user_spackconfig b/var/spack/mock_configs/user_spackconfig deleted file mode 100644 index e69de29bb2..0000000000 --- a/var/spack/mock_configs/user_spackconfig +++ /dev/null diff --git a/var/spack/mock_packages/a/package.py b/var/spack/mock_packages/a/package.py new file mode 100644 index 0000000000..fa63c08df0 --- /dev/null +++ b/var/spack/mock_packages/a/package.py @@ -0,0 +1,12 @@ +from spack import * + +class A(Package): + """Simple package with no dependencies""" + + homepage = "http://www.example.com" + url = "http://www.example.com/a-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/mock_packages/b/package.py b/var/spack/mock_packages/b/package.py new file mode 100644 index 0000000000..cb88aa2157 --- /dev/null +++ b/var/spack/mock_packages/b/package.py @@ -0,0 +1,12 @@ +from spack import * + +class B(Package): + """Simple package with no dependencies""" + + homepage = "http://www.example.com" + url = "http://www.example.com/b-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/mock_packages/c/package.py b/var/spack/mock_packages/c/package.py new file mode 100644 index 0000000000..f51b913fa9 --- /dev/null +++ b/var/spack/mock_packages/c/package.py @@ -0,0 +1,12 @@ +from spack import * + +class C(Package): + """Simple package with no dependencies""" + + homepage = "http://www.example.com" + url = "http://www.example.com/c-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/mock_packages/e/package.py b/var/spack/mock_packages/e/package.py new file mode 100644 index 0000000000..76c6b64c7f --- /dev/null +++ b/var/spack/mock_packages/e/package.py @@ -0,0 +1,12 @@ +from spack import * + +class E(Package): + """Simple package with no dependencies""" + + homepage = "http://www.example.com" + url = "http://www.example.com/e-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + def install(self, spec, prefix): + pass diff --git a/var/spack/mock_packages/mpich/package.py b/var/spack/mock_packages/mpich/package.py index 75a939a892..f77d3efc5d 100644 --- a/var/spack/mock_packages/mpich/package.py +++ b/var/spack/mock_packages/mpich/package.py @@ -30,6 +30,9 @@ class Mpich(Package): list_url = "http://www.mpich.org/static/downloads/" list_depth = 2 + variant('debug', default=False, + description="Compile MPICH with debug flags.") + version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') version('3.0.3', 'foobarbaz') version('3.0.2', 'foobarbaz') diff --git a/var/spack/mock_packages/mpileaks/package.py b/var/spack/mock_packages/mpileaks/package.py index c6be37bc13..3989f1b452 100644 --- a/var/spack/mock_packages/mpileaks/package.py +++ b/var/spack/mock_packages/mpileaks/package.py @@ -33,6 +33,9 @@ class Mpileaks(Package): version(2.2, 'foobarbaz') version(2.3, 'foobarbaz') + variant('debug', default=False, description='Debug variant') + variant('opt', default=False, description='Optimized variant') + depends_on("mpi") depends_on("callpath") diff --git a/var/spack/mock_packages/optional-dep-test-2/package.py b/var/spack/mock_packages/optional-dep-test-2/package.py new file mode 100644 index 0000000000..ef0587588e --- /dev/null +++ b/var/spack/mock_packages/optional-dep-test-2/package.py @@ -0,0 +1,18 @@ +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 diff --git a/var/spack/mock_packages/optional-dep-test/package.py b/var/spack/mock_packages/optional-dep-test/package.py new file mode 100644 index 0000000000..bb57576ca9 --- /dev/null +++ b/var/spack/mock_packages/optional-dep-test/package.py @@ -0,0 +1,29 @@ +from spack import * + +class OptionalDepTest(Package): + """Description""" + + homepage = "http://www.example.com" + url = "http://www.example.com/optional_dep_test-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + version('1.1', '0123456789abcdef0123456789abcdef') + + variant('a', default=False) + variant('f', default=False) + variant('mpi', default=False) + + depends_on('a', when='+a') + depends_on('b', when='@1.1') + depends_on('c', when='%intel') + depends_on('d', when='%intel@64.1') + depends_on('e', when='%clang@34:40') + + depends_on('f', when='+f') + depends_on('g', when='^f') + depends_on('mpi', when='^g') + + depends_on('mpi', when='+mpi') + + def install(self, spec, prefix): + pass diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py index 31a12ea653..797900527d 100644 --- a/var/spack/packages/python/package.py +++ b/var/spack/packages/python/package.py @@ -139,7 +139,9 @@ class Python(Package): def activate(self, ext_pkg, **args): - args.update(ignore=self.python_ignore(ext_pkg, args)) + ignore=self.python_ignore(ext_pkg, args) + args.update(ignore=ignore) + super(Python, self).activate(ext_pkg, **args) exts = spack.install_layout.extension_map(self.spec) |