depot/third_party/nixpkgs/pkgs/development/python-modules/pycountry-convert/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

51 lines
975 B
Nix

{
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 ];
};
}