2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
dateparser,
|
|
|
|
defusedxml,
|
|
|
|
fetchFromGitHub,
|
|
|
|
geomet,
|
|
|
|
geopandas,
|
|
|
|
kml2geojson,
|
|
|
|
pyshp,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
|
|
|
requests,
|
|
|
|
setuptools-scm,
|
|
|
|
shapely,
|
|
|
|
scikit-learn,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wktutils";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.0.0";
|
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "asfadmin";
|
|
|
|
repo = "Discovery-WKTUtils";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-mB+joEZq/aFPcRqFAzPgwG26Wi7WiRCeQeFottk+4Ho=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail '"twine",' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ setuptools-scm ];
|
|
|
|
|
|
|
|
dependencies = [
|
2022-06-16 17:23:12 +00:00
|
|
|
dateparser
|
|
|
|
defusedxml
|
|
|
|
geomet
|
|
|
|
geopandas
|
|
|
|
kml2geojson
|
|
|
|
pyshp
|
|
|
|
pyyaml
|
|
|
|
shapely
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
extras = [
|
|
|
|
requests
|
|
|
|
scikit-learn
|
|
|
|
];
|
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
# Module doesn't have tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "WKTUtils" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Collection of tools for handling WKTs";
|
|
|
|
homepage = "https://github.com/asfadmin/Discovery-WKTUtils";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/asfadmin/Discovery-WKTUtils/blob/v${version}/CHANGELOG.md";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|