File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,15 @@ def build_extension(self, ext):
48
48
# _needs_stub is apparently not set elsewhere. It is not needed for
49
49
# a functional isal extension.
50
50
setattr (cythonized_ext , "_needs_stub" , False )
51
+
52
+ # Check for isa-l include directories. This is useful when installing
53
+ # in a conda environment.
51
54
possible_prefixes = [sys .exec_prefix , sys .base_exec_prefix ]
52
55
for prefix in possible_prefixes :
53
56
if os .path .exists (os .path .join (prefix , "include" , "isa-l" )):
54
57
cythonized_ext .include_dirs = [
55
58
os .path .join (prefix , "include" )]
59
+ break # Only one include directory is needed.
56
60
cythonized_ext .libraries = ["isal" ]
57
61
try : # First try to link dynamically
58
62
super ().build_extension (cythonized_ext )
You can’t perform that action at this time.
0 commit comments