1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 mecab,
6 swig,
7 setuptools-scm,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "mecab-python3";
13 version = "1.0.10";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 pname = "mecab_python3";
20 inherit version;
21 hash = "sha256-Ic1EFgQ+mpk/z7mG3ek+Q2agdUPdlYSbXvLlDJqa/M4=";
22 };
23
24 nativeBuildInputs = [
25 mecab # for mecab-config
26 swig
27 setuptools-scm
28 ];
29
30 buildInputs = [ mecab ];
31
32 doCheck = false;
33
34 pythonImportsCheck = [ "MeCab" ];
35
36 meta = with lib; {
37 description = "Python wrapper for mecab: Morphological Analysis engine";
38 homepage = "https://github.com/SamuraiT/mecab-python3";
39 changelog = "https://github.com/SamuraiT/mecab-python3/releases/tag/v${version}";
40 license = with licenses; [
41 gpl2
42 lgpl21
43 bsd3
44 ]; # any of the three
45 };
46}