makepanda: Use PythonT.framework when using free-threaded build
This commit is contained in:
parent
6885edc811
commit
1f6ed882ab
|
|
@ -2189,11 +2189,15 @@ def SdkLocatePython(prefer_thirdparty_python=False):
|
|||
sysroot = SDK.get("MACOSX", "")
|
||||
version = locations.get_python_version()
|
||||
|
||||
py_fwx = "{0}/System/Library/Frameworks/Python.framework/Versions/{1}".format(sysroot, version)
|
||||
framework_name = "Python"
|
||||
if 't' in abiflags:
|
||||
framework_name += "T"
|
||||
|
||||
py_fwx = "{0}/System/Library/Frameworks/{1}.framework/Versions/{2}".format(sysroot, framework_name, version)
|
||||
|
||||
if not os.path.exists(py_fwx):
|
||||
# Fall back to looking on the system.
|
||||
py_fwx = "/Library/Frameworks/Python.framework/Versions/" + version
|
||||
py_fwx = "/Library/Frameworks/{0}.framework/Versions/{1}".format(framework_name, version)
|
||||
|
||||
if not os.path.exists(py_fwx):
|
||||
# Newer macOS versions use this scheme.
|
||||
|
|
|
|||
|
|
@ -497,7 +497,8 @@ class WheelFile(object):
|
|||
self.consider_add_dependency(target_dep, dep_path)
|
||||
continue
|
||||
|
||||
elif dep.startswith('/Library/Frameworks/Python.framework/'):
|
||||
elif dep.startswith('/Library/Frameworks/Python.framework/') or \
|
||||
dep.startswith('/Library/Frameworks/PythonT.framework/'):
|
||||
# Add this dependency if it's in the Python directory.
|
||||
target_dep = os.path.dirname(target_path) + '/' + os.path.basename(dep)
|
||||
target_dep = self.consider_add_dependency(target_dep, dep, loader_path)
|
||||
|
|
|
|||
Loading…
Reference in New Issue