summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-astropy/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/py-astropy/package.py')
-rw-r--r--var/spack/repos/builtin/packages/py-astropy/package.py77
1 files changed, 54 insertions, 23 deletions
diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py
index e76706ef9e..8168be68b3 100644
--- a/var/spack/repos/builtin/packages/py-astropy/package.py
+++ b/var/spack/repos/builtin/packages/py-astropy/package.py
@@ -15,6 +15,7 @@ class PyAstropy(PythonPackage):
homepage = "https://astropy.org/"
pypi = "astropy/astropy-4.0.1.post1.tar.gz"
+ git = "https://github.com/astropy/astropy.git"
version("5.1", sha256="1db1b2c7eddfc773ca66fa33bd07b25d5b9c3b5eee2b934e0ca277fa5b1b7b7e")
version(
@@ -25,17 +26,15 @@ class PyAstropy(PythonPackage):
version("1.1.2", sha256="6f0d84cd7dfb304bb437dda666406a1d42208c16204043bc920308ff8ffdfad1")
version("1.1.post1", sha256="64427ec132620aeb038e4d8df94d6c30df4cc8b1c42a6d8c5b09907a31566a21")
- variant("extras", default=False, description="Enable extra functionality")
+ variant("all", default=False, when="@3.2:", description="Enable all functionality")
# Required dependencies
depends_on("python@3.8:", when="@5.1:", type=("build", "run"))
- depends_on("python@3.6:", when="@4.0:", type=("build", "run"))
- depends_on("python@3.5:", when="@3.0:", type=("build", "run"))
- depends_on("python@2.7:2.8,3.4:", when="@2.0:", type=("build", "run"))
- depends_on("python@2.7:2.8,3.3:", when="@1.2:", type=("build", "run"))
- depends_on("python@2.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.29.13:", type="build")
+ # in newer pip versions --install-option does not exist
+ depends_on("py-pip@:23.0", type="build")
+
depends_on("py-numpy@1.18:", when="@5.1:", type=("build", "run"))
depends_on("py-numpy@1.16:", when="@4.0:", type=("build", "run"))
depends_on("py-numpy@1.13:", when="@3.1:", type=("build", "run"))
@@ -51,24 +50,47 @@ class PyAstropy(PythonPackage):
depends_on("py-extension-helpers", when="@5.1:", type="build")
depends_on("pkgconfig", type="build")
+ depends_on("py-pytest@7:", type="test")
+ depends_on("py-pytest-doctestplus@0.12:", type="test")
+ depends_on("py-pytest-astropy-header@0.2.1:", type="test")
+ depends_on("py-pytest-astropy@0.10:", type="test")
+ depends_on("py-pytest-xdist", type="test")
+
# Optional dependencies
- depends_on("py-scipy@0.18:", when="+extras", type=("build", "run"))
- depends_on("py-h5py", when="+extras", type=("build", "run"))
- depends_on("py-beautifulsoup4", when="+extras", type=("build", "run"))
- depends_on("py-html5lib", when="+extras", type=("build", "run"))
- depends_on("py-bleach", when="+extras", type=("build", "run"))
- depends_on("py-pyyaml", when="+extras", type=("build", "run"))
- depends_on("py-pandas", when="+extras", type=("build", "run"))
- depends_on("py-bintrees", when="+extras", type=("build", "run"))
- depends_on("py-sortedcontainers", when="+extras", type=("build", "run"))
- depends_on("py-pytz", when="+extras", type=("build", "run"))
- depends_on("py-jplephem", when="+extras", type=("build", "run"))
- depends_on("py-matplotlib@2.0:", when="+extras", type=("build", "run"))
- depends_on("py-scikit-image", when="+extras", type=("build", "run"))
- depends_on("py-mpmath", when="+extras", type=("build", "run"))
- 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"))
+ with when("+all"):
+ depends_on("py-scipy@1.3:", when="@5:", type=("build", "run"))
+ depends_on("py-scipy@0.18:", type=("build", "run"))
+ depends_on("py-matplotlib@3.1:", when="@5:", type=("build", "run"))
+ depends_on("py-matplotlib@2.1:", when="@4:", type=("build", "run"))
+ depends_on("py-matplotlib@2.0:", type=("build", "run"))
+ depends_on("py-certifi", when="@4.3:", type=("build", "run"))
+ depends_on("py-dask+array", when="@4.1:", type=("build", "run"))
+ depends_on("py-h5py", type=("build", "run"))
+ depends_on("py-pyarrow@5:", when="@5:", type=("build", "run"))
+ depends_on("py-beautifulsoup4", type=("build", "run"))
+ depends_on("py-html5lib", type=("build", "run"))
+ depends_on("py-bleach", type=("build", "run"))
+ depends_on("py-pandas", type=("build", "run"))
+ depends_on("py-sortedcontainers", type=("build", "run"))
+ depends_on("py-pytz", type=("build", "run"))
+ depends_on("py-jplephem", type=("build", "run"))
+ depends_on("py-mpmath", type=("build", "run"))
+ depends_on("py-asdf@2.10:", when="@5.1:", type=("build", "run"))
+ depends_on("py-asdf@2.5:", when="@4.0.1post1:", type=("build", "run"))
+ depends_on("py-asdf@2.3:", type=("build", "run"))
+ depends_on("py-bottleneck", type=("build", "run"))
+ depends_on("py-ipython@4.2:", when="@4.3:", type=("build", "run"))
+ depends_on("py-ipython", type=("build", "run"))
+ depends_on("py-pytest@7:", when="@5.0.2:", type=("build", "run"))
+ depends_on("py-pytest", type=("build", "run"))
+ depends_on("py-typing-extensions@3.10.0.1:", when="@5.0.2:", type=("build", "run"))
+
+ # Historical optional dependencies
+ depends_on("py-pyyaml", when="@:5", type=("build", "run"))
+ depends_on("py-scikit-image", when="@:4.0", type=("build", "run"))
+ depends_on("py-bintrees", when="@:3.2.1", type=("build", "run"))
+
+ conflicts("^py-matplotlib@3.4.0,3.5.2")
# System dependencies
depends_on("erfa")
@@ -100,3 +122,12 @@ class PyAstropy(PythonPackage):
def install_test(self):
with working_dir("spack-test", create=True):
python("-c", "import astropy; astropy.test()")
+
+ @property
+ def skip_modules(self):
+ modules = []
+
+ if self.spec.satisfies("~extras"):
+ modules.append("astropy.visualization.wcsaxes")
+
+ return modules