1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 pycountry,
7 repoze-lru,
8}:
9
10buildPythonPackage rec {
11 pname = "pycountry-convert";
12 version = "0.7.2";
13 pyproject = true;
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-CV0xD3Rr8qXvcTs6gu6iiicmIoYiN2Wx576KXE+n6bk=";
18 };
19
20 postPatch = ''
21 substituteInPlace setup.py \
22 --replace-fail "pytest-runner" ""
23 '';
24
25 build-system = [ setuptools ];
26
27 pythonRemoveDeps = [
28 "pprintpp"
29 "pytest"
30 "pytest-cov"
31 "repoze-lru"
32 "pytest-mock"
33 ];
34
35 propagatedBuildInputs = [
36 pycountry
37 repoze-lru
38 ];
39
40 pythonImportsCheck = [ "pycountry_convert" ];
41
42 # upstream has no tests
43 doCheck = false;
44
45 meta = {
46 description = "Python conversion functions between ISO country codes, countries, and continents";
47 homepage = "https://github.com/jefftune/pycountry-convert";
48 license = lib.licenses.mit;
49 maintainers = with lib.maintainers; [ dotlambda ];
50 };
51}