makepackage: apply workaround for bpo-28440 to 2.7 and 3.8+ too

See #502
This commit is contained in:
rdb 2019-08-17 19:58:39 +02:00
parent 1e846709d3
commit b94e080ad2

View File

@ -562,9 +562,9 @@ def MakeInstallerOSX(version, runtime=False, python_versions=[], **kwargs):
oscmd("mkdir -p dstroot/pybindings%s/Library/Python/%s/site-packages" % (pyver, pyver))
WriteFile("dstroot/pybindings%s/Library/Python/%s/site-packages/Panda3D.pth" % (pyver, pyver), "/Developer/Panda3D")
# Evidently not all Python 3.7 installations read the above path, so do this for now
# See GitHub #502
if pyver == "3.7":
# Somewhere in Python 2.7.13 and 3.7, the above path was removed from
# sys.path of the python.org distribution. See bpo-28440 and GH #502.
if pyver not in ("3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6"):
dir = "dstroot/pybindings%s/Library/Frameworks/Python.framework/Versions/%s/lib/python%s/site-packages" % (pyver, pyver, pyver)
oscmd("mkdir -p %s" % (dir))
WriteFile("%s/Panda3D.pth" % (dir), "/Developer/Panda3D")