File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2525import os
2626import platform
2727import sys
28+ import sysconfig
2829from setuptools import setup , Extension
2930
3031# base source directory
6162thin_depends .append (base_pxd )
6263
6364# if the platform is macOS, add arguments required for cross-compilation for
64- # both x86_64 and arm64 architectures.
65- # Use a Universal 2 Python binary to build, or set an archtecture
66- # before building, e.g. export ARCHFLAGS="-arch x86_64"
65+ # both x86_64 and arm64 architectures if the python interpreter is a
66+ # universal2 version.
6767extra_compile_args = []
68- if sys .platform == "darwin" :
68+ if sys .platform == "darwin" and "universal2" in sysconfig . get_platform () :
6969 if platform .machine () == "x86_64" :
7070 target = "arm64-apple-macos"
7171 else :
You can’t perform that action at this time.
0 commit comments