Skip to content

Commit 3bb0d0d

Browse files
committed
Always try to build with Cython, unless it's not installed at build time.
1 parent ddb3818 commit 3bb0d0d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

setup.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,22 @@
2828
try:
2929
sys.argv.remove("--with-cython")
3030
except ValueError:
31-
cythonize = None
32-
else:
31+
pass # legacy option
32+
33+
cythonize = None
34+
try:
35+
sys.argv.remove("--no-cython")
36+
except ValueError:
3337
try:
3438
from Cython.Build import cythonize
39+
from Cython import __version__ as cython_version
3540
import Cython.Compiler.Options as cython_options
3641
cython_options.annotate = True
3742
except ImportError:
43+
print("Cython not found, building without Cython")
3844
cythonize = None
3945
else:
46+
print("Building with Cython %s" % cython_version)
4047
compiler_directives = {}
4148
if enable_profiling:
4249
compiler_directives['profile'] = True

0 commit comments

Comments
 (0)