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