2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
2023-01-11 07:51:40 +00:00
|
|
|
, fetchPypi
|
2021-03-09 03:18:52 +00:00
|
|
|
, cython
|
2023-01-11 07:51:40 +00:00
|
|
|
, geos
|
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
2023-01-11 07:51:40 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-01-11 07:51:40 +00:00
|
|
|
pname = "shapely";
|
|
|
|
version = "2.0.0";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-EfGxIxpsBCE/sSJsaWjRsbOzaexC0ellUGavh2MYYOo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
2023-01-11 07:51:40 +00:00
|
|
|
geos # for geos-config
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
geos
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-02-24 18:30:23 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
rm -r shapely # prevent import of local shapely
|
|
|
|
'';
|
|
|
|
|
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;
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ knedlsepp ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|