diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 8374356db4..486bd696fb 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -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. diff --git a/makepanda/makewheel.py b/makepanda/makewheel.py index 32b933c4ba..3e56581549 100644 --- a/makepanda/makewheel.py +++ b/makepanda/makewheel.py @@ -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)