File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,9 +255,10 @@ def to_win_path(pt: Path):
255255 # see https://github.com/rdkit/rdkit/blob/498f57a4eb99a67d842cbc3f89f94b302f398a11/CMakeLists.txt#L376C59-L376C95
256256 # remove "-arch x86_64" from PYTHON_LDSHARED
257257 if "cp313" in os .environ ["CIBW_BUILD" ] or "cp314" in os .environ ["CIBW_BUILD" ]:
258- old = '${Python3_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var(\' LDSHARED\' ).lstrip().split(\' \' , 1)[1])"'
259- new = '${Python3_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var(\' LDSHARED\' ).lstrip().split(\' \' , 1)[1].replace(\' -arch x86_64\' , \' \' ))"'
260- replace_all ("CMakeLists.txt" , old , new )
258+ for python_var in ("Python3_EXECUTABLE" , "Python_EXECUTABLE" ):
259+ old = f'${{{ python_var } }} -c "import sysconfig; print(sysconfig.get_config_var(\' LDSHARED\' ).lstrip().split(\' \' , 1)[1])"'
260+ new = f'${{{ python_var } }} -c "import sysconfig; print(sysconfig.get_config_var(\' LDSHARED\' ).lstrip().split(\' \' , 1)[1].replace(\' -arch x86_64\' , \' \' ))"'
261+ replace_all ("CMakeLists.txt" , old , new )
261262
262263
263264 if "linux" in sys .platform :
You can’t perform that action at this time.
0 commit comments