File tree 1 file changed +15
-10
lines changed
pkgs/development/python-modules/gensim
1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
lib ,
3
3
buildPythonPackage ,
4
- cython_0 ,
4
+ cython ,
5
5
oldest-supported-numpy ,
6
6
setuptools ,
7
- fetchPypi ,
7
+ fetchFromGitHub ,
8
8
mock ,
9
9
numpy ,
10
10
scipy ,
11
11
smart-open ,
12
12
pyemd ,
13
13
pytestCheckHook ,
14
- pythonOlder ,
15
14
} :
16
15
17
16
buildPythonPackage rec {
18
17
pname = "gensim" ;
19
18
version = "4.3.3" ;
20
19
pyproject = true ;
21
20
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=" ;
21
+ # The pypi source package fails to build with Cython 3.0, so we get
22
+ # the sources from the repo instead.
23
+ src = fetchFromGitHub {
24
+ owner = "piskvorky" ;
25
+ repo = "gensim" ;
26
+ rev = version ;
27
+ hash = "sha256-J2DNnu4SmJtAnBZ+D4xUFGDVCj9u2zXMLZlVFWbbSUg=" ;
28
28
} ;
29
29
30
+ postPatch = ''
31
+ substituteInPlace pyproject.toml \
32
+ --replace-fail "Cython>=0.29.32,<3.0.0" "Cython"
33
+ '' ;
34
+
30
35
build-system = [
31
- cython_0
36
+ cython
32
37
oldest-supported-numpy
33
38
setuptools
34
39
] ;
You can’t perform that action at this time.
0 commit comments