aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2015-11-10 23:34:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-01 21:30:56 +0000
commit701ec1977ced1bb08461e6de98b4f63d21cba8a6 (patch)
tree714f6f1f0a829cd52b6e0667b736ce8775be6109 /meta/recipes-devtools/python/python3
parent91165c1b68e49e5d5392068df3412ebb7b0e969b (diff)
downloadopenembedded-core-contrib-701ec1977ced1bb08461e6de98b4f63d21cba8a6.tar.gz
python3: Upgrade from 3.4.3 to 3.5
python3-native_3.4.3.bb -> python3-native_3.5.0.bb: - changed version - changed cheksum - no license change, just dates python3_3.4.3.bb -> python3_3.5.0.bb: - changed version - changed cheksum - no license change, just dates New: - use_packed_importlib.patch: Fixes importlib on cross-compile environments Rebased: - Manifest - 000-cross-compile.patch - 020-dont-compile-python-files.patch - 04-default-is-optimized.patch - python-3.3-multilib.patch - distutils3-base.bbclass - distutils3-native-base.bbclass - python3native.bbclass Upstream: - makerace.patch Misc: - pip2 is handled as default on major distros, modified python3-pip to leave /usr/bin/pip available for pip2 - Fixed importing pip3 from python3 interpreter Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools/python/python3')
-rw-r--r--meta/recipes-devtools/python/python3/000-cross-compile.patch36
-rw-r--r--meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch19
-rw-r--r--meta/recipes-devtools/python/python3/04-default-is-optimized.patch38
-rw-r--r--meta/recipes-devtools/python/python3/makerace.patch28
-rw-r--r--meta/recipes-devtools/python/python3/python-3.3-multilib.patch140
-rw-r--r--meta/recipes-devtools/python/python3/use_packed_importlib.patch31
6 files changed, 141 insertions, 151 deletions
diff --git a/meta/recipes-devtools/python/python3/000-cross-compile.patch b/meta/recipes-devtools/python/python3/000-cross-compile.patch
index 2506a590c0..a3ffe3bea8 100644
--- a/meta/recipes-devtools/python/python3/000-cross-compile.patch
+++ b/meta/recipes-devtools/python/python3/000-cross-compile.patch
@@ -9,9 +9,11 @@ Upstream-Status: Inappropriate[Configuration Specific]
Makefile.pre.in | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -193,6 +193,7 @@ LIBOBJS= @LIBOBJS@
+Index: Python-3.5.0/Makefile.pre.in
+===================================================================
+--- Python-3.5.0.orig/Makefile.pre.in
++++ Python-3.5.0/Makefile.pre.in
+@@ -215,6 +215,7 @@ LIBOBJS= @LIBOBJS@
PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
@@ -19,7 +21,7 @@ Upstream-Status: Inappropriate[Configuration Specific]
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
-@@ -239,6 +240,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
+@@ -272,6 +273,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN= Parser/pgen$(EXE)
@@ -27,7 +29,7 @@ Upstream-Status: Inappropriate[Configuration Specific]
PSRCS= \
Parser/acceler.c \
-@@ -451,7 +453,7 @@ build_all_generate_profile:
+@@ -494,7 +496,7 @@ build_all_generate_profile:
run_profile_task:
: # FIXME: can't run for a cross build
@@ -35,17 +37,17 @@ Upstream-Status: Inappropriate[Configuration Specific]
+ $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK)
build_all_use_profile:
- $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use -fprofile-correction"
-@@ -640,7 +642,7 @@ $(IO_OBJS): $(IO_H)
- $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
+ $(MAKE) all CFLAGS_NODIST="$(CFLAGS) -fprofile-use -fprofile-correction"
+@@ -764,7 +766,7 @@ $(IO_OBJS): $(IO_H)
+
+ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
@$(MKDIR_P) Include
- $(MAKE) $(PGEN)
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
- $(MAKE) $(GRAMMAR_H)
+ $(GRAMMAR_C): $(GRAMMAR_H)
touch $(GRAMMAR_C)
-@@ -820,7 +822,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
+
+@@ -953,7 +955,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/pyth
######################################################################
TESTOPTS= $(EXTRATESTOPTS)
@@ -54,7 +56,7 @@ Upstream-Status: Inappropriate[Configuration Specific]
TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
TESTTIMEOUT= 3600
-@@ -1229,7 +1231,7 @@ frameworkinstallstructure: $(LDLIBRARY)
+@@ -1440,7 +1442,7 @@ frameworkinstallstructure: $(LDLIBRARY)
fi; \
done
$(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
@@ -63,7 +65,7 @@ Upstream-Status: Inappropriate[Configuration Specific]
$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1288,7 +1290,7 @@ config.status: $(srcdir)/configure
+@@ -1506,7 +1508,7 @@ config.status: $(srcdir)/configure
# Run reindent on the library
reindent:
@@ -72,12 +74,12 @@ Upstream-Status: Inappropriate[Configuration Specific]
# Rerun configure with the same options as it was run last time,
# provided the config.status script exists
-@@ -1414,7 +1416,7 @@ funny:
+@@ -1639,7 +1641,7 @@ funny:
# Perform some verification checks on any modified files.
- patchcheck:
+ patchcheck: all
- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-+ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
++ $(RUNSHARED) ./$(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
# Dependencies
diff --git a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
index 03ef286941..819ba69eda 100644
--- a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
+++ b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
@@ -8,9 +8,11 @@ Upstream-Status: Inappropriate[Embedded-Specific]
Makefile.pre.in | 16 ----------------
1 file changed, 16 deletions(-)
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1078,24 +1078,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL
+Index: Python-3.5.0/Makefile.pre.in
+===================================================================
+--- Python-3.5.0.orig/Makefile.pre.in
++++ Python-3.5.0/Makefile.pre.in
+@@ -1262,33 +1262,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
fi
@@ -24,7 +26,12 @@ Upstream-Status: Inappropriate[Embedded-Specific]
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- $(DESTDIR)$(LIBDEST)
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST) -f \
+- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+- $(DESTDIR)$(LIBDEST)
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
@@ -32,6 +39,10 @@ Upstream-Status: Inappropriate[Embedded-Specific]
- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST)/site-packages -f \
+- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
diff --git a/meta/recipes-devtools/python/python3/04-default-is-optimized.patch b/meta/recipes-devtools/python/python3/04-default-is-optimized.patch
index 3b8f264a58..4b8a7e56bc 100644
--- a/meta/recipes-devtools/python/python3/04-default-is-optimized.patch
+++ b/meta/recipes-devtools/python/python3/04-default-is-optimized.patch
@@ -12,24 +12,11 @@ Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
Rebased for 3.4.2 02/2015
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-Index: Python-3.4.2/Python/compile.c
+Index: Python-3.5.0/Modules/main.c
===================================================================
---- Python-3.4.2.orig/Python/compile.c
-+++ Python-3.4.2/Python/compile.c
-@@ -30,7 +30,7 @@
- #include "symtable.h"
- #include "opcode.h"
-
--int Py_OptimizeFlag = 0;
-+int Py_OptimizeFlag = 1;
-
- #define DEFAULT_BLOCK_SIZE 16
- #define DEFAULT_BLOCKS 8
-Index: Python-3.4.2/Modules/main.c
-===================================================================
---- Python-3.4.2.orig/Modules/main.c
-+++ Python-3.4.2/Modules/main.c
-@@ -38,7 +38,7 @@ static wchar_t **orig_argv;
+--- Python-3.5.0.orig/Modules/main.c
++++ Python-3.5.0/Modules/main.c
+@@ -37,7 +37,7 @@ static wchar_t **orig_argv;
static int orig_argc;
/* command line options */
@@ -38,7 +25,7 @@ Index: Python-3.4.2/Modules/main.c
#define PROGRAM_OPTS BASE_OPTS
-@@ -64,6 +64,7 @@ static char *usage_2 = "\
+@@ -63,6 +63,7 @@ static char *usage_2 = "\
-m mod : run library module as a script (terminates option list)\n\
-O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\
-OO : remove doc-strings in addition to the -O optimizations\n\
@@ -46,7 +33,7 @@ Index: Python-3.4.2/Modules/main.c
-q : don't print version and copyright messages on interactive startup\n\
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
-S : don't imply 'import site' on initialization\n\
-@@ -418,8 +419,8 @@ Py_Main(int argc, wchar_t **argv)
+@@ -419,8 +420,8 @@ Py_Main(int argc, wchar_t **argv)
/* case 'J': reserved for Jython */
@@ -57,3 +44,16 @@ Index: Python-3.4.2/Modules/main.c
break;
case 'B':
+Index: Python-3.5.0/Python/pylifecycle.c
+===================================================================
+--- Python-3.5.0.orig/Python/pylifecycle.c
++++ Python-3.5.0/Python/pylifecycle.c
+@@ -80,7 +80,7 @@ int Py_VerboseFlag; /* Needed by import.
+ int Py_QuietFlag; /* Needed by sysmodule.c */
+ int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
+ int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */
+-int Py_OptimizeFlag = 0; /* Needed by compile.c */
++int Py_OptimizeFlag = 1; /* Needed by compile.c */
+ int Py_NoSiteFlag; /* Suppress 'import site' */
+ int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
+ int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch
deleted file mode 100644
index d8a68923a8..0000000000
--- a/meta/recipes-devtools/python/python3/makerace.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-There is a race due to the execution of make inside the makefile:
-
-| gcc -pthread -c -Wno-unused-result -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -IInclude -I./Include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -fPIC -DPy_BUILD_CORE -o Objects/obmalloc.o Objects/obmalloc.c
-| gcc -pthread -c -Wno-unused-result -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -IInclude -I./Include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -fPIC -DPy_BUILD_CORE -o Parser/pgen.o Parser/pgen.c| gcc -pthread -c -Wno-unused-result -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -IInclude -I./Include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -fPIC -DPy_BUILD_CORE -o Objects/obmalloc.o Objects/obmalloc.c
-| gcc -pthread -c -Wno-unused-result -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -IInclude -I./Include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -fPIC -DPy_BUILD_CORE -o Objects/obmalloc.o Objects/obmalloc.c
-| Objects/obmalloc.o: file not recognized: File truncated
-| collect2: error: ld returned 1 exit status
-| make[1]: *** [Parser/pgen] Error 1
-
-The easiest way to avoid this is to list the dependencies explictly.
-
-RP 28/2/2014
-
-Upstream-Status: Pending
-
-Index: Python-3.3.3/Makefile.pre.in
-===================================================================
---- Python-3.3.3.orig/Makefile.pre.in 2014-02-27 14:04:38.268339533 +0000
-+++ Python-3.3.3/Makefile.pre.in 2014-02-28 10:40:59.166361125 +0000
-@@ -676,7 +676,7 @@
-
- $(IO_OBJS): $(IO_H)
-
--$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
-+$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) $(PGEN)
- @$(MKDIR_P) Include
- $(MAKE) $(PGEN)
- $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
diff --git a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
index b3e986089e..44ec424cd2 100644
--- a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -7,23 +7,24 @@ get the sys.lib from python itself and do not use hardcoded value of 'lib'
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-Index: Python-3.4.2/Include/pythonrun.h
+Index: Python-3.5.0/Include/pythonrun.h
===================================================================
---- Python-3.4.2.orig/Include/pythonrun.h
-+++ Python-3.4.2/Include/pythonrun.h
-@@ -220,6 +220,8 @@ int _Py_CheckPython3();
- /* In their own files */
- PyAPI_FUNC(const char *) Py_GetVersion(void);
- PyAPI_FUNC(const char *) Py_GetPlatform(void);
+--- Python-3.5.0.orig/Include/pythonrun.h
++++ Python-3.5.0/Include/pythonrun.h
+@@ -23,6 +23,9 @@ typedef struct {
+ } PyCompilerFlags;
+ #endif
+
+PyAPI_FUNC(const char *) Py_GetArch(void);
+PyAPI_FUNC(const char *) Py_GetLib(void);
- PyAPI_FUNC(const char *) Py_GetCopyright(void);
- PyAPI_FUNC(const char *) Py_GetCompiler(void);
- PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-3.4.2/Lib/distutils/command/install.py
++
+ #ifndef Py_LIMITED_API
+ PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
+ PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
+Index: Python-3.5.0/Lib/distutils/command/install.py
===================================================================
---- Python-3.4.2.orig/Lib/distutils/command/install.py
-+++ Python-3.4.2/Lib/distutils/command/install.py
+--- Python-3.5.0.orig/Lib/distutils/command/install.py
++++ Python-3.5.0/Lib/distutils/command/install.py
@@ -19,6 +19,8 @@ from site import USER_BASE
from site import USER_SITE
HAS_USER_SITE = True
@@ -42,11 +43,11 @@ Index: Python-3.4.2/Lib/distutils/command/install.py
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-3.4.2/Lib/pydoc.py
+Index: Python-3.5.0/Lib/pydoc.py
===================================================================
---- Python-3.4.2.orig/Lib/pydoc.py
-+++ Python-3.4.2/Lib/pydoc.py
-@@ -394,7 +394,7 @@ class Doc:
+--- Python-3.5.0.orig/Lib/pydoc.py
++++ Python-3.5.0/Lib/pydoc.py
+@@ -393,7 +393,7 @@ class Doc:
docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)
@@ -55,11 +56,11 @@ Index: Python-3.4.2/Lib/pydoc.py
"python%d.%d" % sys.version_info[:2])
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
-Index: Python-3.4.2/Lib/trace.py
+Index: Python-3.5.0/Lib/trace.py
===================================================================
---- Python-3.4.2.orig/Lib/trace.py
-+++ Python-3.4.2/Lib/trace.py
-@@ -751,10 +751,10 @@ def main(argv=None):
+--- Python-3.5.0.orig/Lib/trace.py
++++ Python-3.5.0/Lib/trace.py
+@@ -749,10 +749,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
s = s.replace("$prefix",
@@ -72,10 +73,10 @@ Index: Python-3.4.2/Lib/trace.py
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-3.4.2/Makefile.pre.in
+Index: Python-3.5.0/Makefile.pre.in
===================================================================
---- Python-3.4.2.orig/Makefile.pre.in
-+++ Python-3.4.2/Makefile.pre.in
+--- Python-3.5.0.orig/Makefile.pre.in
++++ Python-3.5.0/Makefile.pre.in
@@ -101,6 +101,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS
# Machine-dependent subdirectories
@@ -94,15 +95,15 @@ Index: Python-3.4.2/Makefile.pre.in
ABIFLAGS= @ABIFLAGS@
# Detailed destination directories
-@@ -712,6 +714,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -729,6 +731,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
+ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \
-o $@ $(srcdir)/Modules/getpath.c
- Modules/python.o: $(srcdir)/Modules/python.c
-@@ -780,7 +783,7 @@ $(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN
+ Programs/python.o: $(srcdir)/Programs/python.c
+@@ -798,7 +801,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(O
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -111,10 +112,10 @@ Index: Python-3.4.2/Makefile.pre.in
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-3.4.2/Modules/getpath.c
+Index: Python-3.5.0/Modules/getpath.c
===================================================================
---- Python-3.4.2.orig/Modules/getpath.c
-+++ Python-3.4.2/Modules/getpath.c
+--- Python-3.5.0.orig/Modules/getpath.c
++++ Python-3.5.0/Modules/getpath.c
@@ -117,9 +117,11 @@
#define EXEC_PREFIX PREFIX
#endif
@@ -135,12 +136,12 @@ Index: Python-3.4.2/Modules/getpath.c
static wchar_t *module_search_path = NULL;
+static wchar_t *lib_python = L"" LIB_PYTHON;
- static void
- reduce(wchar_t *dir)
-Index: Python-3.4.2/Python/getplatform.c
+ /* Get file status. Encode the path to the locale encoding. */
+
+Index: Python-3.5.0/Python/getplatform.c
===================================================================
---- Python-3.4.2.orig/Python/getplatform.c
-+++ Python-3.4.2/Python/getplatform.c
+--- Python-3.5.0.orig/Python/getplatform.c
++++ Python-3.5.0/Python/getplatform.c
@@ -10,3 +10,23 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -165,11 +166,11 @@ Index: Python-3.4.2/Python/getplatform.c
+{
+ return LIB;
+}
-Index: Python-3.4.2/Python/sysmodule.c
+Index: Python-3.5.0/Python/sysmodule.c
===================================================================
---- Python-3.4.2.orig/Python/sysmodule.c
-+++ Python-3.4.2/Python/sysmodule.c
-@@ -1697,6 +1697,10 @@ _PySys_Init(void)
+--- Python-3.5.0.orig/Python/sysmodule.c
++++ Python-3.5.0/Python/sysmodule.c
+@@ -1767,6 +1767,10 @@ _PySys_Init(void)
PyUnicode_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
PyUnicode_FromString(Py_GetPlatform()));
@@ -180,11 +181,11 @@ Index: Python-3.4.2/Python/sysmodule.c
SET_SYS_FROM_STRING("executable",
PyUnicode_FromWideChar(
Py_GetProgramFullPath(), -1));
-Index: Python-3.4.2/setup.py
+Index: Python-3.5.0/setup.py
===================================================================
---- Python-3.4.2.orig/setup.py
-+++ Python-3.4.2/setup.py
-@@ -454,7 +454,7 @@ class PyBuildExt(build_ext):
+--- Python-3.5.0.orig/setup.py
++++ Python-3.5.0/setup.py
+@@ -472,7 +472,7 @@ class PyBuildExt(build_ext):
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
if not cross_compiling:
@@ -193,7 +194,7 @@ Index: Python-3.4.2/setup.py
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia
if cross_compiling:
-@@ -512,8 +512,7 @@ class PyBuildExt(build_ext):
+@@ -530,8 +530,7 @@ class PyBuildExt(build_ext):
# be assumed that no additional -I,-L directives are needed.
if not cross_compiling:
lib_dirs = self.compiler.library_dirs + [
@@ -203,7 +204,7 @@ Index: Python-3.4.2/setup.py
]
inc_dirs = self.compiler.include_dirs + ['/usr/include']
else:
-@@ -696,11 +695,11 @@ class PyBuildExt(build_ext):
+@@ -716,11 +715,11 @@ class PyBuildExt(build_ext):
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
@@ -217,10 +218,10 @@ Index: Python-3.4.2/setup.py
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
-Index: Python-3.4.2/Lib/sysconfig.py
+Index: Python-3.5.0/Lib/sysconfig.py
===================================================================
---- Python-3.4.2.orig/Lib/sysconfig.py
-+++ Python-3.4.2/Lib/sysconfig.py
+--- Python-3.5.0.orig/Lib/sysconfig.py
++++ Python-3.5.0/Lib/sysconfig.py
@@ -20,10 +20,10 @@ __all__ = [
_INSTALL_SCHEMES = {
@@ -263,13 +264,13 @@ Index: Python-3.4.2/Lib/sysconfig.py
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data': '{userbase}',
-Index: Python-3.4.2/configure.ac
+Index: Python-3.5.0/configure.ac
===================================================================
---- Python-3.4.2.orig/configure.ac
-+++ Python-3.4.2/configure.ac
-@@ -791,6 +791,41 @@ esac
- MULTIARCH=$($CC --print-multiarch 2>/dev/null)
- AC_SUBST(MULTIARCH)
+--- Python-3.5.0.orig/configure.ac
++++ Python-3.5.0/configure.ac
+@@ -858,6 +858,41 @@ PLATDIR=plat-$MACHDEP
+ AC_SUBST(PLATDIR)
+ AC_SUBST(PLATFORM_TRIPLET)
+AC_SUBST(ARCH)
+AC_MSG_CHECKING(ARCH)
@@ -307,32 +308,5 @@ Index: Python-3.4.2/configure.ac
+esac
+AC_MSG_RESULT($LIB)
- AC_SUBST(LIBRARY)
- AC_MSG_CHECKING(LIBRARY)
-Index: Python-3.4.2/Lib/site.py
-===================================================================
---- Python-3.4.2.orig/Lib/site.py
-+++ Python-3.4.2/Lib/site.py
-@@ -304,13 +304,19 @@ def getsitepackages(prefixes=None):
- seen.add(prefix)
-
- if os.sep == '/':
-- sitepackages.append(os.path.join(prefix, "lib",
-+ sitepackages.append(os.path.join(prefix, sys.lib,
- "python" + sys.version[:3],
- "site-packages"))
-- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-+ if sys.lib != "lib":
-+ sitepackages.append(os.path.join(prefix, "lib",
-+ "python" + sys.version[:3],
-+ "site-packages"))
-+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
-+ if sys.lib != "lib":
-+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
- else:
- sitepackages.append(prefix)
-- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
-+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
- if sys.platform == "darwin":
- # for framework builds *only* we add the standard Apple
- # locations.
+ AC_MSG_CHECKING([for -Wl,--no-as-needed])
+ save_LDFLAGS="$LDFLAGS"
diff --git a/meta/recipes-devtools/python/python3/use_packed_importlib.patch b/meta/recipes-devtools/python/python3/use_packed_importlib.patch
new file mode 100644
index 0000000000..6c4b0cda9e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/use_packed_importlib.patch
@@ -0,0 +1,31 @@
+
+Upstream-Status: Inappropriate [embedded specific]
+
+The binary _freeze_importlib is built and also used during build time to generate
+importlib*.h files, this is impossible to do on a cross-compile environment,
+this avoids executing the binary and forces it to use the packed importlib*.h files.
+
+
+Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+
+Index: Python-3.5.0/Makefile.pre.in
+===================================================================
+--- Python-3.5.0.orig/Makefile.pre.in
++++ Python-3.5.0/Makefile.pre.in
+@@ -700,12 +700,12 @@ Programs/_freeze_importlib.o: Programs/_
+ Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
+ $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+
+-Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
+- ./Programs/_freeze_importlib \
++#Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
++# ./Programs/_freeze_importlib \
+ $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h
+
+-Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
+- ./Programs/_freeze_importlib \
++#Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
++# ./Programs/_freeze_importlib \
+ $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
+
+