python311Packages.sudachi-dict: fix build

This commit is contained in:
natsukium 2024-01-23 19:09:21 +09:00
parent ea1c112244
commit 39d2a724c9
No known key found for this signature in database
GPG Key ID: 9EA45A31DB994C53
2 changed files with 19 additions and 0 deletions

View File

@ -2,6 +2,7 @@
, fetchFromGitHub
, sudachidict
, setuptools
, sudachipy
}:
buildPythonPackage rec {
@ -33,6 +34,10 @@ buildPythonPackage rec {
setuptools
];
propagatedBuildInputs = [
sudachipy
];
# we need to prepare some files before the build
# https://github.com/WorksApplications/SudachiDict/blob/develop/package_python.sh
preBuild = ''

View File

@ -10,6 +10,7 @@
, pytestCheckHook
, sudachidict-core
, tokenizers
, sudachipy
}:
buildPythonPackage rec {
@ -37,6 +38,9 @@ buildPythonPackage rec {
cd python
'';
# avoid infinite recursion due to sudachidict
doCheck = false;
nativeCheckInputs = [
pytestCheckHook
sudachidict-core
@ -49,6 +53,16 @@ buildPythonPackage rec {
passthru = {
inherit (sudachi-rs) updateScript;
tests = {
pytest = sudachipy.overridePythonAttrs (
_: {
doCheck = true;
# avoid catchConflicts of sudachipy
# we don't need to install this package since it is just a test
dontInstall = true;
}
);
};
};
meta = sudachi-rs.meta // {