summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2022-12-13 02:59:23 -0600
committerGitHub <noreply@github.com>2022-12-13 09:59:23 +0100
commitf4fb20e27e50734c4dd0ac1f493eadd07fef5d8f (patch)
tree5aa1a018b4fe431466e5fd8a746f0291fc4b8a44 /var
parent3ff5d49102223558a0f301ca1d4013115bd7ffc4 (diff)
downloadspack-f4fb20e27e50734c4dd0ac1f493eadd07fef5d8f.tar.gz
spack-f4fb20e27e50734c4dd0ac1f493eadd07fef5d8f.tar.bz2
spack-f4fb20e27e50734c4dd0ac1f493eadd07fef5d8f.tar.xz
spack-f4fb20e27e50734c4dd0ac1f493eadd07fef5d8f.zip
py-shapely: add v2.0.0 (#34475)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-numpy/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-shapely/package.py40
2 files changed, 31 insertions, 13 deletions
diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py
index cc36bc84a8..0c43a03958 100644
--- a/var/spack/repos/builtin/packages/py-numpy/package.py
+++ b/var/spack/repos/builtin/packages/py-numpy/package.py
@@ -93,7 +93,9 @@ class PyNumpy(PythonPackage):
depends_on("python@3.6:3.10", type=("build", "link", "run"), when="@1.19")
depends_on("python@3.7:3.10", type=("build", "link", "run"), when="@1.20:1.21")
depends_on("python@3.8:", type=("build", "link", "run"), when="@1.22:")
- depends_on("py-setuptools@:59", type=("build", "run"))
+ # https://github.com/spack/spack/pull/32078
+ depends_on("py-setuptools@:63", type=("build", "run"))
+ depends_on("py-setuptools@:59", when="@:1.22.1", type=("build", "run"))
# Check pyproject.toml for updates to the required cython version
depends_on("py-cython@0.29.13:2", when="@1.18.0:", type="build")
depends_on("py-cython@0.29.14:2", when="@1.18.1:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-shapely/package.py b/var/spack/repos/builtin/packages/py-shapely/package.py
index 9c39acbe0b..b3e573d64e 100644
--- a/var/spack/repos/builtin/packages/py-shapely/package.py
+++ b/var/spack/repos/builtin/packages/py-shapely/package.py
@@ -12,14 +12,14 @@ from spack.package import *
class PyShapely(PythonPackage):
"""Manipulation and analysis of geometric objects in the Cartesian plane."""
- homepage = "https://github.com/Toblerity/Shapely"
- pypi = "Shapely/Shapely-1.7.1.tar.gz"
- git = "https://github.com/Toblerity/Shapely.git"
+ homepage = "https://github.com/shapely/shapely"
+ pypi = "shapely/shapely-1.7.1.tar.gz"
+ git = "https://github.com/shapely/shapely.git"
maintainers = ["adamjstewart"]
version("main", branch="main")
- version("master", branch="main", deprecated=True)
+ version("2.0.0", sha256="11f1b1231a6c04213fb1226c6968d1b1b3b369ec42d1e9655066af87631860ea")
version("1.8.5", sha256="e82b6d60ecfb124120c88fe106a478596bbeab142116d7e7f64a364dac902a92")
version("1.8.4", sha256="a195e51caafa218291f2cbaa3fef69fd3353c93ec4b65b2a4722c4cf40c3198c")
version("1.8.3", sha256="1ce9da186d48efc50130af96d62ffb4d2e175235143d804ef395aad156d45bb3")
@@ -33,21 +33,32 @@ class PyShapely(PythonPackage):
depends_on("python@3.6:", when="@1.8:", type=("build", "link", "run"))
depends_on("python@2.7:2.8,3.4:", when="@1.7", type=("build", "link", "run"))
depends_on("python@2.6:", when="@:1.6", type=("build", "link", "run"))
- depends_on("py-setuptools@:63", type="build")
- depends_on("py-cython@0.29.24:2", type="build")
+ depends_on("py-setuptools@61:", when="@2:", type="build")
+ depends_on("py-setuptools@:63", when="@:1", type="build")
+ depends_on("py-cython@0.29:0", when="@2:", type="build")
+ depends_on("py-cython@0.29.24:2", when="@:1", type="build")
+ depends_on("py-numpy@1.14:", when="@2:", type=("build", "link", "run"))
depends_on("py-numpy", type=("build", "link", "run"))
- depends_on("geos@3.3:3.10", when="@:1.7")
- depends_on("geos@3.6:3.10", when="@1.8:")
+ depends_on("geos@3.5:", when="@2:")
+ depends_on("geos@3.3:", when="@:1")
depends_on("py-pytest", type="test")
depends_on("py-pytest-cov", type="test")
- # https://github.com/Toblerity/Shapely/pull/891
+ # https://github.com/shapely/shapely/pull/891
patch(
- "https://github.com/Toblerity/Shapely/commit/98f6b36710bbe05b4ab59231cb0e08b06fe8b69c.patch?full_index=1",
+ "https://github.com/shapely/shapely/commit/98f6b36710bbe05b4ab59231cb0e08b06fe8b69c.patch?full_index=1",
sha256="8583cdc97648277fa4faea8bd88d49e43390e87f697b966bd2b4290fba945ba0",
when="@:1.7.0",
)
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/{0}/{0}hapely/{0}hapely-{1}.tar.gz"
+ if version >= Version("2"):
+ letter = "s"
+ else:
+ letter = "S"
+ return url.format(letter, version)
+
@when("^python@3.7:")
def patch(self):
# Python 3.7 changed the thread storage API, precompiled *.c files
@@ -62,7 +73,7 @@ class PyShapely(PythonPackage):
# Shapely uses ctypes.util.find_library, which searches LD_LIBRARY_PATH
# Our RPATH logic works fine, but the unit tests fail without this
- # https://github.com/Toblerity/Shapely/issues/909
+ # https://github.com/shapely/shapely/issues/909
libs = ":".join(self.spec["geos"].libs.directories)
if sys.platform == "darwin":
env.prepend_path("DYLD_FALLBACK_LIBRARY_PATH", libs)
@@ -78,4 +89,9 @@ class PyShapely(PythonPackage):
@run_after("install")
@on_package_attributes(run_tests=True)
def test_install(self):
- python("-m", "pytest")
+ # https://shapely.readthedocs.io/en/latest/installation.html#testing-shapely
+ if self.version >= Version("2"):
+ with working_dir("spack-test", create=True):
+ python("-m", "pytest", "--pyargs", "shapely.tests")
+ else:
+ python("-m", "pytest")