Skip to content

Commit 3995ef6

Browse files
committed
Properly cythonize extensions
1 parent cd8a2a4 commit 3995ef6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ class BuildIsalExt(build_ext):
4141
def build_extension(self, ext):
4242
if isinstance(ext, IsalExtension):
4343
_add_extension_options(ext)
44-
super().build_extension(ext)
44+
# Import cython here because it should be installed by setup requires.
45+
from Cython.Build import cythonize
46+
cythonized_module = cythonize(ext)[0]
47+
setattr(cythonized_module, "_needs_stub", False)
48+
super().build_extension(cythonized_module)
4549

4650

4751
# Use a cache to prevent isa-l from being build twice. According to the

0 commit comments

Comments
 (0)