Skip to content

Commit

Permalink
fix2?
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilliams committed Aug 28, 2024
1 parent aef3e42 commit 8df2633
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def build_extension(self, ext):
env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''), self.distribution.get_version())
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
cmake_args += ['-DCMAKE_OSX_ARCHITECTURES:STRING="x86_64;arm64"']

if platform.processor() == 'arm':
cmake_args += ['-DCMAKE_OSX_ARCHITECTURES:STRING="arm64"']
subprocess.check_call(['cmake'] + cmake_args + [ext.sourcedir], cwd=self.build_temp, env=env)
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
print() # Add an empty line for cleaner output
Expand Down

0 comments on commit 8df2633

Please sign in to comment.