summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAndrew W Elble <aweits@rit.edu>2020-07-24 11:46:56 -0400
committerGitHub <noreply@github.com>2020-07-24 17:46:56 +0200
commit99c46e818629b18f06ac0bc3cde5aa4f7c5c897f (patch)
treeeb4a5b92062c0e988dcfac49908e59d37702666a /var
parent30d0347825b7e90652debebc4453d807ea1934c0 (diff)
downloadspack-99c46e818629b18f06ac0bc3cde5aa4f7c5c897f.tar.gz
spack-99c46e818629b18f06ac0bc3cde5aa4f7c5c897f.tar.bz2
spack-99c46e818629b18f06ac0bc3cde5aa4f7c5c897f.tar.xz
spack-99c46e818629b18f06ac0bc3cde5aa4f7c5c897f.zip
py-astropy: force re-cythonization of distributed .pyx files (#17567)
astropy 3.2.1 fails to build with python 3.8.3 with errors similar to this: astropy/stats/_stats.c:318:11: error: too many arguments to function 'PyCode_New' PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) These are files that are generated by cython, but are included in the tarball. Since there's apparently been an API change to PyCode_New, they will need to be re-cythonized to compile correctly.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-astropy/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py
index 1e85cbf070..40009e6d11 100644
--- a/var/spack/repos/builtin/packages/py-astropy/package.py
+++ b/var/spack/repos/builtin/packages/py-astropy/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
+import os
class PyAstropy(PythonPackage):
@@ -52,6 +53,7 @@ class PyAstropy(PythonPackage):
depends_on('py-asdf@2.3:', when='+extras', type=('build', 'run'))
depends_on('py-bottleneck', when='+extras', type=('build', 'run'))
depends_on('py-pytest', when='+extras', type=('build', 'run'))
+ depends_on('py-cython', type='build')
# System dependencies
depends_on('erfa')
@@ -59,6 +61,13 @@ class PyAstropy(PythonPackage):
depends_on('cfitsio')
depends_on('expat')
+ def patch(self):
+ # forces the rebuild of files with cython
+ # avoids issues with PyCode_New() in newer
+ # versions of python in the distributed
+ # cython-ized files
+ os.remove('astropy/cython_version.py')
+
def build_args(self, spec, prefix):
args = [
'--use-system-libraries',