Skip to content

package requires python version 3:, but spec asked for 2.7.16 #11531

@danlipsa

Description

@danlipsa

I am trying to change the paraview package so that version 5.6 uses python3 and all previous version use python2. So I have the following code:

depends_on('python@3:', when='@5.6:+python', type=('build', 'link', 'run'))
depends_on('[email protected]:2.8', when='@:5.5+python', type=('build', 'link', 'run'))

If I don't do the same branching on all python packages, I will get the error in the title for the following command:

spack spec paraview+python

However, if I specify the version that the previous command chooses, the command works correctly.

spack spec [email protected]+python

Numpy is one of the packages that are needed in paraview. I will have to use:

depends_on('py-numpy', when='@:5.5+python', type=('build', 'run'))
depends_on('py-numpy', when='@5.6:+python', type=('build', 'run'))

instead of the simpler:

depends_on('py-numpy', when='+python', type=('build', 'run'))

to avoid the error in the title. Attached is the package.py that shows this error.
paraview.zip

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingconcretizationtriageThe issue needs to be prioritized

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions