summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Grayson <sam@samgrayson.me>2022-11-30 11:03:26 -0700
committerGitHub <noreply@github.com>2022-11-30 12:03:26 -0600
commit03cc83bc67ce57dcdd815469434d97775a697048 (patch)
tree5fbc39dbd6ab9d0a9153294ec74d6401283af5e6
parentf452741e3d666fde7683ae32296d6e92bb2521d0 (diff)
downloadspack-03cc83bc67ce57dcdd815469434d97775a697048.tar.gz
spack-03cc83bc67ce57dcdd815469434d97775a697048.tar.bz2
spack-03cc83bc67ce57dcdd815469434d97775a697048.tar.xz
spack-03cc83bc67ce57dcdd815469434d97775a697048.zip
Add py-yt 4.x versions (#30418)
* Add py-yt 4.x versions * Fix spelling * Add yt dependencies * Refine cython dependency * Tweak depends_on for py-yt 4.x * Apply suggestions from code review Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Fix comments from code review * Fix formatting * Fix stuff * Fix constraints * Update py-yt to 4.1.2 * Updated packages * Fix py-tomli checksum * Remove `expand` from `py-tomli/package.py` * Respond to Adam's comments * Update checksums * Update checksusm * Respond to comments Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/py-cmyt/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-tomli/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-unyt/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-yt/package.py74
4 files changed, 124 insertions, 45 deletions
diff --git a/var/spack/repos/builtin/packages/py-cmyt/package.py b/var/spack/repos/builtin/packages/py-cmyt/package.py
new file mode 100644
index 0000000000..d2a908c0ed
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-cmyt/package.py
@@ -0,0 +1,33 @@
+# 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 PyCmyt(PythonPackage):
+ """Matplotlib colormaps from the yt project !"""
+
+ homepage = "https://yt-project.org"
+ pypi = "cmyt/cmyt-1.0.4.tar.gz"
+ git = "https://github.com/yt-project/cmyt.git"
+
+ maintainers = ["charmoniumq"]
+
+ version("main", branch="main")
+
+ version("1.1.2", sha256="7027514a89331ee5cd672999e34c15feae218c8ed9b127832b6618c6771a869e")
+
+ # https://github.com/yt-project/cmyt/blob/v1.1.2/pyproject.toml#L2
+ depends_on("py-setuptools@40.9:", type="build")
+
+ # https://github.com/yt-project/cmyt/blob/v1.1.2/setup.cfg#40
+ depends_on("python@3.8:", type=("build", "run"))
+
+ # https://github.com/yt-project/cmyt/blob/v1.1.2/setup.cfg#35
+ depends_on("py-colorspacious@1.1.2:", type=("build", "run"))
+ depends_on("py-matplotlib@3.2:", type=("build", "run"))
+ depends_on("py-more-itertools@8.4:", type=("build", "run"))
+ depends_on("py-numpy@1.17.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-tomli/package.py b/var/spack/repos/builtin/packages/py-tomli/package.py
index 58bc46f161..33f11534bd 100644
--- a/var/spack/repos/builtin/packages/py-tomli/package.py
+++ b/var/spack/repos/builtin/packages/py-tomli/package.py
@@ -12,24 +12,18 @@ class PyTomli(PythonPackage):
Tomli is fully compatible with TOML v1.0.0."""
homepage = "https://github.com/hukkin/tomli"
- url = "https://files.pythonhosted.org/packages/py3/t/tomli/tomli-1.2.2-py3-none-any.whl"
- list_url = "https://pypi.org/simple/tomli/"
-
- version(
- "2.0.1",
- sha256="939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
- expand=False,
- )
- version(
- "1.2.2",
- sha256="f04066f68f5554911363063a30b108d2b5a5b1a010aa8b6132af78489fe3aade",
- expand=False,
- )
- version(
- "1.2.1",
- sha256="8dd0e9524d6f386271a36b41dbf6c57d8e32fd96fd22b6584679dc569d20899f",
- expand=False,
- )
+ pypi = "tomli/tomli-2.0.1.tar.gz"
+ git = "https://github.com/hukkin/tomli.git"
+ maintainers = ["charmoniumq"]
+
+ version("2.0.1", sha256="de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f")
+ version("1.2.2", sha256="c6ce0015eb38820eaf32b5db832dbc26deb3dd427bd5f6556cf0acac2c214fee")
+ version("1.2.1", sha256="a5b75cb6f3968abb47af1b40c1819dc519ea82bcc065776a866e8d74c5ca9442")
+
+ # https://github.com/hukkin/tomli/blob/2.0.1/pyproject.toml#L2
+ depends_on("py-flit-core@3.2:3", type="build")
+
+ # https://github.com/hukkin/tomli/blob/2.0.1/pyproject.toml#L13
depends_on("python@3.6:", type=("build", "run"))
- depends_on("python@3.7:", when="@2.0.1:", type=("build", "run"))
+ depends_on("python@3.7:", type=("build", "run"), when="@2.0.1:")
diff --git a/var/spack/repos/builtin/packages/py-unyt/package.py b/var/spack/repos/builtin/packages/py-unyt/package.py
new file mode 100644
index 0000000000..8a844412cc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-unyt/package.py
@@ -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 PyUnyt(PythonPackage):
+ """A package for handling numpy arrays with units."""
+
+ homepage = "https://yt-project.org"
+ pypi = "unyt/unyt-2.8.0.tar.gz"
+ git = "https://github.com/yt-project/unyt.git"
+
+ maintainers = ["charmoniumq"]
+
+ version("main", branch="main")
+ version("2.9.2", sha256="8d4bf3dd3f7b4c29580728c0359caa17d62239673eeab436448d0777adeee5e1")
+
+ # Undocumented in 2.9.2
+ depends_on("py-setuptools", type="build")
+
+ # https://github.com/yt-project/unyt/blob/v2.9.2/setup.py#L50
+ depends_on("python@3.8:", type=("build", "run"))
+
+ # https://github.com/yt-project/unyt/blob/v2.9.2/setup.py#L21
+ depends_on("py-numpy@1.17.5:", type=("build", "run"))
+ depends_on("py-sympy@1.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-yt/package.py b/var/spack/repos/builtin/packages/py-yt/package.py
index 41cd073ce9..c4859abc35 100644
--- a/var/spack/repos/builtin/packages/py-yt/package.py
+++ b/var/spack/repos/builtin/packages/py-yt/package.py
@@ -17,46 +17,68 @@ class PyYt(PythonPackage):
"""
homepage = "https://yt-project.org"
- url = "https://github.com/yt-project/yt/archive/yt-3.5.0.tar.gz"
git = "https://github.com/yt-project/yt.git"
+ pypi = "yt/yt-4.1.2.tar.gz"
- maintainers = ["qobilidop"]
+ maintainers = ["charmoniumq"]
- version("develop", branch="master")
- version("develop-4.0", branch="yt-4.0")
-
- version("3.6.1", sha256="a1be3ea7e18729d3cd86e9234dc4731bf23200dff3344fa756fe173ea36cc747")
- version("3.6.0", sha256="4e3bab11766d5950477ba4d6c528a495e12cda1155227361b4579ac4ac0bf975")
- version("3.5.1", sha256="cdc0ecb153e737d74820581f311d1be7b6f1a7ee065ad69706470939db88b041")
- version("3.5.0", sha256="548598912adba72b782b7422d40d1d12a8c1a6cd064281a9a537fdb2a5af89fc")
- version("3.4.1", sha256="b9a73ade3726a8163fc992999c8c1010ca89473131901fe4d48b820ab2ced486")
- version("3.4.0", sha256="2120793a76864cf3165b2b7290ef719e358fa57501ee8721941e7cfc434cfb2b")
- version("3.3.5", sha256="2ebe4bbefd9f5367563ce4d7eb87d3f6ef0de1f97ed1c03106d9541e71b7e1ca")
- version("3.3.4", sha256="2842bab891cfbf3269a3c4bd8f22fef23c9a15a790ba48c6490730cb51ce9b0e")
- version("3.3.3", sha256="7b9244089e92b1d32cef791cd72760bb8c80b391eaec29672a5377c33f932d88")
- version("3.3.2", sha256="d323419ad3919e86d2af1738c846021fd7f5b5dc5c06059cdf3a2bc63226466a")
- version("3.3.1", sha256="7ac68d5e05e2b57fb3635f1027f3201094f3547d584e72ab55fedbfd3bc09a36")
- version("3.3.0", sha256="e6be799c0d9a83a06649f0d77a61ad9c23b94b34f94e16724e2b18f5c7513c33")
- version("3.2.3", sha256="96476d17e9ce35f0d4380b2ddb398fe729e39f1f3894602ff07e49844541e5ca")
- version("3.2.2", sha256="498ed77b3dae8c54929602d4931f3c3e0a3420a9b500cbd870f50b1e0efea8c3")
+ version("4.1.2", sha256="0ae03288b067721baad14c016f253dc791cd444a1f2dd5d804cf91da622a0c76")
+ version("3.6.1", sha256="be454f9d05dcbe0623328b4df43a1bfd1f0925e516be97399710452931a19bb0")
+ version("3.6.0", sha256="effb00536f19fd2bdc18f67dacd5550b82066a6adce5b928f27a01d7505109ec")
+ version("3.5.1", sha256="c8ef8eceb934dc189d63dc336109fad3002140a9a32b19f38d1812d5d5a30d71")
+ version("3.5.0", sha256="ee4bf8349f02ce21f571654c26d85c1f69d9678fc8f5c7cfe5d1686c7ed2e3ca")
+ version("3.4.1", sha256="a4cfc47fe21683e7a3b680c05fe2a25fb774ffda6e3939a35755e5bf64065895")
+ version("3.4.0", sha256="de52057d1677473a83961d8a1119a9beae3121ec69a4a5469c65348a75096d4c")
+ version("3.3.5", sha256="4d5c751b81b0daf6dcaff6ec0faefd97138c008019b52c043ab93403d71cedf6")
+ version("3.3.4", sha256="64c109ba4baf5afc0e1bc276ed2e3de13f1c5ce85c6d8b4c60e9a47c54bf3bcb")
+ version("3.3.3", sha256="edf6453927eee311d4b51afacb52cd5504b2b57cc6d3d92dab9c6bfaf6d883df")
+ version("3.3.2", sha256="a18e4cf498349804c64eec6509ec4d3a6beaa34ea63366543290c35774337f0e")
+ version("3.3.1", sha256="01e3b3398d43b8eab698d55ba37ef3d701ea026b899c0940a1ee34b215e25a31")
+ version("3.3.0", sha256="537c67e85c8f5cc5530a1223a74d27eb7f11c459651903c3092c6a97b450d019")
+ version("3.2.3", sha256="4d6ccf345d9fab965335c9faf8708c7eea79366b81d77f0f302808be3e82c0ed")
+ version("3.2.2", sha256="78866f51e4751534ad60987000f149a8295952b99b37ca249d45e4d11095a5df")
variant("astropy", default=True, description="enable astropy support")
variant("h5py", default=True, description="enable h5py support")
variant("scipy", default=True, description="enable scipy support")
variant("rockstar", default=False, description="enable rockstar support")
- depends_on("py-astropy@4.0.1:", type=("build", "run"), when="+astropy")
- depends_on("py-cython@0.24:", type=("build", "run"))
- depends_on("py-h5py@3.1:", type=("build", "run"), when="+h5py")
- depends_on("py-ipython@1.0:", type=("build", "run"))
+ # Main dependencies:
+ # See https://github.com/yt-project/yt/blob/yt-4.1.2/setup.cfg#L40
+ depends_on("py-cmyt@0.2.2:", type=("build", "run"), when="@4.1.2:")
+ depends_on("py-ipywidgets@8:", type=("build", "run"), when="@4.1.2")
depends_on("py-matplotlib@1.5.3:", type=("build", "run"))
depends_on("py-matplotlib@:3.2.2", type=("build", "run"), when="@:3.6.0")
+ depends_on("py-matplotlib@3.1:", type=("build", "run"), when="@4.1.2:")
+ conflicts("^py-matplotlib@3.4.2", when="@4.1.2:")
+ depends_on("py-more-itertools@8.4:", when="@4.1.2:")
depends_on("py-numpy@1.10.4:", type=("build", "run"))
+ depends_on("py-numpy@1.14.5:", type=("build", "run"), when="@4.1.2:")
+ depends_on("py-packaging@20.9:", type=("build", "run"), when="@4.1.2:")
+ # PIL/pillow and pyparsing dependency is handled by matplotlib
+ depends_on("py-tomli-w@0.4:", type=("build", "run"), when="@4.1.2:")
+ depends_on("py-tqdm@3.4.0:", type=("build", "run"), when="@4.1.2:")
+ depends_on("py-unyt@2.8:2", type=("build", "run"), when="@4.1.2:")
+ depends_on("py-importlib-metadata@1.4:", type=("build", "run"), when="@4.1.2: ^python@:3.7")
+ depends_on("py-tomli@1.2.3:", type=("build", "run"), when="@4.1.2: ^python@:3.10")
+ depends_on("py-typing-extensions@4.2:", type=("build", "run"), when="@4.1.2: ^python@:3.7")
+ # See https://github.com/spack/spack/pull/30418#discussion_r863962805
+ depends_on("py-ipython@1.0:", type=("build", "run"), when="@:3")
+
+ # Extras:
+ # See https://github.com/yt-project/yt/blob/yt-4.1.2/setup.cfg#L80
+ depends_on("py-h5py@3.1:3", type=("build", "run"), when="+h5py")
depends_on("py-scipy@1.5.0:", type=("build", "run"), when="+scipy")
- depends_on("py-setuptools@19.6:", type=("build", "run"))
- depends_on("py-sympy@1.0:", type=("build", "run"))
depends_on("rockstar@yt", type=("build", "run"), when="+rockstar")
- depends_on("python@2.7.0:2.7,3.5:", type=("build", "run"))
+ depends_on("py-astropy@4.0.1:5", type=("build", "run"), when="+astropy")
+
+ # Build dependencies:
+ # See https://github.com/yt-project/yt/blob/yt-4.1.2/pyproject.toml#L2
+ depends_on("py-cython@0.24:", type="build")
+ depends_on("py-cython@0.29.21:2", type="build", when="@4.1.2:")
+ depends_on("py-wheel@0.36.2:", type="build", when="@4.1.2:")
+ depends_on("py-setuptools@19.6:", type=("build", "run"))
+ depends_on("py-setuptools@59.0.1:", type=("build", "run"), when="@4.1.2:")
@run_before("install")
def prep_yt(self):