Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dyashuni committed Aug 11, 2023
1 parent 08569de commit e023f7e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ def build_extensions(self):
opts.append('-fvisibility=hidden')
if not os.environ.get("HNSWLIB_NO_NATIVE"):
# check that native flag is available
print('checking avalability of flag:', native_flag)
if not has_flag(self.compiler, native_flag):
print('removing unsupported compiler flag:', native_flag)
opts.remove(native_flag)
print('checking avalability of flag:', self.native_flag)
if not has_flag(self.compiler, self.native_flag):
print('removing unsupported compiler flag:', self.native_flag)
opts.remove(self.native_flag)
# for macos add apple-m1 flag if it's available
if sys.platform == 'darwin':
m1_flag = '-mcpu=apple-m1'
Expand All @@ -117,7 +117,7 @@ def build_extensions(self):
else:
print(f'flag: {m1_flag} is not available')
else:
print(f'flag: {native_flag} is available')
print(f'flag: {self.native_flag} is available')
elif ct == 'msvc':
opts.append('/DVERSION_INFO=\\"%s\\"' % self.distribution.get_version())

Expand Down

0 comments on commit e023f7e

Please sign in to comment.