From f1c092da8ba4d03125387a337ab45c9b5a1315dc Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 29 May 2013 10:36:57 +0200 Subject: python3: Port python2 patches to reduce the interpreter size Some of the python2 patches were left behind when doing the python3 package. This was because the python build system can now autodetect what packages can be built in the system. However, some of these patches are actually useful to reduce drastically the size of the interpreter. This patch ports the relevant patches to the python3 package, and adds a new patch to remove the idle3 IDE as well from the interpreter. Fixes #5696 Signed-off-by: Maxime Ripard Signed-off-by: Peter Korsgaard --- ...3-010-distutils-cross-compilation-support.patch | 71 ---------------------- 1 file changed, 71 deletions(-) delete mode 100644 package/python3/python3-3.3-010-distutils-cross-compilation-support.patch (limited to 'package/python3/python3-3.3-010-distutils-cross-compilation-support.patch') diff --git a/package/python3/python3-3.3-010-distutils-cross-compilation-support.patch b/package/python3/python3-3.3-010-distutils-cross-compilation-support.patch deleted file mode 100644 index 0a51400bf5..0000000000 --- a/package/python3/python3-3.3-010-distutils-cross-compilation-support.patch +++ /dev/null @@ -1,71 +0,0 @@ -Add some cross-compilation fixes to distutils - -Inspired by work done by Marc Kleine-Budde in -PTXdist. - -Signed-off-by: Thomas Petazzoni ---- - Lib/distutils/sysconfig.py | 17 +++++++++++++---- - configure.ac | 8 +++++++- - 2 files changed, 20 insertions(+), 5 deletions(-) - -Index: Python-3.3.0/Lib/distutils/sysconfig.py -=================================================================== ---- Python-3.3.0.orig/Lib/distutils/sysconfig.py -+++ Python-3.3.0/Lib/distutils/sysconfig.py -@@ -16,15 +16,24 @@ - from .errors import DistutilsPlatformError - - # These are needed in a couple of spots, so just compute them once. --PREFIX = os.path.normpath(sys.prefix) --EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+EXECUTABLE_DIRNAME = os.path.dirname(os.path.realpath(sys.executable)) -+if os.environ.get('CROSS_COMPILING') == 'yes': -+ _sysroot=os.environ.get('_python_sysroot') -+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) -+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) -+ if '_python_srcdir' in os.environ: -+ EXECUTABLE_DIRNAME = os.path.normpath(os.environ['_python_srcdir']) -+else: -+ PREFIX = os.path.normpath(sys.prefix) -+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+ - BASE_PREFIX = os.path.normpath(sys.base_prefix) - BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) - - # Path to the base directory of the project. On Windows the binary may - # live in project/PCBuild9. If we're dealing with an x64 Windows build, - # it'll live in project/PCbuild/amd64. --project_base = os.path.dirname(os.path.abspath(sys.executable)) -+project_base = EXECUTABLE_DIRNAME - if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) - # PC/VS7.1 -@@ -98,7 +107,7 @@ - # the build directory may not be the source directory, we - # must use "srcdir" from the makefile to find the "Include" - # directory. -- base = _sys_home or os.path.dirname(os.path.abspath(sys.executable)) -+ base = _sys_home or EXECUTABLE_DIRNAME - if plat_specific: - return base - if _sys_home: -Index: Python-3.3.0/configure.ac -=================================================================== ---- Python-3.3.0.orig/configure.ac -+++ Python-3.3.0/configure.ac -@@ -963,7 +963,13 @@ - fi - - if test "$cross_compiling" = yes; then -- RUNSHARED= -+ RUNSHARED=" \ -+ CROSS_COMPILING=yes \ -+ _python_cross_host=${ac_cv_host} \ -+ _python_sysroot=\"\$(sysroot)\" \ -+ _python_srcdir=\"\$(srcdir)\" \ -+ _python_prefix=\"\$(prefix)\" \ -+ _python_exec_prefix=\"\$(exec_prefix)\"" - fi - - AC_MSG_RESULT($LDLIBRARY) -- cgit v1.2.3