From 5c493ae9edbc67a40c8dd48f783274c5f8807d8d Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Tue, 20 Aug 2024 01:37:47 -0700 Subject: [PATCH] python3Packages.shapely_1_8: remove Shapely 1.8 is old unmaintained. We originally had to introduce it to nixpkgs in order to package kikit, but recently kikit upstream dropped the requirement to use an old version of shapely (https://github.com/yaqwsx/KiKit/issues/574#issuecomment-1879721181). Upstream relaxed the version constraint in https://github.com/yaqwsx/KiKit/commit/3427a8d6ce31eea6fb3647e550d6b4ddc0e90842, which first landed in kikit 1.5.0, which we're already packaging, so we're free to drop shapely 1.8! --- pkgs/by-name/ki/kikit/default.nix | 5 +- .../python-modules/shapely/1.8.nix | 87 ------------------- pkgs/top-level/python-packages.nix | 2 - 3 files changed, 2 insertions(+), 92 deletions(-) delete mode 100644 pkgs/development/python-modules/shapely/1.8.nix diff --git a/pkgs/by-name/ki/kikit/default.nix b/pkgs/by-name/ki/kikit/default.nix index 2f5a0bced240..caaa81315427 100644 --- a/pkgs/by-name/ki/kikit/default.nix +++ b/pkgs/by-name/ki/kikit/default.nix @@ -17,7 +17,7 @@ , pcbnewtransition , pybars3 , versioneer -, shapely_1_8 +, shapely }: let solidpython = callPackage ./solidpython { }; @@ -49,8 +49,7 @@ buildPythonApplication rec { wxpython pcbnewtransition pybars3 - # https://github.com/yaqwsx/KiKit/issues/574 - shapely_1_8 + shapely # https://github.com/yaqwsx/KiKit/issues/576 solidpython ]; diff --git a/pkgs/development/python-modules/shapely/1.8.nix b/pkgs/development/python-modules/shapely/1.8.nix deleted file mode 100644 index 95ce815bd2ed..000000000000 --- a/pkgs/development/python-modules/shapely/1.8.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ - lib, - stdenv, - buildPythonPackage, - fetchPypi, - pytestCheckHook, - pythonOlder, - substituteAll, - - cython_0, - geos_3_11, - numpy, - oldest-supported-numpy, - setuptools, - wheel, -}: - -buildPythonPackage rec { - pname = "shapely"; - version = "1.8.5"; - pyproject = true; - - disabled = pythonOlder "3.7"; - - src = fetchPypi { - pname = "Shapely"; - inherit version; - hash = "sha256-6CttYOz7EkEgyI/hBqR4WWu+qxQhFtfn9ko2TayQKpI="; - }; - - # Environment variable used in shapely/_buildcfg.py - GEOS_LIBRARY_PATH = "${geos_3_11}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}"; - - patches = [ - # Patch to search form GOES .so/.dylib files in a Nix-aware way - (substituteAll { - src = ./library-paths.patch; - libgeos_c = GEOS_LIBRARY_PATH; - libc = lib.optionalString ( - !stdenv.isDarwin - ) "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}.6"; - }) - ]; - - postPatch = '' - substituteInPlace pyproject.toml --replace "setuptools<64" "setuptools" - ''; - - nativeBuildInputs = [ - cython_0 - geos_3_11 # for geos-config - oldest-supported-numpy - setuptools - wheel - ]; - - buildInputs = [ geos_3_11 ]; - - propagatedBuildInputs = [ numpy ]; - - nativeCheckInputs = [ pytestCheckHook ]; - - preCheck = '' - rm -r shapely # prevent import of local shapely - ''; - - disabledTests = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ - # FIXME(lf-): these logging tests are broken, which is definitely our - # fault. I've tried figuring out the cause and failed. - # - # It is apparently some sandbox or no-sandbox related thing on macOS only - # though. - "test_error_handler_exception" - "test_error_handler" - "test_info_handler" - ]; - - pythonImportsCheck = [ "shapely" ]; - - meta = with lib; { - changelog = "https://github.com/shapely/shapely/blob/${version}/CHANGES.txt"; - description = "Manipulation and analysis of geometric objects"; - homepage = "https://github.com/shapely/shapely"; - license = licenses.bsd3; - maintainers = teams.geospatial.members; - }; -} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ce3728ea525a..b8d19bd7226e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14364,8 +14364,6 @@ self: super: with self; { shapely = callPackage ../development/python-modules/shapely { }; - shapely_1_8 = callPackage ../development/python-modules/shapely/1.8.nix { }; - shaperglot = callPackage ../development/python-modules/shaperglot { }; sharedmem = callPackage ../development/python-modules/sharedmem { };