emacsPackages.lsp-bridge: 0-unstable-2025-01-11 -> 0-unstable-2025-01-22 (#376531)
[NixPkgs.git] / pkgs / development / python-modules / shapely / default.nix
blob914b6deccb6ca1b9b27e97066d61c27f376c7e33
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchPypi,
6   fetchpatch,
7   pytestCheckHook,
8   pythonOlder,
10   cython_0,
11   geos,
12   numpy,
13   oldest-supported-numpy,
14   setuptools,
15   wheel,
18 buildPythonPackage rec {
19   pname = "shapely";
20   version = "2.0.6";
21   pyproject = true;
23   disabled = pythonOlder "3.7";
25   src = fetchPypi {
26     inherit pname version;
27     hash = "sha256-mX9hWbFIQFnsI5ysqlNGf9i1Vk2r4YbNhKwpRGY7C/Y=";
28   };
30   patches = [
31     # fixes build error with GCC 14
32     (fetchpatch {
33       url = "https://github.com/shapely/shapely/commit/05455886750680728dc751dc5888cd02086d908e.patch";
34       hash = "sha256-YnmiWFfjHHFZCxrmabBINM4phqfLQ+6xEc30EoV5d98=";
35     })
36   ];
38   nativeBuildInputs = [
39     cython_0
40     geos # for geos-config
41     oldest-supported-numpy
42     setuptools
43     wheel
44   ];
46   buildInputs = [ geos ];
48   propagatedBuildInputs = [ numpy ];
50   nativeCheckInputs = [ pytestCheckHook ];
52   # Fix a ModuleNotFoundError. Investigated at:
53   # https://github.com/NixOS/nixpkgs/issues/255262
54   preCheck = ''
55     cd $out
56   '';
58   disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
59     # FIXME(lf-): these logging tests are broken, which is definitely our
60     # fault. I've tried figuring out the cause and failed.
61     #
62     # It is apparently some sandbox or no-sandbox related thing on macOS only
63     # though.
64     "test_error_handler_exception"
65     "test_error_handler"
66     "test_info_handler"
67   ];
69   pythonImportsCheck = [ "shapely" ];
71   meta = with lib; {
72     changelog = "https://github.com/shapely/shapely/blob/${version}/CHANGES.txt";
73     description = "Manipulation and analysis of geometric objects";
74     homepage = "https://github.com/shapely/shapely";
75     license = licenses.bsd3;
76     maintainers = teams.geospatial.members;
77   };