python310Packages.us: enable tests

- add pythonImportsCheck
This commit is contained in:
Fabian Affolter 2023-08-29 08:26:41 +02:00
parent 9f858f2b5b
commit 139db136bc

View file

@ -2,6 +2,9 @@
, buildPythonPackage
, fetchPypi
, jellyfish
, pytestCheckHook
, pythonOlder
, pytz
}:
buildPythonPackage rec {
@ -16,8 +19,8 @@ buildPythonPackage rec {
hash = "sha256-40eWPo0kocp0N69EP6aFkXdoR7UMhlDY7w61NILnBcI=";
};
# Upstream spins jellyfish
postPatch = ''
# Upstream spins jellyfish
substituteInPlace setup.py \
--replace "jellyfish==" "jellyfish>="
'';
@ -26,16 +29,22 @@ buildPythonPackage rec {
jellyfish
];
nativeCheckInputs = [
pytestCheckHook
pytz
];
doCheck = false; # pypi version doesn't include tests
pythonImportsCheck = [
"us"
];
meta = with lib; {
description = "A package for easily working with US and state metadata";
longDescription = ''
all US states and territories, postal abbreviations, Associated Press style
abbreviations, FIPS codes, capitals, years of statehood, time zones, phonetic
state name lookup, is contiguous or continental, URLs to shapefiles for state,
census, congressional districts, counties, and census tracts
All US states and territories, postal abbreviations, Associated Press style
abbreviations, FIPS codes, capitals, years of statehood, time zones, phonetic
state name lookup, is contiguous or continental, URLs to shapefiles for state,
census, congressional districts, counties, and census tracts.
'';
homepage = "https://github.com/unitedstates/python-us/";
license = licenses.bsd3;