python312Packages.wktutils: refactor

This commit is contained in:
Fabian Affolter 2024-05-09 11:25:09 +02:00
parent 00fc2d271c
commit 89367b2886

View File

@ -3,15 +3,14 @@
, dateparser , dateparser
, defusedxml , defusedxml
, fetchFromGitHub , fetchFromGitHub
, fiona
, geomet , geomet
, geopandas , geopandas
, kml2geojson , kml2geojson
, pyshp , pyshp
, pythonOlder , pythonOlder
, pyyaml , pyyaml
, regex
, requests , requests
, setuptools-scm
, shapely , shapely
, scikit-learn , scikit-learn
}: }:
@ -19,7 +18,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "wktutils"; pname = "wktutils";
version = "2.0.0"; version = "2.0.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -30,25 +29,32 @@ buildPythonPackage rec {
hash = "sha256-mB+joEZq/aFPcRqFAzPgwG26Wi7WiRCeQeFottk+4Ho="; hash = "sha256-mB+joEZq/aFPcRqFAzPgwG26Wi7WiRCeQeFottk+4Ho=";
}; };
propagatedBuildInputs = [ postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"twine",' ""
'';
build-system = [
setuptools-scm
];
dependencies = [
dateparser dateparser
defusedxml defusedxml
fiona
geomet geomet
geopandas geopandas
kml2geojson kml2geojson
pyshp pyshp
pyyaml pyyaml
regex
requests
shapely shapely
scikit-learn
]; ];
postPatch = '' passthru.optional-dependencies = {
substituteInPlace setup.py \ extras = [
--replace "sklearn" "scikit-learn" requests
''; scikit-learn
];
};
# Module doesn't have tests # Module doesn't have tests
doCheck = false; doCheck = false;
@ -60,6 +66,7 @@ buildPythonPackage rec {
meta = with lib; { meta = with lib; {
description = "Collection of tools for handling WKTs"; description = "Collection of tools for handling WKTs";
homepage = "https://github.com/asfadmin/Discovery-WKTUtils"; homepage = "https://github.com/asfadmin/Discovery-WKTUtils";
changelog = "https://github.com/asfadmin/Discovery-WKTUtils/blob/v${version}/CHANGELOG.md";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = with maintainers; [ fab ]; maintainers = with maintainers; [ fab ];
}; };