2018-03-25 19:33:53 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, marisa-trie
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
2021-11-29 21:54:57 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, language-data
|
2018-03-25 19:33:53 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "langcodes";
|
2021-11-25 22:46:57 +00:00
|
|
|
version = "3.3.0";
|
2021-11-29 21:54:57 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2018-03-25 19:33:53 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-11-25 22:46:57 +00:00
|
|
|
sha256 = "794d07d5a28781231ac335a1561b8442f8648ca07cd518310aeb45d6f0807ef6";
|
2018-03-25 19:33:53 +01:00
|
|
|
};
|
|
|
|
|
2021-11-29 21:54:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
language-data
|
|
|
|
marisa-trie
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2018-03-25 19:33:53 +01:00
|
|
|
|
2021-11-29 21:54:57 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: assert 'Unknown language [aqk]' == 'Aninka'
|
|
|
|
"test_updated_iana"
|
|
|
|
];
|
2018-03-25 19:33:53 +01:00
|
|
|
|
2021-11-29 21:54:57 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"langcodes"
|
|
|
|
];
|
2018-03-25 19:33:53 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-11-29 21:54:57 +00:00
|
|
|
description = "Python toolkit for working with and comparing the standardized codes for languages";
|
|
|
|
homepage = "https://github.com/LuminosoInsight/langcodes";
|
2018-03-25 19:33:53 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ixxie ];
|
|
|
|
};
|
|
|
|
}
|