@@ -44,26 +44,28 @@ def build_extension(self, ext):
44
44
return
45
45
# Import cython here because it should be installed by setup requires.
46
46
from Cython .Build import cythonize
47
- cythonized_module = cythonize (ext )[0 ]
47
+ cythonized_ext = cythonize (ext )[0 ]
48
48
# _needs_stub is apparently not set elsewhere. It is not needed for
49
49
# a functional isal extension.
50
- setattr (cythonized_module , "_needs_stub" , False )
50
+ setattr (cythonized_ext , "_needs_stub" , False )
51
51
possible_prefixes = [sys .exec_prefix , sys .base_exec_prefix ]
52
52
for prefix in possible_prefixes :
53
53
if os .path .exists (os .path .join (prefix , "include" , "isa-l" )):
54
- ext .include_dirs = [os .path .join (prefix , "include" )]
55
- ext .libraries = ["isal" ]
54
+ cythonized_ext .include_dirs = [
55
+ os .path .join (prefix , "include" )]
56
+ cythonized_ext .libraries = ["isal" ]
56
57
try :
57
- super ().build_extension (cythonized_module )
58
+ super ().build_extension (cythonized_ext )
58
59
except CompileError : # Dynamic linking failed
59
- ext .libraries = [] # Make sure libraries are empty
60
+ cythonized_ext .libraries = [] # Make sure libraries are empty
60
61
isa_l_prefix_dir = build_isa_l ()
61
- ext .include_dirs = [os .path .join (isa_l_prefix_dir , "include" )]
62
+ cythonized_ext .include_dirs = [os .path .join (isa_l_prefix_dir ,
63
+ "include" )]
62
64
# -fPIC needed for proper static linking
63
- ext .extra_compile_args = ["-fPIC" ]
64
- ext .extra_objects = [
65
+ cythonized_ext .extra_compile_args = ["-fPIC" ]
66
+ cythonized_ext .extra_objects = [
65
67
os .path .join (isa_l_prefix_dir , "lib" , "libisal.a" )]
66
- super ().build_extension (cythonized_module )
68
+ super ().build_extension (cythonized_ext )
67
69
68
70
69
71
# Use a cache to prevent isa-l from being build twice. According to the
0 commit comments