File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed
Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 22requires = [
33 " setuptools>=41.0.0,<50.0" ,
44 " wheel" ,
5- " cython< 3.0" ,
5+ " cython>= 3.0" ,
66 " oldest-supported-numpy" ,
77 " sphinx" ,
88 " recommonmark" ,
Original file line number Diff line number Diff line change 2929 have_sphinx = False
3030
3131try :
32- from Cython .Distutils . build_ext import new_build_ext as build_ext
32+ from Cython .Build import cythonize
3333 have_cython = True
3434except ImportError :
3535 have_cython = False
@@ -434,14 +434,7 @@ def ext_modules():
434434 if os .name == 'posix' :
435435 libraries .append ("m" )
436436
437- return [
438- # Cython extensions. Will be automatically cythonized.
439- Extension (
440- "*" ,
441- ["Orange/*/*.pyx" ],
442- include_dirs = includes ,
443- libraries = libraries ,
444- ),
437+ modules = [
445438 Extension (
446439 "Orange.classification._simple_tree" ,
447440 sources = [
@@ -464,6 +457,16 @@ def ext_modules():
464457 ),
465458 ]
466459
460+ if have_cython :
461+ modules += cythonize (Extension (
462+ "*" ,
463+ ["Orange/*/*.pyx" ],
464+ include_dirs = includes ,
465+ libraries = libraries ,
466+ ))
467+
468+ return modules
469+
467470
468471def setup_package ():
469472 write_version_py ()
@@ -478,17 +481,14 @@ def setup_package():
478481 # numpy.distutils insist all data files are installed in site-packages
479482 'install_data' : install_data .install_data
480483 }
481- if have_numpy and have_cython :
482- extra_args = {}
483- cmdclass ["build_ext" ] = build_ext
484- else :
484+ if not (have_numpy and have_cython ):
485485 # substitute a build_ext command with one that raises an error when
486486 # building. In order to fully support `pip install` we need to
487487 # survive a `./setup egg_info` without numpy so pip can properly
488488 # query our install dependencies
489- extra_args = {}
490489 cmdclass ["build_ext" ] = build_ext_error
491490
491+ extra_args = {}
492492 setup (
493493 name = NAME ,
494494 version = FULLVERSION ,
You can’t perform that action at this time.
0 commit comments