@@ -59,6 +59,19 @@ def add_platform_config(*args, **kwargs):
5959 executable = 'python.exe' ,
6060)
6161
62+ add_platform_config (
63+ platform = 'macos' ,
64+ arch = 'universal' ,
65+ source_url = 'https://github.com/indygreg/python-build-standalone/releases/download/'
66+ '20231002/cpython-3.12.0+20231002-x86_64-apple-darwin-install_only.tar.gz' ,
67+ so_suffixes = ['.os' ],
68+ ext_suffixes = ['.os' ],
69+ so_path = 'lib/libpython3.12.dylib' ,
70+ python_lib_dir = 'lib/python3.12' ,
71+ python_ext_dir = 'lib/python3.12/lib-dynload' ,
72+ executable = 'bin/python3.12' ,
73+ )
74+
6275
6376def fetch_python_for_platform (platform : str , arch : str , dest_dir : pathlib .Path ):
6477 config = platform_configs [(platform , arch )]
@@ -84,7 +97,10 @@ def prepare_for_platform(platform: str, arch: str,
8497 dest_dir .mkdir (parents = True , exist_ok = True )
8598
8699 shutil .copy2 (src / config .so_path , dest_dir )
87- subprocess .run (['strip' , '-s' , str (dest_dir / pathlib .Path (config .so_path ).name )], check = True )
100+ if platform == 'macos' :
101+ subprocess .run (['strip' , '-x' , str (dest_dir / pathlib .Path (config .so_path ).name )], check = True )
102+ else :
103+ subprocess .run (['strip' , '-s' , str (dest_dir / pathlib .Path (config .so_path ).name )], check = True )
88104
89105 if (src / config .python_ext_dir ).exists ():
90106 dest_ext_dir = dest_dir / 'python3.12' / 'lib-dynload'
0 commit comments