New package: py-statmorph (#34158)

* New package py-statmorph w/ dependecies. Add py-astropy@5.1

* [@spackbot] updating style on behalf of meyersbs

* [py-statmorph,py-astropy,py-pyerfa] minor fixes
This commit is contained in:
Benjamin Meyers 2022-11-28 16:46:10 -05:00 committed by GitHub
parent a0180ef741
commit a97312535a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 100 additions and 1 deletions

View File

@ -16,6 +16,7 @@ class PyAstropy(PythonPackage):
homepage = "https://astropy.org/"
pypi = "astropy/astropy-4.0.1.post1.tar.gz"
version("5.1", sha256="1db1b2c7eddfc773ca66fa33bd07b25d5b9c3b5eee2b934e0ca277fa5b1b7b7e")
version(
"4.0.1.post1", sha256="5c304a6c1845ca426e7bc319412b0363fccb4928cb4ba59298acd1918eec44b5"
)
@ -27,6 +28,7 @@ class PyAstropy(PythonPackage):
variant("extras", default=False, description="Enable extra 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"))
@ -34,12 +36,19 @@ class PyAstropy(PythonPackage):
depends_on("python@2.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.29.13:", 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"))
depends_on("py-numpy@1.10:", when="@3.0:", type=("build", "run"))
depends_on("py-numpy@1.9:", when="@2.0:", type=("build", "run"))
depends_on("py-numpy@1.7:", when="@1.2:", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-packaging@19.0:", when="@5.1:", type=("build", "run"))
depends_on("py-pyyaml@3.13:", when="@5.1:", type=("build", "run"))
depends_on("py-pyerfa@2.0:", when="@5.1:", type=("build", "run"))
depends_on("py-setuptools-scm@6.2:", when="@5.1:", type="build")
depends_on("py-cython@0.29.30", when="@5.1:", type="build")
depends_on("py-extension-helpers", when="@5.1:", type="build")
depends_on("pkgconfig", type="build")
# Optional dependencies
@ -72,7 +81,8 @@ def patch(self):
# avoids issues with PyCode_New() in newer
# versions of python in the distributed
# cython-ized files
os.remove("astropy/cython_version.py")
if os.path.exists("astropy/cython_version.py"):
os.remove("astropy/cython_version.py")
def install_options(self, spec, prefix):
args = [

View File

@ -0,0 +1,30 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyPhotutils(PythonPackage):
"""
Photutils is an Astropy package for detection and photometry of astronomical
sources.
"""
homepage = "https://github.com/astropy/photutils"
pypi = "photutils/photutils-1.5.0.tar.gz"
version("1.5.0", sha256="014f7aa5a571401094d5cf9ffb57803b48869233feb80476ce377ecb91113689")
maintainers = ["meyersbs"]
# From setup.cfg
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-numpy@1.18:", type=("build", "run"))
depends_on("py-astropy@5.0:", type=("build", "run"))
# From pyproject.toml
depends_on("py-setuptools", type="build")
depends_on("py-setuptools-scm", type="build")
depends_on("py-cython@0.29.22:", type="build")
depends_on("py-extension-helpers", type="build")

View File

@ -0,0 +1,32 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyPyerfa(PythonPackage):
"""
PyERFA is the Python wrapper for the ERFA library (Essential Routines for
Fundamental Astronomy), a C library containing key algorithms for astronomy,
which is based on the SOFA library published by the International Astronomical
Union (IAU). All C routines are wrapped as Numpy universal functions, so that
they can be called with scalar or array inputs.
"""
homepage = "https://github.com/liberfa/pyerfa"
pypi = "pyerfa/pyerfa-2.0.0.1.tar.gz"
maintainers = ["meyersbs"]
version("2.0.0.1", sha256="2fd4637ffe2c1e6ede7482c13f583ba7c73119d78bef90175448ce506a0ede30")
# From setup.cfg
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-numpy@1.17:", type=("build", "run"))
depends_on("py-setuptools-scm@3.4:+toml", type="build")
# From pyproject.toml
depends_on("py-setuptools@42:", type="build")
depends_on("py-packaging", type="build")
depends_on("py-jinja2@2.10.3:", type="build")

View File

@ -0,0 +1,27 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyStatmorph(PythonPackage):
"""
Python code for calculating non-parametric morphological diagnostics of galaxy
images.
"""
homepage = "https://github.com/vrodgom/statmorph"
pypi = "statmorph/statmorph-0.4.0.tar.gz"
maintainers = ["meyersbs"]
version("0.4.0", sha256="7d1bb802baf3e203ac44c630a58c5049da5eb4d85091ac35e3f5c6ee4af8b05a")
depends_on("py-setuptools", type="build")
depends_on("py-numpy@1.14.0:", type=("build", "run"))
depends_on("py-scipy@0.19:", type=("build", "run"))
depends_on("py-scikit-image@0.14:", type=("build", "run"))
depends_on("py-astropy@2.0:", type=("build", "run"))
depends_on("py-photutils@0.7:", type=("build", "run"))