1{
2 lib,
3 buildPythonPackage,
4 cython_0,
5 oldest-supported-numpy,
6 setuptools,
7 fetchPypi,
8 mock,
9 numpy,
10 scipy,
11 smart-open,
12 pyemd,
13 pytestCheckHook,
14 pythonOlder,
15}:
16
17buildPythonPackage rec {
18 pname = "gensim";
19 version = "4.3.3";
20 pyproject = true;
21
22 # C code generated with CPython3.12 does not work cython_0.
23 disabled = !(pythonOlder "3.12");
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-hIUgdqaj2I19rFviReJMIcO4GbVl4UwbYfo+Xudtz1c=";
28 };
29
30 build-system = [
31 cython_0
32 oldest-supported-numpy
33 setuptools
34 ];
35
36 dependencies = [
37 smart-open
38 numpy
39 scipy
40 ];
41
42 nativeCheckInputs = [
43 mock
44 pyemd
45 pytestCheckHook
46 ];
47
48 pythonRelaxDeps = [
49 "scipy"
50 ];
51
52 pythonImportsCheck = [ "gensim" ];
53
54 # Test setup takes several minutes
55 doCheck = false;
56
57 enabledTestPaths = [ "gensim/test" ];
58
59 meta = with lib; {
60 description = "Topic-modelling library";
61 homepage = "https://radimrehurek.com/gensim/";
62 changelog = "https://github.com/RaRe-Technologies/gensim/blob/${version}/CHANGELOG.md";
63 license = licenses.lgpl21Only;
64 };
65}