python3Packages.us: switch to pyproject

This commit is contained in:
wxt 2024-11-10 17:14:09 +08:00
parent e19b3c8cd3
commit ef21cc74e2
No known key found for this signature in database
GPG Key ID: F62181757D8BF693

View File

@ -6,12 +6,15 @@
pytestCheckHook,
pythonOlder,
pytz,
setuptools,
}:
buildPythonPackage rec {
pname = "us";
version = "3.2.0";
format = "setuptools";
pyproject = true;
build-system = [ setuptools ];
disabled = pythonOlder "3.6";
@ -20,13 +23,9 @@ buildPythonPackage rec {
hash = "sha256-yyI+hTk9zFFx6tDdISutxH+WZ7I3AP6j5+pfMQ1UUzg=";
};
postPatch = ''
# Upstream spins jellyfish
substituteInPlace setup.py \
--replace "jellyfish==" "jellyfish>="
'';
propagatedBuildInputs = [ jellyfish ];
propagatedBuildInputs = [
jellyfish
];
nativeCheckInputs = [
pytestCheckHook
@ -35,7 +34,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "us" ];
meta = with lib; {
meta = {
description = "Package for easily working with US and state metadata";
mainProgram = "states";
longDescription = ''
@ -45,7 +44,7 @@ buildPythonPackage rec {
census, congressional districts, counties, and census tracts.
'';
homepage = "https://github.com/unitedstates/python-us/";
license = licenses.bsd3;
license = lib.licenses.bsd3;
maintainers = [ ];
};
}