2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
marisa-trie,
|
|
|
|
pythonOlder,
|
|
|
|
fetchPypi,
|
|
|
|
pytestCheckHook,
|
|
|
|
language-data,
|
|
|
|
setuptools,
|
2024-07-27 06:49:29 +00:00
|
|
|
setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "langcodes";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "3.4.1";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-okh5/tI4ATrDryQkudESTji0o4sgRP0pfI/zjlkS5xg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2021-12-26 17:43:05 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
language-data
|
|
|
|
marisa-trie
|
2022-10-06 18:32:54 +00:00
|
|
|
setuptools # pkg_resources import in language_data/util.py
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ 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
|
|
|
|
2024-06-05 15:53:02 +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";
|
2024-07-27 06:49:29 +00:00
|
|
|
homepage = "https://github.com/georgkrause/langcodes";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|