瀏覽代碼

makepanda: fix custom --python-incdir and --python-libdir on macOS

rdb 6 年之前
父節點
當前提交
7fa373bd6a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      makepanda/makepandacore.py

+ 1 - 1
makepanda/makepandacore.py

@@ -2159,7 +2159,7 @@ def SdkLocatePython(prefer_thirdparty_python=False):
         SDK["PYTHONEXEC"] = tp_python + "/bin/" + SDK["PYTHONVERSION"]
         SDK["PYTHON"] = tp_python + "/include/" + SDK["PYTHONVERSION"]
 
-    elif GetTarget() == 'darwin':
+    elif GetTarget() == 'darwin' and not PkgHasCustomLocation("PYTHON"):
         # On macOS, search for the Python framework directory matching the
         # version number of our current Python version.
         sysroot = SDK.get("MACOSX", "")