2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cython_0,
|
|
|
|
geos,
|
|
|
|
numpy,
|
|
|
|
oldest-supported-numpy,
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-01-11 07:51:40 +00:00
|
|
|
pname = "shapely";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.0.4";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Xcc2En+scACbjTCaDut08+CJeeUwz3AX8vUH72Lmz7g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython_0
|
2023-01-11 07:51:40 +00:00
|
|
|
geos # for geos-config
|
2023-08-22 20:05:09 +00:00
|
|
|
oldest-supported-numpy
|
2023-01-11 07:51:40 +00:00
|
|
|
setuptools
|
2023-08-22 20:05:09 +00:00
|
|
|
wheel
|
2023-01-11 07:51:40 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ geos ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ numpy ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-02-24 18:30:23 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# Fix a ModuleNotFoundError. Investigated at:
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/255262
|
2021-02-24 18:30:23 +00:00
|
|
|
preCheck = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
cd $out
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
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"
|
2021-02-24 18:30:23 +00:00
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
pythonImportsCheck = [ "shapely" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-01-11 07:51:40 +00:00
|
|
|
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;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = teams.geospatial.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|