Skip to content

Commit e023f7e

Browse files
committed
Fix
1 parent 08569de commit e023f7e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ def build_extensions(self):
103103
opts.append('-fvisibility=hidden')
104104
if not os.environ.get("HNSWLIB_NO_NATIVE"):
105105
# check that native flag is available
106-
print('checking avalability of flag:', native_flag)
107-
if not has_flag(self.compiler, native_flag):
108-
print('removing unsupported compiler flag:', native_flag)
109-
opts.remove(native_flag)
106+
print('checking avalability of flag:', self.native_flag)
107+
if not has_flag(self.compiler, self.native_flag):
108+
print('removing unsupported compiler flag:', self.native_flag)
109+
opts.remove(self.native_flag)
110110
# for macos add apple-m1 flag if it's available
111111
if sys.platform == 'darwin':
112112
m1_flag = '-mcpu=apple-m1'
@@ -117,7 +117,7 @@ def build_extensions(self):
117117
else:
118118
print(f'flag: {m1_flag} is not available')
119119
else:
120-
print(f'flag: {native_flag} is available')
120+
print(f'flag: {self.native_flag} is available')
121121
elif ct == 'msvc':
122122
opts.append('/DVERSION_INFO=\\"%s\\"' % self.distribution.get_version())
123123

0 commit comments

Comments
 (0)