diff options
author | Wouter Deconinck <wdconinc@gmail.com> | 2022-08-22 16:24:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-22 14:24:36 -0700 |
commit | c92db8a22a968ae6fe62b9bd52df44567206346a (patch) | |
tree | e89c58ef42be04bf92f4488c659c2910b61cd03d /var | |
parent | afecd70bc86236ee777bf6a2543648f9cd1ffa16 (diff) | |
download | spack-c92db8a22a968ae6fe62b9bd52df44567206346a.tar.gz spack-c92db8a22a968ae6fe62b9bd52df44567206346a.tar.bz2 spack-c92db8a22a968ae6fe62b9bd52df44567206346a.tar.xz spack-c92db8a22a968ae6fe62b9bd52df44567206346a.zip |
gaudi: consistent test dependencies when +examples (#32134)
* gaudi: consistent test dependencies when +examples
Gaudi requires testing to be enabled for examples to be built, so all
test dependencies are also there for `+examples`. This PR fixes a
missing pytest dependency when `+examples` is used but no testing is
enabled. The construct with the loop is to ensure the identical
dependencies are always used, even as version ranges my start to differ.
Testing with gaudi_add_tests was added in v35r0. Some nosetests and
QMtests were in the tree before, but not accessible it seems. The
effective dependency since 35.0 is also applied for pytest, extending
the range that was there before disentangling `optional`, at
https://github.com/spack/spack/blob/9d67d1e0346203a20b7ba44940061da855d405ca/var/spack/repos/builtin/packages/gaudi/package.py
* gaudi: version 36.7 in other PR...
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/gaudi/package.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/gaudi/package.py b/var/spack/repos/builtin/packages/gaudi/package.py index 9414c296bb..1dc701c5ce 100644 --- a/var/spack/repos/builtin/packages/gaudi/package.py +++ b/var/spack/repos/builtin/packages/gaudi/package.py @@ -73,7 +73,6 @@ class Gaudi(CMakePackage): depends_on("python@:2", when="@:32.1", type=("build", "run")) depends_on("py-networkx@:2.2", when="^python@:2.7") depends_on("py-networkx", when="^python@3.0.0:") - depends_on("py-nose", type="test") depends_on("py-setuptools@:45", when="^python@:2.7", type="build") depends_on("py-six", type=("build", "run")) depends_on("py-xenv@1:", when="@:34.9", type=("build", "run")) @@ -81,6 +80,16 @@ class Gaudi(CMakePackage): depends_on("root +python +root7 +ssl +tbb +threads") depends_on("zlib") + # Testing dependencies + # Note: gaudi only builds examples when testing enabled + for pv in ( + ["py-nose", "@35:"], + ["py-pytest", "@36.2:"], + ["py-qmtest", "@35:"], + ): + depends_on(pv[0], when=pv[1], type="test") + depends_on(pv[0], when=pv[1] + " +examples") + # Adding these dependencies triggers the build of most optional components depends_on("cppgsl", when="+cppunit") depends_on("cppunit", when="+cppunit") @@ -103,6 +112,7 @@ class Gaudi(CMakePackage): def cmake_args(self): args = [ + # Note: gaudi only builds examples when testing enabled self.define("BUILD_TESTING", self.run_tests or self.spec.satisfies("+examples")), self.define_from_variant("GAUDI_USE_AIDA", "aida"), self.define_from_variant("GAUDI_USE_CPPUNIT", "cppunit"), |