Files
nixpkgs/pkgs/development/python-modules/jieba/default.nix
T
Yueh-Shun Li 5207d05960 python3Packages.jieba: use the locale specification from buildPythonPackage
Also remove glibcLocale from nativeCheckInputs,
without which the package still builds.
2025-03-08 00:30:03 +08:00

39 lines
848 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
python,
isPy3k,
}:
buildPythonPackage rec {
pname = "jieba";
version = "0.42.1";
format = "setuptools";
# no tests in PyPI tarball
src = fetchFromGitHub {
owner = "fxsjy";
repo = pname;
rev = "v${version}";
sha256 = "028vmd6sj6wn9l1ilw7qfmlpyiysnlzdgdlhwxs6j4fvq0gyrwxk";
};
# UnicodeEncodeError
doCheck = isPy3k;
# Citing https://github.com/fxsjy/jieba/issues/384: "testcases is in a mess"
# So just picking random ones that currently work
checkPhase = ''
${python.interpreter} test/test.py
${python.interpreter} test/test_tokenize.py
'';
meta = with lib; {
description = "Chinese Words Segementation Utilities";
homepage = "https://github.com/fxsjy/jieba";
license = licenses.mit;
maintainers = teams.tts.members;
};
}