mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
Resolve symlinks for sys.executable, so that ppython symlink will always point to the right version on non-windows
This commit is contained in:
parent
95b6c2264f
commit
d6c565860d
@ -102,6 +102,7 @@ def WriteKeysFile(fname, info):
|
||||
def InstallPanda(destdir="", prefix="/usr", outputdir="built"):
|
||||
if (not prefix.startswith("/")): prefix = "/" + prefix
|
||||
PPATH=get_python_lib(1)
|
||||
PEXEC=os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable))
|
||||
oscmd("mkdir -p "+destdir+prefix+"/bin")
|
||||
oscmd("mkdir -p "+destdir+prefix+"/include")
|
||||
oscmd("mkdir -p "+destdir+prefix+"/share/panda3d")
|
||||
@ -138,7 +139,7 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built"):
|
||||
oscmd("echo '"+prefix+"/share/panda3d' > "+destdir+PPATH+"/panda3d.pth")
|
||||
oscmd("echo '"+prefix+libdir+"/panda3d'>> "+destdir+PPATH+"/panda3d.pth")
|
||||
oscmd("chmod +x "+destdir+"/etc/ld.so.conf.d/panda3d.conf")
|
||||
oscmd("ln -s "+sys.executable+" "+destdir+prefix+"/bin/ppython")
|
||||
oscmd("ln -s "+PEXEC+" "+destdir+prefix+"/bin/ppython")
|
||||
oscmd("cp "+outputdir+"/bin/* "+destdir+prefix+"/bin/")
|
||||
for base in os.listdir(outputdir+"/lib"):
|
||||
if (not base.endswith(".a")):
|
||||
|
@ -1362,9 +1362,9 @@ def SdkLocatePython(force_use_sys_executable = False):
|
||||
else:
|
||||
SDK["PYTHON"] = sysconfig.get_python_inc()
|
||||
SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version()
|
||||
SDK["PYTHONEXEC"] = sys.executable
|
||||
SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable))
|
||||
else:
|
||||
SDK["PYTHONEXEC"] = sys.executable
|
||||
SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable))
|
||||
|
||||
def SdkLocateVisualStudio():
|
||||
if (sys.platform != "win32"): return
|
||||
|
Loading…
x
Reference in New Issue
Block a user