File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change 6161 or n .endswith (".pxd" )]
6262thin_depends .append (base_pxd )
6363
64- # if the platform is macOS, add arguments required for cross-compilation for
65- # both x86_64 and arm64 architectures if the python interpreter is a
66- # universal2 version.
64+ # if the platform is macOS:
65+ # - target the minimim OS version that current Python packages work with.
66+ # (Use 'otool -l /path/to/python' and look for 'version' in the
67+ # LC_VERSION_MIN_MACOSX section)
68+ # - add argument required for cross-compilation for both x86_64 and arm64
69+ # architectures if the python interpreter is a universal2 version.
70+
6771extra_compile_args = []
68- if sys .platform == "darwin" and "universal2" in sysconfig .get_platform ():
69- if platform .machine () == "x86_64" :
70- target = "arm64-apple-macos"
71- else :
72- target = "x86_64-apple-macos"
73- extra_compile_args .extend (["-target" , target ])
72+ if sys .platform == "darwin" :
73+ extra_compile_args .extend (["-mmacosx-version-min=10.9" ])
74+ if "universal2" in sysconfig .get_platform ():
75+ if platform .machine () == "x86_64" :
76+ target = "arm64-apple-macos"
77+ else :
78+ target = "x86_64-apple-macos"
79+ extra_compile_args .extend (["-target" , target ])
7480
7581setup (
7682 ext_modules = [
You can’t perform that action at this time.
0 commit comments