1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
{ lib
, buildPythonPackage
, fetchPypi
, jellyfish
, pytestCheckHook
, pythonOlder
, pytz
}:
buildPythonPackage rec {
pname = "us";
version = "3.1.1";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-40eWPo0kocp0N69EP6aFkXdoR7UMhlDY7w61NILnBcI=";
};
postPatch = ''
# Upstream spins jellyfish
substituteInPlace setup.py \
--replace "jellyfish==" "jellyfish>="
'';
propagatedBuildInputs = [
jellyfish
];
nativeCheckInputs = [
pytestCheckHook
pytz
];
pythonImportsCheck = [
"us"
];
meta = with lib; {
description = "A package for easily working with US and state metadata";
mainProgram = "states";
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.
'';
homepage = "https://github.com/unitedstates/python-us/";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
}
|