py-numpy: conflict with gcc11 and switch master to main (#24573)
Fix syntax of conflict between numpy 1.21.0 and gcc11 to that the clingo concretizer recognizes it. In addition the upstream master branch was renamed to main.
This commit is contained in:
parent
e284cd136a
commit
1eb2798c43
1 changed files with 8 additions and 4 deletions
|
@ -3,10 +3,11 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
import platform
|
||||
import subprocess
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyNumpy(PythonPackage):
|
||||
"""NumPy is the fundamental package for scientific computing with Python.
|
||||
|
@ -21,7 +22,8 @@ class PyNumpy(PythonPackage):
|
|||
|
||||
maintainers = ['adamjstewart']
|
||||
|
||||
version('master', branch='master')
|
||||
version('main', branch='main')
|
||||
version('master', branch='main', deprecated=True)
|
||||
version('1.21.0', sha256='e80fe25cba41c124d04c662f33f6364909b985f2eb5998aaa5ae4b9587242cce')
|
||||
version('1.20.3', sha256='e55185e51b18d788e49fe8305fd73ef4470596b33fc2c1ceb304566b99c71a69')
|
||||
version('1.20.2', sha256='878922bf5ad7550aa044aa9301d417e2d3ae50f0f577de92051d739ac6096cee')
|
||||
|
@ -115,8 +117,9 @@ class PyNumpy(PythonPackage):
|
|||
patch('check_executables4.patch', when='@1.14.0:1.15.4')
|
||||
patch('check_executables5.patch', when='@:1.13.3')
|
||||
|
||||
# https://github.com/numpy/numpy/releases/tag/v1.21.0
|
||||
conflicts('%gcc@11.1', when='@1.21.0')
|
||||
# version 1.21.0 runs into an infinit loop during printing
|
||||
# (e.g. print(numpy.ones(1000)) when compiled with gcc 11
|
||||
conflicts('%gcc@11:', when='@1.21.0')
|
||||
|
||||
# GCC 4.8 is the minimum version that works
|
||||
conflicts('%gcc@:4.7', msg='GCC 4.8+ required')
|
||||
|
@ -150,6 +153,7 @@ def flag_handler(self, name, flags):
|
|||
'{0}'.format(gcc_version))
|
||||
if gcc_version <= Version('5.1'):
|
||||
flags.append(self.compiler.c99_flag)
|
||||
|
||||
return (flags, None, None)
|
||||
|
||||
@run_before('build')
|
||||
|
|
Loading…
Reference in a new issue