Project

General

Profile

Bug #24789

pull request upstream: +usesystemlib on py-astropy

Added by Marc Mengel 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/14/2020
Due date:
% Done:

0%

Estimated time:
Duration:

Description

diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin
/packages/py-astropy/package.py
index 1e85cbf..38b66fd 100644
--- a/var/spack/repos/builtin/packages/py-astropy/package.py
+++ b/var/spack/repos/builtin/packages/py-astropy/package.py
@ -14,12 +14,14 @ class PyAstropy(PythonPackage):
homepage = 'http://www.astropy.org/'
url = 'https://pypi.io/packages/source/a/astropy/astropy-3.2.1.tar.gz'

+ version('4.0', sha256='404200e0baa84de09ac563ad9ccab3817e9b9669d0025cee74a8752f4bc2771b'
)
version('3.2.1', sha256='706c0457789c78285e5464a5a336f5f0b058d646d60f4e5f5ba1f7d5bf424b2
8')
version('2.0.14', sha256='618807068609a4d8aeb403a07624e9984f566adc0dc0f5d6b477c3658f31ae
b6')
version('1.1.2', sha256='6f0d84cd7dfb304bb437dda666406a1d42208c16204043bc920308ff8ffdfad
1')
version('1.1.post1', sha256='64427ec132620aeb038e4d8df94d6c30df4cc8b1c42a6d8c5b09907a315
66a21')

variant('extras', default=False, description='Enable extra functionality')
+ variant('usesystemlib', default=True, description='Use external libraries for erfa, wcsl
ib, cfitsio and expat')
  1. Required dependencies
    depends_on(':', when='4.0:', type=('build', 'run'))
    @ -54,10 +56,10 @@ class PyAstropy(PythonPackage):
    depends_on('py-pytest', when='+extras', type=('build', 'run'))
  1. System dependencies
    - depends_on('erfa')
    - depends_on('wcslib')
    - depends_on('cfitsio')
    - depends_on('expat')
    + depends_on('erfa', when='+usesystemlib')
    + depends_on('wcslib', when='+usesystemlib')
    + depends_on('cfitsio', when='+usesystemlib')
    + depends_on('expat', when='+usesystemlib')
def build_args(self, spec, prefix):
args = [
@ -68,6 +70,9 @ def build_args(self, spec, prefix):
'--use-system-expat'
]

+ if spec.satisfies('-usesystemlib'):
+ args = []
+
if spec.satisfies('^python@3:'):
args.extend(['-j', str(make_jobs)])


Related issues

Has duplicate Spack Infrastructure - Feature #24487: py-astropy variant from vitoNew05/27/2020

History

#1 Updated by Marc Mengel 2 months ago

Made branch feature/astropy_usesystemlibs_variant

#2 Updated by Marc Mengel 2 months ago



Also available in: Atom PDF