summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2024-11-22 22:20:41 +0100
committerGitHub <noreply@github.com>2024-11-22 22:20:41 +0100
commit3dcbd118df52e1bb93aba59c1751e448ee6a9358 (patch)
treeb1d0127fe0c0b16537f01765c5b23f4e947eb1db
parent5dacb774f6f489d7f521fd11eb4a3391ac45e6c3 (diff)
downloadspack-3dcbd118df52e1bb93aba59c1751e448ee6a9358.tar.gz
spack-3dcbd118df52e1bb93aba59c1751e448ee6a9358.tar.bz2
spack-3dcbd118df52e1bb93aba59c1751e448ee6a9358.tar.xz
spack-3dcbd118df52e1bb93aba59c1751e448ee6a9358.zip
py-cython: support Python 3.12+ (#47714)
and add various other compat bounds on dependents
-rw-r--r--var/spack/repos/builtin/packages/py-cython/package.py109
-rw-r--r--var/spack/repos/builtin/packages/py-expandvars/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-frozenlist/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-multidict/package.py16
4 files changed, 126 insertions, 45 deletions
diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py
index 96d60cb768..a410fdb4fb 100644
--- a/var/spack/repos/builtin/packages/py-cython/package.py
+++ b/var/spack/repos/builtin/packages/py-cython/package.py
@@ -10,16 +10,12 @@ class PyCython(PythonPackage):
"""The Cython compiler for writing C extensions for the Python language."""
homepage = "https://github.com/cython/cython"
- pypi = "cython/Cython-0.29.21.tar.gz"
+ pypi = "cython/cython-3.0.11.tar.gz"
tags = ["build-tools"]
license("Apache-2.0")
- version(
- "3.0.11",
- sha256="7146dd2af8682b4ca61331851e6aebce9fe5158e75300343f80c07ca80b1faff",
- url="https://files.pythonhosted.org/packages/source/cython/cython-3.0.11.tar.gz",
- )
+ version("3.0.11", sha256="7146dd2af8682b4ca61331851e6aebce9fe5158e75300343f80c07ca80b1faff")
version("3.0.10", sha256="dcc96739331fb854dcf503f94607576cfe8488066c61ca50dfd55836f132de99")
version("3.0.8", sha256="8333423d8fd5765e7cceea3a9985dd1e0a5dfeb2734629e1a2ed2d6233d39de6")
version("3.0.7", sha256="fb299acf3a578573c190c858d49e0cf9d75f4bc49c3f24c5a63804997ef09213")
@@ -37,42 +33,83 @@ class PyCython(PythonPackage):
version("0.29.23", sha256="6a0d31452f0245daacb14c979c77e093eb1a546c760816b5eed0047686baad8e")
version("0.29.22", sha256="df6b83c7a6d1d967ea89a2903e4a931377634a297459652e4551734c48195406")
version("0.29.21", sha256="e57acb89bd55943c8d8bf813763d20b9099cc7165c0f16b707631a7654be9cad")
- version("0.29.20", sha256="22d91af5fc2253f717a1b80b8bb45acb655f643611983fd6f782b9423f8171c7")
- version("0.29.16", sha256="232755284f942cbb3b43a06cd85974ef3c970a021aef19b5243c03ee2b08fa05")
- version("0.29.15", sha256="60d859e1efa5cc80436d58aecd3718ff2e74b987db0518376046adedba97ac30")
- version("0.29.14", sha256="e4d6bb8703d0319eb04b7319b12ea41580df44fd84d83ccda13ea463c6801414")
- version("0.29.13", sha256="c29d069a4a30f472482343c866f7486731ad638ef9af92bfe5fca9c7323d638e")
- version("0.29.10", sha256="26229570d6787ff3caa932fe9d802960f51a89239b990d275ae845405ce43857")
- version("0.29.7", sha256="55d081162191b7c11c7bfcb7c68e913827dfd5de6ecdbab1b99dab190586c1e8")
- version("0.29.5", sha256="9d5290d749099a8e446422adfb0aa2142c711284800fb1eb70f595101e32cbf1")
- version("0.29", sha256="94916d1ede67682638d3cc0feb10648ff14dc51fb7a7f147f4fedce78eaaea97")
- version("0.28.6", sha256="68aa3c00ef1deccf4dd50f0201d47c268462978c12c42943bc33dc9dc816ac1b")
- version("0.28.3", sha256="1aae6d6e9858888144cea147eb5e677830f45faaff3d305d77378c3cba55f526")
- version("0.28.1", sha256="152ee5f345012ca3bb7cc71da2d3736ee20f52cd8476e4d49e5e25c5a4102b12")
- version("0.25.2", sha256="f141d1f9c27a07b5a93f7dc5339472067e2d7140d1c5a9e20112a5665ca60306")
- version("0.23.5", sha256="0ae5a5451a190e03ee36922c4189ca2c88d1df40a89b4f224bc842d388a0d1b6")
- version("0.23.4", sha256="fec42fecee35d6cc02887f1eef4e4952c97402ed2800bfe41bbd9ed1a0730d8e")
-
- depends_on("c", type="build") # generated
- depends_on("cxx", type="build") # generated
-
- # https://github.com/cython/cython/issues/5751 (distutils not yet dropped)
- depends_on("python@:3.11", type=("build", "link", "run"))
-
- # https://github.com/cython/cython/commit/1cd24026e9cf6d63d539b359f8ba5155fd48ae21
- # collections.Iterable was removed in Python 3.10
- depends_on("python@:3.9", when="@:0.29.14", type=("build", "link", "run"))
-
- # https://github.com/cython/cython/commit/430e2ca220c8fed49604daf578df98aadb33a87d
- depends_on("python@:3.8", when="@:0.29.13", type=("build", "link", "run"))
-
- depends_on("py-setuptools", type=("build", "run"))
+ with default_args(deprecated=True):
+ version(
+ "0.29.20", sha256="22d91af5fc2253f717a1b80b8bb45acb655f643611983fd6f782b9423f8171c7"
+ )
+ version(
+ "0.29.16", sha256="232755284f942cbb3b43a06cd85974ef3c970a021aef19b5243c03ee2b08fa05"
+ )
+ version(
+ "0.29.15", sha256="60d859e1efa5cc80436d58aecd3718ff2e74b987db0518376046adedba97ac30"
+ )
+ version(
+ "0.29.14", sha256="e4d6bb8703d0319eb04b7319b12ea41580df44fd84d83ccda13ea463c6801414"
+ )
+ version(
+ "0.29.13", sha256="c29d069a4a30f472482343c866f7486731ad638ef9af92bfe5fca9c7323d638e"
+ )
+ version(
+ "0.29.10", sha256="26229570d6787ff3caa932fe9d802960f51a89239b990d275ae845405ce43857"
+ )
+ version(
+ "0.29.7", sha256="55d081162191b7c11c7bfcb7c68e913827dfd5de6ecdbab1b99dab190586c1e8"
+ )
+ version(
+ "0.29.5", sha256="9d5290d749099a8e446422adfb0aa2142c711284800fb1eb70f595101e32cbf1"
+ )
+ version("0.29", sha256="94916d1ede67682638d3cc0feb10648ff14dc51fb7a7f147f4fedce78eaaea97")
+ version(
+ "0.28.6", sha256="68aa3c00ef1deccf4dd50f0201d47c268462978c12c42943bc33dc9dc816ac1b"
+ )
+ version(
+ "0.28.3", sha256="1aae6d6e9858888144cea147eb5e677830f45faaff3d305d77378c3cba55f526"
+ )
+ version(
+ "0.28.1", sha256="152ee5f345012ca3bb7cc71da2d3736ee20f52cd8476e4d49e5e25c5a4102b12"
+ )
+ version(
+ "0.25.2", sha256="f141d1f9c27a07b5a93f7dc5339472067e2d7140d1c5a9e20112a5665ca60306"
+ )
+ version(
+ "0.23.5", sha256="0ae5a5451a190e03ee36922c4189ca2c88d1df40a89b4f224bc842d388a0d1b6"
+ )
+ version(
+ "0.23.4", sha256="fec42fecee35d6cc02887f1eef4e4952c97402ed2800bfe41bbd9ed1a0730d8e"
+ )
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ # Based on PyPI wheel availability
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:3.0.10")
+ depends_on("python@:3.11", when="@:3.0.3") # Cythonize still used distutils
+ depends_on("python@:3.10", when="@:0.29.28")
+ depends_on("python@:3.9", when="@:0.29.24")
+ depends_on("python@:3.8", when="@:0.29.20")
+ depends_on("python@:3.7", when="@:0.29.13")
+
+ # https://github.com/cython/cython/issues/5751
+ # https://github.com/cython/cython/commit/0000fb4c319ef8f7e8eabcc99677f99a8c503cc3
+ depends_on("py-setuptools@66:", when="^python@3.12:", type="run")
+
+ depends_on("py-setuptools", type="build")
depends_on("gdb@7.2:", type="test")
# Backports CYTHON_FORCE_REGEN environment variable
patch("5307.patch", when="@0.29:0.29.33")
patch("5712.patch", when="@0.29")
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/c/cython/{}-{}.tar.gz"
+ if version >= Version("3.0.11"):
+ name = "cython"
+ else:
+ name = "Cython"
+ return url.format(name, version)
+
@property
def command(self):
"""Returns the Cython command"""
diff --git a/var/spack/repos/builtin/packages/py-expandvars/package.py b/var/spack/repos/builtin/packages/py-expandvars/package.py
new file mode 100644
index 0000000000..7d88ca2a93
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-expandvars/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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 PyExpandvars(PythonPackage):
+ """Expand system variables Unix style."""
+
+ homepage = "https://github.com/sayanarijit/expandvars"
+ pypi = "expandvars/expandvars-0.12.0.tar.gz"
+
+ license("MIT")
+
+ version("0.12.0", sha256="7d1adfa55728cf4b5d812ece3d087703faea953e0c0a1a78415de9df5024d844")
+
+ depends_on("py-hatchling", type="build")
diff --git a/var/spack/repos/builtin/packages/py-frozenlist/package.py b/var/spack/repos/builtin/packages/py-frozenlist/package.py
index b98a509c70..89382f32b2 100644
--- a/var/spack/repos/builtin/packages/py-frozenlist/package.py
+++ b/var/spack/repos/builtin/packages/py-frozenlist/package.py
@@ -15,14 +15,27 @@ class PyFrozenlist(PythonPackage):
license("Apache-2.0")
+ version("1.5.0", sha256="81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817")
version("1.3.1", sha256="3a735e4211a04ccfa3f4833547acdf5d2f863bfeb01cfd3edaffbc251f15cec8")
version("1.3.0", sha256="ce6f2ba0edb7b0c1d8976565298ad2deba6f8064d2bebb6ffce2ca896eb35b0b")
version("1.2.0", sha256="68201be60ac56aff972dc18085800b6ee07973c49103a8aba669dee3d71079de")
- depends_on("c", type="build") # generated
-
- depends_on("python@3.6:", type=("build", "run"))
- depends_on("python@3.7:", when="@1.3.1:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-setuptools@46.4.0:", when="@1.3.1:", type="build")
- depends_on("py-wheel@0.37.0:", when="@1.3.1:", type="build")
+ depends_on("c", type="build")
+
+ # Based on PyPI wheel availability
+ with default_args(type=("build", "run")):
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:1.4.1")
+ depends_on("python@:3.11", when="@:1.4.0")
+ depends_on("python@:3.10", when="@:1.3.1")
+
+ with default_args(type="build"):
+ depends_on("py-expandvars", when="@1.4.1:")
+ depends_on("py-setuptools@47:", when="@1.4.1:")
+ depends_on("py-setuptools@46.4:", when="@1.3.1:")
+ depends_on("py-setuptools")
+ depends_on("py-tomli", when="@1.4.1: ^python@:3.10")
+ depends_on("py-wheel@0.37:", when="@1.3:1.4.0")
+
+ # Not documented but still needed to cythonize files
+ depends_on("py-cython", when="@1.4.1:")
diff --git a/var/spack/repos/builtin/packages/py-multidict/package.py b/var/spack/repos/builtin/packages/py-multidict/package.py
index 152becac95..ff6677668c 100644
--- a/var/spack/repos/builtin/packages/py-multidict/package.py
+++ b/var/spack/repos/builtin/packages/py-multidict/package.py
@@ -15,15 +15,27 @@ class PyMultidict(PythonPackage):
license("Apache-2.0")
+ version("6.1.0", sha256="22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a")
version("6.0.4", sha256="3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49")
version("6.0.2", sha256="5ff3bd75f38e4c43f1f470f2df7a4d430b821c4ce22be384e1459cb57d6bb013")
version("5.2.0", sha256="0dd1c93edb444b33ba2274b66f63def8a327d607c6c790772f448a53b6ea59ce")
version("5.1.0", sha256="25b4e5f22d3a37ddf3effc0710ba692cfc792c2b9edfb9c05aefe823256e84d5")
- version("4.7.6", sha256="fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430")
+ with default_args(deprecated=True):
+ version("4.7.6", sha256="fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430")
- depends_on("c", type="build") # generated
+ depends_on("c", type="build")
+
+ # Based on PyPI wheel availability
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:6.0")
+ depends_on("python@:3.11", when="@:6.0.4")
+ depends_on("python@:3.10", when="@:6.0.2")
+ depends_on("python@:3.9", when="@:5.1")
+ depends_on("python@:3.8", when="@:4")
depends_on("py-setuptools@40:", type="build")
+ depends_on("py-typing-extensions@4.1:", when="@6.1: ^python@:3.10", type=("build", "run"))
# Historical dependencies
depends_on("py-pip@18:", when="@:4", type="build")