2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, marisa-trie
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
2021-12-26 17:43:05 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, language-data
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "langcodes";
|
2021-12-26 17:43:05 +00:00
|
|
|
version = "3.3.0";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-26 17:43:05 +00:00
|
|
|
sha256 = "794d07d5a28781231ac335a1561b8442f8648ca07cd518310aeb45d6f0807ef6";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
language-data
|
|
|
|
marisa-trie
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: assert 'Unknown language [aqk]' == 'Aninka'
|
|
|
|
"test_updated_iana"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"langcodes"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-26 17:43:05 +00:00
|
|
|
description = "Python toolkit for working with and comparing the standardized codes for languages";
|
|
|
|
homepage = "https://github.com/LuminosoInsight/langcodes";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ixxie ];
|
|
|
|
};
|
|
|
|
}
|