2022-01-26 04:04:25 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
2024-01-02 11:29:13 +00:00
|
|
|
, geos_3_11
|
2022-01-26 04:04:25 +00:00
|
|
|
, pytestCheckHook
|
2024-04-21 15:54:59 +00:00
|
|
|
, cython_0
|
2022-01-26 04:04:25 +00:00
|
|
|
, numpy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygeos";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.14";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-01-26 04:04:25 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-MPvBf2SEQgC4UTO4hfz7ZVQbh3lTH270+P5GfT+6diM=";
|
2022-01-26 04:04:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
geos_3_11 # for geos-config
|
2024-04-21 15:54:59 +00:00
|
|
|
cython_0
|
2022-01-26 04:04:25 +00:00
|
|
|
];
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
];
|
2022-01-26 04:04:25 +00:00
|
|
|
|
|
|
|
# The cythonized extensions are required to exist in the pygeos/ directory
|
|
|
|
# for the package to function. Therefore override of buildPhase was
|
|
|
|
# necessary.
|
|
|
|
buildPhase = ''
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} setup.py build_ext --inplace
|
|
|
|
${python.pythonOnBuildForHost.interpreter} setup.py bdist_wheel
|
2022-01-26 04:04:25 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-26 04:04:25 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pygeos"
|
|
|
|
];
|
2022-01-26 04:04:25 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
description = "Wraps GEOS geometry functions in numpy ufuncs";
|
2022-01-26 04:04:25 +00:00
|
|
|
homepage = "https://github.com/pygeos/pygeos";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/pygeos/pygeos/blob/${version}/CHANGELOG.rst";
|
2022-01-26 04:04:25 +00:00
|
|
|
license = licenses.bsd3;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = teams.geospatial.members;
|
2022-01-26 04:04:25 +00:00
|
|
|
};
|
|
|
|
}
|