summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
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',