Skip to content

Commit 62cb1a9

Browse files
author
Teseo Schneider
committed
arm fix?
1 parent ab9c003 commit 62cb1a9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,21 @@ def build_extension(self, ext):
4646

4747
if platform.system() == "Windows":
4848
cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)]
49-
if os.environ.get('CMAKE_GENERATOR') != "NMake Makefiles" and os.environ.get('CMAKE_GENERATOR') != "Ninja":
49+
if os.environ.get('CMAKE_GENERATOR') != "NMake Makefiles" and "Ninja" not in os.environ.get('CMAKE_GENERATOR'):
5050
if sys.maxsize > 2**32:
5151
cmake_args += ['-A', 'x64']
5252
# build_args += ['--', '/m']
5353
else:
5454
build_args += ['--', '-j2']
5555

56+
tmp = os.environ.get("AR")
57+
if "arm64-apple" in tmp:
58+
print("MACOS ARM!!!!")
59+
tmp = os.environ.get("CMAKE_ARGS")
60+
print("heheheeh", tmp)
61+
if tmp:
62+
cmake_args += tmp.split(" ")
63+
5664
env = os.environ.copy()
5765
env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''),self.distribution.get_version())
5866
tmp = os.getenv('CC_FOR_BUILD')

0 commit comments

Comments
 (0)