spack: spack install --test root not working properly in environment
Steps to reproduce
When installing py-numpy in a environment with other root packages and the --test root flag is set, it fails to build because it cannot find py-pytest and it doesn’t show up as a dependency in the concretization.
spack add lbann@gitlab-pip-ivybridge +lld +deterministic +vision +numpy +onednn +half +fft ^hydrogen@develop ^dihydrogen@develop ^aluminum@master %clang ^mvapich2 ^hwloc@1.11.13 ^libtool@2.4.2 ^python@3.9.10
spack develop --no-clone -p /usr/WS2/lbannusr/brian-lbann.git lbann@gitlab-pip-ivybridge
spack add py-numpy@1.16.0:
spack concretize --reuse --test root
spack install --reuse -j26 --test root
Error message
==> [2022-03-09-13:26:12.477072] '/usr/WS2/lbannusr/spack_installed_packages/catalyst/opt/spack/linux-rhel7-ivybridge/clang-12.0.1/python-3.9.10-qassf33p2hkuptbbkb2yzlq4odqmngej/bin/python3.9' '-c' 'import numpy; numpy.test("full", verbose=2)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/WS2/lbannusr/spack_installed_packages/catalyst/opt/spack/linux-rhel7-ivybridge/clang-12.0.1/py-numpy-1.22.2-wasb6dleomiv433qdtmlkn3msjhzzeqp/lib/python3.9/site-packages/numpy/_pytesttester.py", line 128, in __call__
import pytest
ModuleNotFoundError: No module named 'pytest'
spack_lock.txt spack_yaml.txt spack-build-env.txt spack-build-lbann-gitlab-pip-ivybridge.log spack-build-out.txt
Information on your system
This happened on pascal, catalyst, and lassen at LLNL LC.
* **Spack:** 0.17.1-1431-1c23f5abe0
* **Python:** 3.7.2
* **Platform:** linux-rhel7-ivybridge
* **Concretizer:** clingo
General information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have searched the issues of this repo and believe this is not a duplicate
- I have run the failing commands in debug mode and reported the output
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 2
- Comments: 21 (20 by maintainers)
Commits related to this issue
- Updated the minimum spack commit required to enable the package requires feature that can be used to inform the concretize of hard constraints. Added dependencies on pytest for both py-scipy and py-n... — committed to bvanessen/lbann by bvanessen 4 years ago
- Updated the build_script and CI pipeline to use the new Spack variant +unit_tests to enable catch2 testing support in LBANN. This removes the need to use the spack install --test root feature which i... — committed to bvanessen/lbann by bvanessen 4 years ago
- Updated the minimum spack commit required to enable the package requires feature that can be used to inform the concretize of hard constraints. Added dependencies on pytest for both py-scipy and py-n... — committed to bvanessen/lbann by bvanessen 4 years ago
- Updated the build_script and CI pipeline to use the new Spack variant +unit_tests to enable catch2 testing support in LBANN. This removes the need to use the spack install --test root feature which i... — committed to bvanessen/lbann by bvanessen 4 years ago
- Bugfix ci (#2136) * Removed Ray as a valid CI target since it has been decomissioned * Tweaked the MPI catch testing to use LBANN_NNODES env variable * Apply suggestions from code review Co-... — committed to LBANN/lbann by bvanessen 4 years ago
- Pass `tests` argument to solver method when concretizing together to make the workaround for #29447 work with `concretizer:unify:true` option — committed to elenimath/spack by elenimath 4 years ago
- Pass `tests` argument to solver method when concretizing together (#35290) to make the workaround for #29447 work with `concretizer:unify:true` option — committed to spack/spack by elenimath 4 years ago
- Pass `tests` argument to solver method when concretizing together (#35290) to make the workaround for #29447 work with `concretizer:unify:true` option — committed to spack/spack by elenimath 4 years ago
- Pass `tests` argument to solver method when concretizing together (#35290) to make the workaround for #29447 work with `concretizer:unify:true` option — committed to spack/spack by elenimath 4 years ago
- Pass `tests` argument to solver method when concretizing together (#35290) to make the workaround for #29447 work with `concretizer:unify:true` option — committed to koysean/spack by elenimath 4 years ago
- Pass `tests` argument to solver method when concretizing together (#35290) to make the workaround for #29447 work with `concretizer:unify:true` option — committed to spack/spack by elenimath 4 years ago
- Pass `tests` argument to solver method when concretizing together (#35290) to make the workaround for #29447 work with `concretizer:unify:true` option — committed to spack/spack by elenimath 4 years ago
- Pass `tests` argument to solver method when concretizing together (#35290) to make the workaround for #29447 work with `concretizer:unify:true` option — committed to key4hep/spack by elenimath 4 years ago
- Spack-solvable versions, add tests to Spack workflow (#2156) ## Changes 1. Spack interprets version info consisting of 2-tuples as ranges, leading to v0.8 being uninstallable if there has been a ... — committed to arbor-sim/arbor by brenthuisman 3 years ago
@alalazo
This seems to happen even outside of environments, staying with the podio example:
spack install --test=root podioseems to work and install podio, but the tests are not runOn the other hand
spack dev-build --test=root podio@masterruns into the problem that catch2 is not in the build environment and podio fails at the cmake stage.