python311Packages.sudachi-dict: fix build
This commit is contained in:
parent
ea1c112244
commit
39d2a724c9
@ -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 = ''
|
||||
|
@ -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 // {
|
||||
|
Loading…
Reference in New Issue
Block a user