depot/third_party/nixpkgs/pkgs/development/python-modules/pycountry/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

42 lines
1,000 B
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
poetry-core,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pycountry";
version = "24.6.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "pycountry";
repo = "pycountry";
rev = "refs/tags/${version}";
hash = "sha256-4YVPh6OGWguqO9Ortv+vAejxx7WLs4u0SVLv8JlKSWM=";
};
postPatch = ''
sed -i "/addopts/d" pyproject.toml
sed -i "/pytest-cov/d" pyproject.toml
'';
build-system = [ poetry-core ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "pycountry" ];
meta = {
homepage = "https://github.com/pycountry/pycountry";
changelog = "https://github.com/pycountry/pycountry/blob/${src.rev}/HISTORY.txt";
description = "ISO country, subdivision, language, currency and script definitions and their translations";
license = lib.licenses.lgpl21Plus;
maintainers = with lib.maintainers; [ dotlambda ];
};
}