mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
makepanda: Fix wrong installation path for Python SDK on Debian/Ubuntu
This partially reverts commit 2fcacd1bab1226ea0571c5d925daf6028a862f96. Fixes #1230
This commit is contained in:
parent
ce9d2e38bf
commit
78b67988fb
@ -10,10 +10,12 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import sysconfig
|
||||
from optparse import OptionParser
|
||||
from makepandacore import *
|
||||
|
||||
# DO NOT CHANGE TO sysconfig - see GitHub issue #1230
|
||||
from distutils.sysconfig import get_python_lib
|
||||
|
||||
|
||||
MIME_INFO = (
|
||||
("egg", "model/x-egg", "EGG model file", "pview"),
|
||||
@ -141,7 +143,7 @@ def GetLibDir():
|
||||
|
||||
# If Python is installed into /usr/lib64, it's probably safe
|
||||
# to assume that we should install there as well.
|
||||
python_lib = sysconfig.get_path("platlib")
|
||||
python_lib = get_python_lib(1)
|
||||
if python_lib.startswith('/usr/lib64/') or \
|
||||
python_lib.startswith('/usr/local/lib64/'):
|
||||
return "lib64"
|
||||
|
@ -6,7 +6,6 @@ import shutil
|
||||
import glob
|
||||
import re
|
||||
import subprocess
|
||||
import sysconfig
|
||||
from makepandacore import *
|
||||
from installpanda import *
|
||||
|
||||
@ -909,7 +908,9 @@ def MakeInstallerAndroid(version, **kwargs):
|
||||
shutil.copy(os.path.join(source_dir, base), target)
|
||||
|
||||
# Copy the Python standard library to the .apk as well.
|
||||
stdlib_source = sysconfig.get_path("stdlib")
|
||||
# DO NOT CHANGE TO sysconfig - see #1230
|
||||
from distutils.sysconfig import get_python_lib
|
||||
stdlib_source = get_python_lib(False, True)
|
||||
stdlib_target = os.path.join("apkroot", "lib", "python{0}.{1}".format(*sys.version_info))
|
||||
copy_python_tree(stdlib_source, stdlib_target)
|
||||
|
||||
|
@ -21,7 +21,6 @@ try:
|
||||
import threading
|
||||
import signal
|
||||
import shutil
|
||||
import sysconfig
|
||||
import plistlib
|
||||
import queue
|
||||
except KeyboardInterrupt:
|
||||
|
@ -6,6 +6,7 @@
|
||||
########################################################################
|
||||
|
||||
import configparser
|
||||
from distutils import sysconfig # DO NOT CHANGE to sysconfig - see #1230
|
||||
import fnmatch
|
||||
import getpass
|
||||
import glob
|
||||
@ -17,7 +18,6 @@ import shutil
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
import sysconfig
|
||||
import threading
|
||||
import _thread as thread
|
||||
import time
|
||||
@ -2190,12 +2190,12 @@ def SdkLocatePython(prefer_thirdparty_python=False):
|
||||
LibDirectory("PYTHON", py_fwx + "/lib")
|
||||
|
||||
#elif GetTarget() == 'windows':
|
||||
# SDK["PYTHON"] = os.path.dirname(sysconfig.get_path("include"))
|
||||
# SDK["PYTHON"] = os.path.dirname(sysconfig.get_python_inc())
|
||||
# SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version()
|
||||
# SDK["PYTHONEXEC"] = sys.executable
|
||||
|
||||
else:
|
||||
SDK["PYTHON"] = sysconfig.get_path("include")
|
||||
SDK["PYTHON"] = sysconfig.get_python_inc()
|
||||
SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() + abiflags
|
||||
SDK["PYTHONEXEC"] = os.path.realpath(sys.executable)
|
||||
|
||||
@ -3485,8 +3485,8 @@ def GetCurrentPythonVersionInfo():
|
||||
"soabi": GetPythonABI(),
|
||||
"ext_suffix": GetExtensionSuffix(),
|
||||
"executable": sys.executable,
|
||||
"purelib": sysconfig.get_path("purelib"),
|
||||
"platlib": sysconfig.get_path("platlib"),
|
||||
"purelib": sysconfig.get_python_lib(False),
|
||||
"platlib": sysconfig.get_python_lib(True),
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user