summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pycountry-convert/default.nix
blob: 7dda05c909ad90875533187a9424abaa0575b975 (plain)
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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  setuptools,
  pycountry,
  repoze-lru,
}:

buildPythonPackage rec {
  pname = "pycountry-convert";
  version = "0.7.2";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-CV0xD3Rr8qXvcTs6gu6iiicmIoYiN2Wx576KXE+n6bk=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace-fail "pytest-runner" ""
  '';

  build-system = [ setuptools ];

  pythonRemoveDeps = [
    "pprintpp"
    "pytest"
    "pytest-cov"
    "repoze-lru"
    "pytest-mock"
  ];

  propagatedBuildInputs = [
    pycountry
    repoze-lru
  ];

  pythonImportsCheck = [ "pycountry_convert" ];

  # upstream has no tests
  doCheck = false;

  meta = {
    description = "Python conversion functions between ISO country codes, countries, and continents";
    homepage = "https://github.com/jefftune/pycountry-convert";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}