Skip to content

Commit 9ff5364

Browse files
committed
makepackage: fix locating Panda3D on sys.path on macOS w/ Py 3.7
Also moves panda3d.dist-info directory to /Developer/Panda3D/ so that deleting /Developer/Panda3D makes it possible to install panda3d via pip again. Fixes panda3d#502
1 parent 173d388 commit 9ff5364

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

makepanda/makepackage.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,10 @@ def MakeInstallerOSX(version, runtime=False, python_versions=[], **kwargs):
531531
if os.path.isdir(outputdir+"/Pmw"):
532532
oscmd("cp -R %s/Pmw dstroot/pythoncode/Developer/Panda3D/Pmw" % outputdir)
533533

534+
# Copy over panda3d.dist-info directory.
535+
if os.path.isdir(outputdir + "/panda3d.dist-info"):
536+
oscmd("cp -R %s/panda3d.dist-info dstroot/pythoncode/Developer/Panda3D/panda3d.dist-info" % (outputdir))
537+
534538
for base in os.listdir(outputdir+"/panda3d"):
535539
if base.endswith('.py'):
536540
libname = "dstroot/pythoncode/Developer/Panda3D/panda3d/" + base
@@ -554,9 +558,12 @@ def MakeInstallerOSX(version, runtime=False, python_versions=[], **kwargs):
554558
oscmd("mkdir -p dstroot/pybindings%s/Library/Python/%s/site-packages" % (pyver, pyver))
555559
WriteFile("dstroot/pybindings%s/Library/Python/%s/site-packages/Panda3D.pth" % (pyver, pyver), "/Developer/Panda3D")
556560

557-
# Copy over panda3d.dist-info directory.
558-
if os.path.isdir(outputdir + "/panda3d.dist-info"):
559-
oscmd("cp -R %s/panda3d.dist-info dstroot/pybindings%s/Library/Python/%s/site-packages/" % (outputdir, pyver, pyver))
561+
# Evidently not all Python 3.7 installations read the above path, so do this for now
562+
# See GitHub #502
563+
if pyver == "3.7":
564+
dir = "dstroot/pybindings%s/Library/Frameworks/Python.framework/Versions/%s/lib/python%s/site-packages" % (pyver, pyver, pyver)
565+
oscmd("mkdir -p %s" % (dir))
566+
WriteFile("%s/Panda3D.pth" % (dir), "/Developer/Panda3D")
560567

561568
if not PkgSkip("FFMPEG"):
562569
oscmd("mkdir -p dstroot/ffmpeg/Developer/Panda3D/lib")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy