12 , oldest-supported-numpy
17 buildPythonPackage rec {
22 disabled = pythonOlder "3.7";
27 hash = "sha256-6CttYOz7EkEgyI/hBqR4WWu+qxQhFtfn9ko2TayQKpI=";
30 # Environment variable used in shapely/_buildcfg.py
31 GEOS_LIBRARY_PATH = "${geos_3_11}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}";
34 # Patch to search form GOES .so/.dylib files in a Nix-aware way
36 src = ./library-paths.patch;
37 libgeos_c = GEOS_LIBRARY_PATH;
38 libc = lib.optionalString (!stdenv.isDarwin) "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}.6";
43 substituteInPlace pyproject.toml --replace "setuptools<64" "setuptools"
48 geos_3_11 # for geos-config
49 oldest-supported-numpy
58 propagatedBuildInputs = [
67 rm -r shapely # prevent import of local shapely
70 disabledTests = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
71 # FIXME(lf-): these logging tests are broken, which is definitely our
72 # fault. I've tried figuring out the cause and failed.
74 # It is apparently some sandbox or no-sandbox related thing on macOS only
76 "test_error_handler_exception"
81 pythonImportsCheck = [ "shapely" ];
84 changelog = "https://github.com/shapely/shapely/blob/${version}/CHANGES.txt";
85 description = "Manipulation and analysis of geometric objects";
86 homepage = "https://github.com/shapely/shapely";
87 license = licenses.bsd3;
88 maintainers = teams.geospatial.members;