Bump buidlroot version to 2018.02.6

This commit is contained in:
jbnadal
2018-10-22 14:55:59 +02:00
parent 222960cedb
commit bec94fdb63
6150 changed files with 84803 additions and 117446 deletions

View File

@@ -1,22 +1,24 @@
From 28f81597314ea3ed03935b519453a55cf6c3c20d Mon Sep 17 00:00:00 2001
From e568f4deb7c648e3265154574db753601636cdda Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:29:35 +0100
Date: Wed, 22 Feb 2017 16:21:31 -0800
Subject: [PATCH] Make the build of pyc files conditional
This commit adds a new configure option --disable-pyc-build to disable
the compilation of pyc.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[ Andrey Smrinov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Makefile.pre.in | 2 ++
configure.ac | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 4d2a061..272f312 100644
index 82e830727e..b38bd79121 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1283,6 +1283,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@@ -1311,6 +1311,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
fi
@@ -24,7 +26,7 @@ index 4d2a061..272f312 100644
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
@@ -1310,6 +1311,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@@ -1338,6 +1339,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c
$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
@@ -33,10 +35,10 @@ index 4d2a061..272f312 100644
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
diff --git a/configure.ac b/configure.ac
index 76b70a0..66d4642 100644
index 962006704f..a76b5444df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1056,6 +1056,12 @@ fi
@@ -1113,6 +1113,12 @@ fi
AC_MSG_CHECKING(LDLIBRARY)
@@ -50,5 +52,5 @@ index 76b70a0..66d4642 100644
# library that we build, but we do not want to link against it (we
# will find it with a -framework option). For this reason there is an
--
2.6.4
2.13.5

View File

@@ -1,46 +0,0 @@
From d6093bad6c700312ff7ff4a7bb15c815dda6f46b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:28:34 +0100
Subject: [PATCH] setup.py: do not add invalid header locations
This piece of code incorrectly adds /usr/include to
self.compiler.include_dirs, and results in the following invalid
compilation line:
/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc
-fPIC -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -pipe -Os
-I./Include -I/usr/include -I. -IInclude
-I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include
-I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Include
-I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1
-c /home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.c
-o build/temp.linux-arm-3.4/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.o
cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
The -I/usr/include is wrong when cross compiling, so we disable adding
INCLUDEDIR and LIBDIR from the host when cross compiling.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index da67731..dbd2a3c 100644
--- a/setup.py
+++ b/setup.py
@@ -511,7 +511,8 @@ class PyBuildExt(build_ext):
add_dir_to_list(dir_list, directory)
if os.path.normpath(sys.base_prefix) != '/usr' \
- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
+ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
+ and not cross_compiling:
# OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
# (PYTHONFRAMEWORK is set) to avoid # linking problems when
# building a framework with different architectures than
--
2.6.4

View File

@@ -1,86 +0,0 @@
From 4ac038d30ec71b3f223ac7c91613856dd82b6347 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:29:04 +0100
Subject: [PATCH] Change the install location of _sysconfigdata.py
The _sysconfigdata.py module contains definitions that are needed when
building Python modules. In cross-compilation mode, when building
Python extensions for the target, we need to use the _sysconfigdata.py
of the target Python while executing the host Python.
However until now, the _sysconfigdata.py module was installed in
build/lib.<arch>-<version> directory, together with a number of
architecture-specific shared objects, which cannot be used with the
host Python.
To solve this problem, this patch moves _sysconfigdata.py to a
separate location, build/sysconfigdata.<arch>-<version>/, and only
this directory gets added to the PYTHONPATH of the host Python
interpreter when building Python modules for the target.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Makefile.pre.in | 12 ++++++++++--
configure.ac | 2 +-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 823def3..4d2a061 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -585,6 +585,9 @@ pybuilddir.txt: $(BUILDPYTHON)
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
+ echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt
+ mkdir -p `cat pysysconfigdatadir.txt`
+ cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt`
# Build the shared modules
# Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
@@ -1235,7 +1238,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
else true; \
fi; \
done
- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \
+ @for i in $(srcdir)/Lib/*.py ; \
do \
if test -x $$i; then \
$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
@@ -1245,6 +1248,11 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
echo $(INSTALL_DATA) $$i $(LIBDEST); \
fi; \
done
+ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
+ $(DESTDIR)$(LIBDEST)
+ mkdir -p $(DESTDIR)$(LIBDEST)/sysconfigdata
+ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
+ $(DESTDIR)$(LIBDEST)/sysconfigdata
@for d in $(LIBSUBDIRS); \
do \
a=$(srcdir)/Lib/$$d; \
@@ -1580,7 +1588,7 @@ clean: pycremoval
find build -name 'fficonfig.h' -exec rm -f {} ';' || true
find build -name '*.py' -exec rm -f {} ';' || true
find build -name '*.py[co]' -exec rm -f {} ';' || true
- -rm -f pybuilddir.txt
+ -rm -f pybuilddir.txt pysysconfigdatadir.txt
-rm -f Lib/lib2to3/*Grammar*.pickle
-rm -f Programs/_testembed Programs/_freeze_importlib
-rm -rf build
diff --git a/configure.ac b/configure.ac
index 694293e..76b70a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,7 @@ if test "$cross_compiling" = yes; then
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi
AC_MSG_RESULT($interp)
- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pysysconfigdatadir.txt && echo $(abs_builddir)/`cat pysysconfigdatadir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
fi
elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
--
2.6.4

View File

@@ -1,4 +1,4 @@
From 093caf46b7a742ee2f7bcf617a915ac1653aa8ac Mon Sep 17 00:00:00 2001
From 8ec1677d16bef6d6ee5cee4ff004dfa3d0428e88 Mon Sep 17 00:00:00 2001
From: Vanya Sergeev <vsergeev@gmail.com>
Date: Wed, 23 Dec 2015 11:30:33 +0100
Subject: [PATCH] Disable buggy_getaddrinfo configure test when cross-compiling
@@ -10,10 +10,10 @@ Signed-off-by: Vanya Sergeev <vsergeev@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 66d4642..c492594 100644
index a76b5444df..5f87c4db5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3662,7 +3662,7 @@ fi
@@ -3939,7 +3939,7 @@ fi
AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
@@ -23,5 +23,5 @@ index 66d4642..c492594 100644
if test $ipv6 = yes
then
--
2.6.4
2.13.5

View File

@@ -1,6 +1,6 @@
From 3a9f4aa255909ed152883eee787313efd20dbc58 Mon Sep 17 00:00:00 2001
From 2c2afc80831c518e5daf3df6c9e4c4ac0a7be001 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:31:08 +0100
Date: Wed, 22 Feb 2017 16:33:22 -0800
Subject: [PATCH] Add infrastructure to disable the build of certain extensions
Some of the extensions part of the Python core have dependencies on
@@ -35,17 +35,19 @@ then extended by Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Makefile.pre.in | 6 +++++-
configure.ac | 2 ++
setup.py | 5 ++++-
3 files changed, 11 insertions(+), 2 deletions(-)
setup.py | 6 +++++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 272f312..9420860 100644
index b38bd79121..4ce917ab8d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -182,6 +182,8 @@ FILEMODE= 644
@@ -190,6 +190,8 @@ FILEMODE= 644
# configure script arguments
CONFIG_ARGS= @CONFIG_ARGS@
@@ -54,15 +56,15 @@ index 272f312..9420860 100644
# Subdirectories with code
SRCDIRS= @SRCDIRS@
@@ -600,6 +602,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt
@@ -575,6 +577,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
esac; \
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
# Build static library
@@ -1425,7 +1428,8 @@ libainstall: all python-config
@@ -1436,7 +1439,8 @@ libainstall: @DEF_MAKE_RULE@ python-config
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: sharedmods
@@ -73,10 +75,10 @@ index 272f312..9420860 100644
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
diff --git a/configure.ac b/configure.ac
index c492594..bfb599e 100644
index 5f87c4db5a..d5ee2aedfb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2588,6 +2588,8 @@ LIBS="$withval $LIBS"
@@ -2810,6 +2810,8 @@ LIBS="$withval $LIBS"
PKG_PROG_PKG_CONFIG
@@ -86,10 +88,10 @@ index c492594..bfb599e 100644
AC_MSG_CHECKING(for --with-system-expat)
AC_ARG_WITH(system_expat,
diff --git a/setup.py b/setup.py
index dbd2a3c..1ebfa50 100644
index fe477974bd..86643ae8bf 100644
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,10 @@ host_platform = get_platform()
@@ -43,7 +43,11 @@ host_platform = get_platform()
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
@@ -98,9 +100,10 @@ index dbd2a3c..1ebfa50 100644
+ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
+except KeyError:
+ disabled_module_list = list()
+
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (after any relative
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From e634929f76a45f5b683dc19bc01efed2ab83e19e Mon Sep 17 00:00:00 2001
From e359a7a3c4f9e70360a068bef19c95938fdacede Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:33:14 +0100
Subject: [PATCH] Adjust library/header paths for cross-compilation
@@ -21,10 +21,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index d4cb11e..e7a0ba9 100644
index 74de782d8a..d0c847b365 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -232,7 +232,10 @@ class build_ext(Command):
@@ -233,7 +233,10 @@ class build_ext(Command):
if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
if not sysconfig.python_build:
# building third party extensions
@@ -37,7 +37,7 @@ index d4cb11e..e7a0ba9 100644
# building python standard extensions
self.library_dirs.append('.')
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 721edec..d20e2d8 100644
index 2bcd1dd288..422c13fa4f 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -17,10 +17,17 @@ import sys
@@ -63,5 +63,5 @@ index 721edec..d20e2d8 100644
# Path to the base directory of the project. On Windows the binary may
# live in project/PCBuild/win32 or project/PCBuild/amd64.
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From d7c568632f7cb83346096ea114a06f89a0b488d6 Mon Sep 17 00:00:00 2001
From 01b588baf835ec95df7c5696eff1f6c07eaa1108 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:36:00 +0100
Subject: [PATCH] Don't look in /usr/lib/termcap for libraries
@@ -9,10 +9,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/setup.py b/setup.py
index 1ebfa50..24a7153 100644
index 86643ae8bf..cd00fbdbda 100644
--- a/setup.py
+++ b/setup.py
@@ -753,12 +753,9 @@ class PyBuildExt(build_ext):
@@ -786,12 +786,9 @@ class PyBuildExt(build_ext):
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
readline_libs.append(curses_library)
@@ -27,5 +27,5 @@ index 1ebfa50..24a7153 100644
libraries=readline_libs) )
else:
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From bac5ac529cc0902a340a5cd03308433c6e80d1f6 Mon Sep 17 00:00:00 2001
From 9055171433d5f6beae90815e8c075dc1e0938936 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:36:27 +0100
Subject: [PATCH] Don't add multiarch paths
@@ -17,10 +17,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 24a7153..8380a64 100644
index cd00fbdbda..c956fa08d1 100644
--- a/setup.py
+++ b/setup.py
@@ -474,10 +474,10 @@ class PyBuildExt(build_ext):
@@ -497,10 +497,10 @@ class PyBuildExt(build_ext):
if not cross_compiling:
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
@@ -33,5 +33,5 @@ index 24a7153..8380a64 100644
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
--
2.6.4
2.13.5

View File

@@ -1,65 +0,0 @@
From 7c560d917ee0e536c76fac275d1cb0b6136269ab Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:32:23 +0100
Subject: [PATCH] distutils/sysconfig: use sysconfigdata
In order to make the use of sysconfig cross-compilation compatible,
use _sysconfigdata.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Lib/distutils/sysconfig.py | 37 ++++---------------------------------
1 file changed, 4 insertions(+), 33 deletions(-)
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 573724d..721edec 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -414,40 +414,11 @@ def expand_makefile_vars(s, vars):
_config_vars = None
def _init_posix():
- """Initialize the module as appropriate for POSIX systems."""
- g = {}
- # load the installed Makefile:
- try:
- filename = get_makefile_filename()
- parse_makefile(filename, g)
- except OSError as msg:
- my_msg = "invalid Python installation: unable to open %s" % filename
- if hasattr(msg, "strerror"):
- my_msg = my_msg + " (%s)" % msg.strerror
-
- raise DistutilsPlatformError(my_msg)
-
- # load the installed pyconfig.h:
- try:
- filename = get_config_h_filename()
- with open(filename) as file:
- parse_config_h(file, g)
- except OSError as msg:
- my_msg = "invalid Python installation: unable to open %s" % filename
- if hasattr(msg, "strerror"):
- my_msg = my_msg + " (%s)" % msg.strerror
-
- raise DistutilsPlatformError(my_msg)
-
- # On AIX, there are wrong paths to the linker scripts in the Makefile
- # -- these paths are relative to the Python source, but when installed
- # the scripts are in another directory.
- if python_build:
- g['LDSHARED'] = g['BLDSHARED']
-
+ # _sysconfigdata is generated at build time, see the sysconfig module
+ from _sysconfigdata import build_time_vars
global _config_vars
- _config_vars = g
-
+ _config_vars = {}
+ _config_vars.update(build_time_vars)
def _init_nt():
"""Initialize the module as appropriate for NT"""
--
2.6.4

View File

@@ -1,4 +1,4 @@
From 86ef08e36597e14cac06aef176f12375a27fdef5 Mon Sep 17 00:00:00 2001
From 63ab4a20076740bd39985c7dee3d6231cdc74c75 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:43:24 +0100
Subject: [PATCH] Abort on failed module build
@@ -14,10 +14,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 1 insertion(+)
diff --git a/setup.py b/setup.py
index 8380a64..15b39f5 100644
index c956fa08d1..b3add2be76 100644
--- a/setup.py
+++ b/setup.py
@@ -296,6 +296,7 @@ class PyBuildExt(build_ext):
@@ -312,6 +312,7 @@ class PyBuildExt(build_ext):
print("Failed to build these modules:")
print_three_column(failed)
print()
@@ -26,5 +26,5 @@ index 8380a64..15b39f5 100644
if self.failed_on_import:
failed = self.failed_on_import[:]
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From ace3ebd517ea0ac42208b6a06c7e8f82da3b9c1b Mon Sep 17 00:00:00 2001
From 20767cb868ff271f4501a6e023f367400882d75e Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch@tkos.co.il>
Date: Wed, 23 Dec 2015 11:44:02 +0100
Subject: [PATCH] Serial ioctl() workaround
@@ -15,7 +15,7 @@ Signed-off-by: Baruch Siach <baruch@tkos.co.il>
1 file changed, 2 insertions(+)
diff --git a/Modules/termios.c b/Modules/termios.c
index b78d33e..58b0444 100644
index b78d33e688..58b0444565 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -9,7 +9,9 @@
@@ -29,5 +29,5 @@ index b78d33e..58b0444 100644
/* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
* MDTR, MRI, and MRTS (appearantly used internally by some things
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From 45f482813de828415906e6a416c9c35450c38da7 Mon Sep 17 00:00:00 2001
From 8869b15c754ae615203b65a99e043f56770bacd5 Mon Sep 17 00:00:00 2001
From: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Date: Wed, 23 Dec 2015 11:44:30 +0100
Subject: [PATCH] Do not adjust the shebang of Python scripts for
@@ -18,7 +18,7 @@ Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py
index 90a8380..bdf4cf1 100644
index ccc70e6465..d6d54195c1 100644
--- a/Lib/distutils/command/build_scripts.py
+++ b/Lib/distutils/command/build_scripts.py
@@ -91,7 +91,7 @@ class build_scripts(Command):
@@ -31,5 +31,5 @@ index 90a8380..bdf4cf1 100644
self.build_dir)
updated_files.append(outfile)
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From 5858abdc25acd522869103d64b60a0c9687e2ec1 Mon Sep 17 00:00:00 2001
From da3880edac19100f69891f225cc2f07a82be1e52 Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Thu, 20 Nov 2014 13:24:59 +0100
Subject: [PATCH] Misc/python-config.sh.in: ensure sed invocations only match
@@ -25,7 +25,7 @@ Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
index 30c6927..f905a71 100644
index 30c6927871..f905a7132f 100644
--- a/Misc/python-config.sh.in
+++ b/Misc/python-config.sh.in
@@ -29,12 +29,12 @@ prefix_real=$(installed_prefix "$0")
@@ -56,5 +56,5 @@ index 30c6927..f905a71 100644
PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From 46fda6fc83500bf5663397f9d28b618e6b6b20c1 Mon Sep 17 00:00:00 2001
From 660ea434ad8f921db74c0e3f93aa3ff5daac44f3 Mon Sep 17 00:00:00 2001
From: Samuel Cabrero <samuelcabrero@gmail.com>
Date: Wed, 23 Dec 2015 11:45:48 +0100
Subject: [PATCH] Override system locale and set to default when adding gcc
@@ -20,10 +20,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 9e08e7e..3feca04 100644
index b3add2be76..29bfd174d2 100644
--- a/setup.py
+++ b/setup.py
@@ -441,7 +441,7 @@ class PyBuildExt(build_ext):
@@ -457,7 +457,7 @@ class PyBuildExt(build_ext):
tmpfile = os.path.join(self.build_temp, 'gccpaths')
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
@@ -33,5 +33,5 @@ index 9e08e7e..3feca04 100644
in_incdirs = False
inc_dirs = []
--
2.6.4
2.13.5

View File

@@ -1,6 +1,6 @@
From d2b5be9a0627e38d2280ef865dab3e74b7d2bde4 Mon Sep 17 00:00:00 2001
From 9db508467be41bc35f06c0076c855b99a1519d24 Mon Sep 17 00:00:00 2001
From: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Date: Wed, 23 Dec 2015 11:46:14 +0100
Date: Wed, 22 Feb 2017 16:48:49 -0800
Subject: [PATCH] Add importlib fix for PEP 3147 issue
Python 3 has a new standard for installing .pyc file, called PEP
@@ -18,15 +18,17 @@ This effectively disables PEP 3147 for:
* Packages built with automake that use the `py-compile` helper
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Lib/importlib/_bootstrap_external.py | 37 +++++-------------------------------
1 file changed, 5 insertions(+), 32 deletions(-)
Lib/importlib/_bootstrap_external.py | 38 +++++-------------------------------
1 file changed, 5 insertions(+), 33 deletions(-)
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index 616b17f..e30129c 100644
index 9feec50842..3550013d58 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -255,8 +255,6 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
@@ -275,8 +275,6 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
a True value is the same as setting 'optimization' to the empty string
while a False value is equivalent to setting 'optimization' to '1'.
@@ -35,8 +37,8 @@ index 616b17f..e30129c 100644
"""
if debug_override is not None:
_warnings.warn('the debug_override parameter is deprecated; use '
@@ -267,10 +265,7 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
optimization = '' if debug_override else 1
@@ -288,10 +286,7 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
path = _os.fspath(path)
head, tail = _path_split(path)
base, sep, rest = tail.rpartition('.')
- tag = sys.implementation.cache_tag
@@ -47,7 +49,7 @@ index 616b17f..e30129c 100644
if optimization is None:
if sys.flags.optimize == 0:
optimization = ''
@@ -281,39 +276,17 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
@@ -302,40 +297,17 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
if not optimization.isalnum():
raise ValueError('{!r} is not alphanumeric'.format(optimization))
almost_filename = '{}.{}{}'.format(almost_filename, _OPT, optimization)
@@ -67,6 +69,7 @@ index 616b17f..e30129c 100644
"""
- if sys.implementation.cache_tag is None:
- raise NotImplementedError('sys.implementation.cache_tag is None')
- path = _os.fspath(path)
- head, pycache_filename = _path_split(path)
- head, pycache = _path_split(head)
- if pycache != _PYCACHE:
@@ -92,5 +95,5 @@ index 616b17f..e30129c 100644
--
2.6.4
2.13.5

View File

@@ -1,6 +1,6 @@
From 1d2891204c6bf05d5e2eb0e5fa2ee78f6a2b755b Mon Sep 17 00:00:00 2001
From bba0896a05e6406076893dd2f4c3b330e41082a6 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:47:00 +0100
Date: Wed, 22 Feb 2017 17:01:18 -0800
Subject: [PATCH] Add an option to disable installation of test modules
The Python standard distribution comes with many test modules, that
@@ -8,23 +8,25 @@ are not necessarly useful on embedded targets.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Makefile.pre.in | 56 ++++++++++++++++++++++++++++++++++++--------------------
configure.ac | 6 ++++++
2 files changed, 42 insertions(+), 20 deletions(-)
Makefile.pre.in | 55 ++++++++++++++++++++++++++++++++++++-------------------
configure.ac | 5 +++++
2 files changed, 41 insertions(+), 19 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 9420860..d4c771a 100644
index 4ce917ab8d..4110fff4ac 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1166,8 +1166,30 @@ maninstall: altmaninstall
PLATDIR= @PLATDIR@
MACHDEPS= $(PLATDIR)
@@ -1194,8 +1194,28 @@ maninstall: altmaninstall
# Install the library
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
-LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
- tkinter/test/test_ttk site-packages test \
+LIBSUBDIRS= tkinter \
+ site-packages \
+
+LIBSUBDIRS= tkinter site-packages \
+ asyncio \
+ collections concurrent concurrent/futures encodings \
+ email email/mime \
@@ -40,22 +42,20 @@ index 9420860..d4c771a 100644
+ turtledemo \
+ multiprocessing multiprocessing/dummy \
+ unittest \
+ venv venv/scripts venv/scripts/posix \
+ curses pydoc_data $(MACHDEPS)
+ venv venv/scripts venv/scripts/common venv/scripts/posix \
+ curses pydoc_data
+
+TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
+ test test/test_asyncio \
+ test/test_email test/test_email/data \
+ test/test_json \
+TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
+ tkinter/test/test_ttk test \
test/audiodata \
test/capath test/data \
test/cjkencodings test/decimaltestdata test/xmltestdata \
@@ -1199,28 +1221,22 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
@@ -1229,29 +1249,26 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
test/test_importlib/namespace_pkgs/project3/parent/child \
test/test_importlib/namespace_pkgs/module_and_namespace_package \
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
- asyncio \
- test/test_asyncio \
test/test_asyncio \
- collections concurrent concurrent/futures encodings \
- email email/mime test/test_email test/test_email/data \
- ensurepip ensurepip/_bundled \
@@ -63,6 +63,8 @@ index 9420860..d4c771a 100644
- sqlite3 sqlite3/test \
- logging csv wsgiref urllib \
- lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
+ test/test_email test/test_email/data \
+ test/test_json \
+ sqlite3/test \
+ lib2to3/tests \
lib2to3/tests/data lib2to3/tests/data/fixers \
@@ -77,37 +79,37 @@ index 9420860..d4c771a 100644
+ test/test_importlib test/test_importlib/builtin \
test/test_importlib/extension test/test_importlib/frozen \
test/test_importlib/import_ test/test_importlib/source \
test/test_tools test/test_warnings test/test_warnings/data \
- turtledemo \
- multiprocessing multiprocessing/dummy \
- unittest unittest/test unittest/test/testmock \
- venv venv/scripts venv/scripts/posix \
- curses pydoc_data $(MACHDEPS)
- venv venv/scripts venv/scripts/common venv/scripts/posix \
- curses pydoc_data
+ unittest/test unittest/test/testmock
+
+ifeq (@TEST_MODULES@,yes)
+LIBSUBDIRS += $(TESTSUBDIRS)
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
libinstall: build_all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
diff --git a/configure.ac b/configure.ac
index bfb599e..9f3d226 100644
index d5ee2aedfb..f924937fe1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2895,6 +2895,12 @@ if test "$posix_threads" = "yes"; then
@@ -3112,6 +3112,11 @@ if test "$posix_threads" = "yes"; then
AC_CHECK_FUNCS(pthread_atfork)
fi
+AC_SUBST(TEST_MODULES)
+
+AC_ARG_ENABLE(test-modules,
+ AS_HELP_STRING([--disable-test-modules], [disable test modules]),
+ [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
+
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
--
2.6.4
2.13.5

View File

@@ -1,6 +1,6 @@
From a83b79b964700604de386800f86e5a55f53a0e17 Mon Sep 17 00:00:00 2001
From 18a754e930e03d143d9392e49174cc370b334cdd Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:47:11 +0100
Date: Wed, 22 Feb 2017 17:07:56 -0800
Subject: [PATCH] Add an option to disable pydoc
It removes 0.5 MB of data from the target plus the pydoc script
@@ -8,17 +8,19 @@ itself.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Makefile.pre.in | 8 +++++++-
configure.ac | 5 +++++
configure.ac | 6 ++++++
setup.py | 9 +++++++--
3 files changed, 19 insertions(+), 3 deletions(-)
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index d4c771a..a98ad65 100644
index 4110fff4ac..badb2af35d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1134,7 +1134,9 @@ bininstall: altbininstall
@@ -1164,7 +1164,9 @@ bininstall: altbininstall
-rm -f $(DESTDIR)$(BINDIR)/idle3
(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
@@ -28,31 +30,31 @@ index d4c771a..a98ad65 100644
-rm -f $(DESTDIR)$(BINDIR)/2to3
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
@@ -1184,7 +1186,7 @@ LIBSUBDIRS= tkinter \
@@ -1212,7 +1214,7 @@ LIBSUBDIRS= tkinter site-packages \
multiprocessing multiprocessing/dummy \
unittest \
venv venv/scripts venv/scripts/posix \
- curses pydoc_data $(MACHDEPS)
+ curses $(MACHDEPS)
venv venv/scripts venv/scripts/common venv/scripts/posix \
- curses pydoc_data
+ curses
TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
test test/test_asyncio \
@@ -1233,6 +1235,10 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
test/test_importlib/import_ test/test_importlib/source \
unittest/test unittest/test/testmock
TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
tkinter/test/test_ttk test \
@@ -1269,6 +1271,10 @@ ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
+ifeq (@PYDOC@,yes)
+LIBSUBDIRS += pydoc_data
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
libinstall: build_all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
diff --git a/configure.ac b/configure.ac
index 9f3d226..e9b6d6f 100644
index f924937fe1..1621fa1611 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2894,6 +2894,11 @@ if test "$posix_threads" = "yes"; then
@@ -3112,6 +3112,12 @@ if test "$posix_threads" = "yes"; then
AC_CHECK_FUNCS(pthread_atfork)
fi
@@ -61,14 +63,15 @@ index 9f3d226..e9b6d6f 100644
+AC_ARG_ENABLE(pydoc,
+ AS_HELP_STRING([--disable-pydoc], [disable pydoc]),
+ [ PYDOC="${enableval}" ], [ PYDOC=yes ])
+
AC_SUBST(TEST_MODULES)
AC_ARG_ENABLE(test-modules,
diff --git a/setup.py b/setup.py
index 3feca04..137911d 100644
index 29bfd174d2..94dd337fef 100644
--- a/setup.py
+++ b/setup.py
@@ -2220,6 +2220,12 @@ def main():
@@ -2281,6 +2281,12 @@ def main():
# turn off warnings when deprecated modules are imported
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
@@ -81,16 +84,16 @@ index 3feca04..137911d 100644
setup(# PyPI Metadata (PEP 301)
name = "Python",
version = sys.version.split()[0],
@@ -2244,8 +2250,7 @@ def main():
@@ -2305,8 +2311,7 @@ def main():
# If you change the scripts installed here, you also need to
# check the PyBuildScripts command above, and change the links
# created by the bininstall target in Makefile.pre.in
- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
- "Tools/scripts/2to3", "Tools/scripts/pyvenv"]
+ scripts = scripts,
+ scripts = scripts
)
# --install-platlib
--
2.6.4
2.13.5

View File

@@ -1,30 +0,0 @@
From be44636b36086ca1b6de24265b7c3cc0c2bae913 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:45:13 +0100
Subject: [PATCH] Do not harcode invalid path to ncursesw headers
Adding /usr/include/ncursesw is obviously invalid when
cross-compiling. Since the ncursesw headers are no longer installed in
usr/include/ncursesw/, but directly in usr/include, there is anyway no
need for a special header path.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/setup.py b/setup.py
index 15b39f5..9e08e7e 100644
--- a/setup.py
+++ b/setup.py
@@ -1296,7 +1296,6 @@ class PyBuildExt(build_ext):
panel_library = 'panel'
if curses_library == 'ncursesw':
curses_defines.append(('HAVE_NCURSESW', '1'))
- curses_includes.append('/usr/include/ncursesw')
# Bug 1464056: If _curses.so links with ncursesw,
# _curses_panel.so must link with panelw.
panel_library = 'panelw'
--
2.6.4

View File

@@ -1,6 +1,6 @@
From 3c877ea9f09913586f87064b7a2b9d2b49cb05aa Mon Sep 17 00:00:00 2001
From c2d279b4a19de7a32e8a73e320423f699d408380 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:48:44 +0100
Date: Wed, 22 Feb 2017 17:15:31 -0800
Subject: [PATCH] Add an option to disable lib2to3
lib2to3 is a library to convert Python 2.x code to Python 3.x. As
@@ -8,6 +8,8 @@ such, it is probably not very useful on embedded system targets.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Makefile.pre.in | 16 ++++++++++++----
configure.ac | 6 ++++++
@@ -15,10 +17,10 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
3 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index a98ad65..3823940 100644
index badb2af35d..931cc3ed07 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1138,7 +1138,9 @@ ifeq (@PYDOC@,yes)
@@ -1168,7 +1168,9 @@ ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
endif
-rm -f $(DESTDIR)$(BINDIR)/2to3
@@ -28,7 +30,7 @@ index a98ad65..3823940 100644
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
(cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv)
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
@@ -1177,7 +1179,6 @@ LIBSUBDIRS= tkinter \
@@ -1205,7 +1207,6 @@ LIBSUBDIRS= tkinter site-packages \
html json http dbm xmlrpc \
sqlite3 \
logging csv wsgiref urllib \
@@ -36,9 +38,9 @@ index a98ad65..3823940 100644
ctypes ctypes/macholib \
idlelib idlelib/Icons \
distutils distutils/command $(XMLLIBSUBDIRS) \
@@ -1224,9 +1225,6 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
test/test_importlib/namespace_pkgs/module_and_namespace_package \
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
@@ -1255,9 +1256,6 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
test/test_email test/test_email/data \
test/test_json \
sqlite3/test \
- lib2to3/tests \
- lib2to3/tests/data lib2to3/tests/data/fixers \
@@ -46,9 +48,9 @@ index a98ad65..3823940 100644
ctypes/test \
idlelib/idle_test \
distutils/tests \
@@ -1239,6 +1237,14 @@ ifeq (@PYDOC@,yes)
LIBSUBDIRS += pydoc_data
endif
@@ -1267,6 +1265,14 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
test/test_tools test/test_warnings test/test_warnings/data \
unittest/test unittest/test/testmock
+ifeq (@LIB2TO3@,yes)
+LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
@@ -61,7 +63,7 @@ index a98ad65..3823940 100644
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
@@ -1337,10 +1343,12 @@ ifeq (@PYC_BUILD@,yes)
@@ -1366,10 +1372,12 @@ ifeq (@PYC_BUILD@,yes)
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
endif
@@ -72,13 +74,13 @@ index a98ad65..3823940 100644
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
+endif
# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):
python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
# Substitution happens here, as the completely-expanded BINDIR
diff --git a/configure.ac b/configure.ac
index e9b6d6f..652ad88 100644
index 1621fa1611..13b2edf8b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2906,6 +2906,12 @@ AC_ARG_ENABLE(test-modules,
@@ -3124,6 +3124,12 @@ AC_ARG_ENABLE(test-modules,
AS_HELP_STRING([--disable-test-modules], [disable test modules]),
[ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
@@ -92,10 +94,10 @@ index e9b6d6f..652ad88 100644
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
diff --git a/setup.py b/setup.py
index 137911d..722308b 100644
index 94dd337fef..76429e1326 100644
--- a/setup.py
+++ b/setup.py
@@ -2221,10 +2221,11 @@ def main():
@@ -2282,10 +2282,11 @@ def main():
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
@@ -110,5 +112,5 @@ index 137911d..722308b 100644
setup(# PyPI Metadata (PEP 301)
name = "Python",
--
2.6.4
2.13.5

View File

@@ -1,20 +1,22 @@
From 9ae1dce0a2fa01fc3dbc83d8b8c1b56e4b1b162b Mon Sep 17 00:00:00 2001
From f2965dfb1aa4f6b3216f3bb1d20f99326f127079 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:49:01 +0100
Date: Wed, 22 Feb 2017 17:20:45 -0800
Subject: [PATCH] Add option to disable the sqlite3 module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Makefile.pre.in | 7 +++++--
configure.ac | 9 +++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 3823940..c822dbd 100644
index 931cc3ed07..a1ce0712cd 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1177,7 +1177,6 @@ LIBSUBDIRS= tkinter \
@@ -1205,7 +1205,6 @@ LIBSUBDIRS= tkinter site-packages \
email email/mime \
ensurepip ensurepip/_bundled \
html json http dbm xmlrpc \
@@ -22,15 +24,15 @@ index 3823940..c822dbd 100644
logging csv wsgiref urllib \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
@@ -1224,7 +1223,6 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
test/test_importlib/namespace_pkgs/project3/parent/child \
test/test_importlib/namespace_pkgs/module_and_namespace_package \
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
@@ -1255,7 +1254,6 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
test/test_asyncio \
test/test_email test/test_email/data \
test/test_json \
- sqlite3/test \
ctypes/test \
idlelib/idle_test \
distutils/tests \
@@ -1245,6 +1243,11 @@ TESTSUBDIRS += lib2to3/tests \
@@ -1273,6 +1271,11 @@ TESTSUBDIRS += lib2to3/tests \
lib2to3/tests/data/fixers/myfixes
endif
@@ -43,10 +45,10 @@ index 3823940..c822dbd 100644
LIBSUBDIRS += $(TESTSUBDIRS)
endif
diff --git a/configure.ac b/configure.ac
index 652ad88..cae12ad 100644
index 13b2edf8b7..d7582cfea4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2894,6 +2894,15 @@ if test "$posix_threads" = "yes"; then
@@ -3112,6 +3112,15 @@ if test "$posix_threads" = "yes"; then
AC_CHECK_FUNCS(pthread_atfork)
fi
@@ -63,5 +65,5 @@ index 652ad88..cae12ad 100644
AC_ARG_ENABLE(pydoc,
--
2.6.4
2.13.5

View File

@@ -1,41 +1,43 @@
From d0d42570e5a23c3bf559e0413ec97729fd2f9e24 Mon Sep 17 00:00:00 2001
From f96a00d42e714171f1d90501ed73594fddee570f Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:49:14 +0100
Date: Wed, 22 Feb 2017 17:23:42 -0800
Subject: [PATCH] Add an option to disable the tk module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Makefile.pre.in | 11 ++++++++---
configure.ac | 9 +++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index c822dbd..0a93c27 100644
index a1ce0712cd..dc1e917cc3 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1170,7 +1170,7 @@ maninstall: altmaninstall
PLATDIR= @PLATDIR@
MACHDEPS= $(PLATDIR)
@@ -1199,7 +1199,7 @@ maninstall: altmaninstall
# Install the library
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
-LIBSUBDIRS= tkinter \
+LIBSUBDIRS= \
site-packages \
-LIBSUBDIRS= tkinter site-packages \
+LIBSUBDIRS= site-packages \
asyncio \
collections concurrent concurrent/futures encodings \
@@ -1188,8 +1188,7 @@ LIBSUBDIRS= tkinter \
venv venv/scripts venv/scripts/posix \
curses $(MACHDEPS)
email email/mime \
@@ -1216,8 +1216,7 @@ LIBSUBDIRS= tkinter site-packages \
venv venv/scripts venv/scripts/common venv/scripts/posix \
curses
-TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
- test test/test_asyncio \
+TESTSUBDIRS = test test/test_asyncio \
test/test_email test/test_email/data \
test/test_json \
-TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
- tkinter/test/test_ttk test \
+TESTSUBDIRS= test \
test/audiodata \
@@ -1248,6 +1247,12 @@ LIBSUBDIRS += sqlite3
TESTSUBDIRS += sqlite3/test
endif
test/capath test/data \
test/cjkencodings test/decimaltestdata test/xmltestdata \
@@ -1263,6 +1262,12 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
test/test_tools test/test_warnings test/test_warnings/data \
unittest/test unittest/test/testmock
+ifeq (@TK@,yes)
+LIBSUBDIRS += tkinter
@@ -43,14 +45,14 @@ index c822dbd..0a93c27 100644
+ tkinter/test/test_ttk
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
ifeq (@LIB2TO3@,yes)
LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
TESTSUBDIRS += lib2to3/tests \
diff --git a/configure.ac b/configure.ac
index cae12ad..787b185 100644
index d7582cfea4..6a56a5b0c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2903,6 +2903,15 @@ if test "$SQLITE3" = "no" ; then
@@ -3121,6 +3121,15 @@ if test "$SQLITE3" = "no" ; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
@@ -67,5 +69,5 @@ index cae12ad..787b185 100644
AC_ARG_ENABLE(pydoc,
--
2.6.4
2.13.5

View File

@@ -1,29 +1,32 @@
From d04ec780bf7c0825ab260bd1d6b7292141b2dcde Mon Sep 17 00:00:00 2001
From 404aad42698c6d5cbd78421720f9a2bc0e8ec9fe Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:49:30 +0100
Date: Wed, 22 Feb 2017 17:31:51 -0800
Subject: [PATCH] Add an option to disable the curses module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Makefile.pre.in | 6 +++++-
Makefile.pre.in | 7 +++++--
configure.ac | 9 +++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 0a93c27..b97c21e 100644
index dc1e917cc3..6a6bc082cd 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1186,7 +1186,7 @@ LIBSUBDIRS= \
@@ -1213,8 +1213,7 @@ LIBSUBDIRS= site-packages \
turtledemo \
multiprocessing multiprocessing/dummy \
unittest \
venv venv/scripts venv/scripts/posix \
- curses $(MACHDEPS)
+ $(MACHDEPS)
- venv venv/scripts venv/scripts/common venv/scripts/posix \
- curses
+ venv venv/scripts venv/scripts/common venv/scripts/posix
TESTSUBDIRS = test test/test_asyncio \
test/test_email test/test_email/data \
@@ -1253,6 +1253,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
TESTSUBDIRS= test \
test/audiodata \
@@ -1268,6 +1267,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
tkinter/test/test_ttk
endif
@@ -31,14 +34,14 @@ index 0a93c27..b97c21e 100644
+LIBSUBDIRS += curses
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
ifeq (@LIB2TO3@,yes)
LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
TESTSUBDIRS += lib2to3/tests \
diff --git a/configure.ac b/configure.ac
index 787b185..0be47b2 100644
index 6a56a5b0c1..5896b39ff9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2912,6 +2912,15 @@ if test "$TK" = "no"; then
@@ -3130,6 +3130,15 @@ if test "$TK" = "no"; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
fi
@@ -55,5 +58,5 @@ index 787b185..0be47b2 100644
AC_ARG_ENABLE(pydoc,
--
2.6.4
2.13.5

View File

@@ -1,6 +1,6 @@
From 6281850ee8c3fb6d93b4997833af0cca4a48947b Mon Sep 17 00:00:00 2001
From 63fc5bc90cb57460552b544cbed0c2939759ab9e Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:49:42 +0100
Date: Wed, 22 Feb 2017 17:40:45 -0800
Subject: [PATCH] Add an option to disable expat
This patch replaces the existing --with-system-expat option with a
@@ -11,6 +11,8 @@ installation of XML modules).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Makefile.pre.in | 6 +++++-
configure.ac | 18 +++++++++++++-----
@@ -18,10 +20,10 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
3 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index b97c21e..bdfee19 100644
index 6a6bc082cd..dc4b92b6fe 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1180,7 +1180,7 @@ LIBSUBDIRS= \
@@ -1208,7 +1208,7 @@ LIBSUBDIRS= site-packages \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
@@ -30,7 +32,7 @@ index b97c21e..bdfee19 100644
importlib \
turtledemo \
multiprocessing multiprocessing/dummy \
@@ -1257,6 +1257,10 @@ ifeq (@CURSES@,yes)
@@ -1271,6 +1271,10 @@ ifeq (@CURSES@,yes)
LIBSUBDIRS += curses
endif
@@ -38,14 +40,14 @@ index b97c21e..bdfee19 100644
+LIBSUBDIRS += $(XMLLIBSUBDIRS)
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
ifeq (@LIB2TO3@,yes)
LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
TESTSUBDIRS += lib2to3/tests \
diff --git a/configure.ac b/configure.ac
index 0be47b2..e6bcacc 100644
index 5896b39ff9..6f21482207 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2591,13 +2591,21 @@ PKG_PROG_PKG_CONFIG
@@ -2813,13 +2813,21 @@ PKG_PROG_PKG_CONFIG
AC_SUBST(DISABLED_EXTENSIONS)
# Check for use of the system expat library
@@ -73,10 +75,10 @@ index 0be47b2..e6bcacc 100644
# Check for use of the system libffi library
AC_MSG_CHECKING(for --with-system-ffi)
diff --git a/setup.py b/setup.py
index 722308b..ecddb6a 100644
index 76429e1326..38aa5e605e 100644
--- a/setup.py
+++ b/setup.py
@@ -1434,7 +1434,7 @@ class PyBuildExt(build_ext):
@@ -1495,7 +1495,7 @@ class PyBuildExt(build_ext):
#
# More information on Expat can be found at www.libexpat.org.
#
@@ -86,5 +88,5 @@ index 722308b..ecddb6a 100644
define_macros = []
expat_lib = ['expat']
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From 18265d05ee97ad0c43995acdadce2458b57d7d64 Mon Sep 17 00:00:00 2001
From 3335500cb13a6bc1ab41dfcf00b33e6ade3b9764 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:49:55 +0100
Subject: [PATCH] Add an option to disable CJK codecs
@@ -9,10 +9,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index e6bcacc..38b7515 100644
index 6f21482207..c7742faf41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2911,6 +2911,12 @@ if test "$SQLITE3" = "no" ; then
@@ -3129,6 +3129,12 @@ if test "$SQLITE3" = "no" ; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
@@ -26,5 +26,5 @@ index e6bcacc..38b7515 100644
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From 733ee65f308ec48be427463c06f372ca116ccada Mon Sep 17 00:00:00 2001
From e52d4868cc1192f7e1c147aebaf4fc6f7de30357 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:50:11 +0100
Subject: [PATCH] Add an option to disable NIS
@@ -12,10 +12,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index 38b7515..f25733a 100644
index c7742faf41..42a871bb09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2917,6 +2917,12 @@ AC_ARG_ENABLE(codecs-cjk,
@@ -3135,6 +3135,12 @@ AC_ARG_ENABLE(codecs-cjk,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022"
fi])
@@ -29,5 +29,5 @@ index 38b7515..f25733a 100644
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From 64fa1fc3a9aea7ffba7b96d08a14df91051f2b6f Mon Sep 17 00:00:00 2001
From 69d3e8f0438d01adde55e90eeabafa4abefd3b02 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:50:27 +0100
Subject: [PATCH] Add an option to disable unicodedata
@@ -9,10 +9,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index f25733a..a7ddb2b 100644
index 42a871bb09..1d610e132b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2923,6 +2923,12 @@ AC_ARG_ENABLE(nis,
@@ -3141,6 +3141,12 @@ AC_ARG_ENABLE(nis,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
@@ -26,5 +26,5 @@ index f25733a..a7ddb2b 100644
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.6.4
2.13.5

View File

@@ -1,12 +1,14 @@
From 2766bcdd8f9b7395ce32a6d8480ef0a2186f2098 Mon Sep 17 00:00:00 2001
From 5bbd94f014c89665d02a8a32442822ab7c5520d0 Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Wed, 23 Dec 2015 11:50:42 +0100
Date: Wed, 22 Feb 2017 17:45:14 -0800
Subject: [PATCH] Add an option to disable IDLE
IDLE is an IDE embedded into python, written using Tk, so it doesn't make
much sense to have it into our build.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Makefile.pre.in | 7 ++++++-
configure.ac | 6 ++++++
@@ -14,10 +16,10 @@ Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index bdfee19..2466615 100644
index dc4b92b6fe..3e43066d90 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1132,7 +1132,9 @@ bininstall: altbininstall
@@ -1162,7 +1162,9 @@ bininstall: altbininstall
-rm -f $(DESTDIR)$(LIBPC)/python3.pc
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)
-rm -f $(DESTDIR)$(BINDIR)/idle3
@@ -27,7 +29,7 @@ index bdfee19..2466615 100644
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
@@ -1179,7 +1181,6 @@ LIBSUBDIRS= \
@@ -1207,7 +1209,6 @@ LIBSUBDIRS= site-packages \
html json http dbm xmlrpc \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
@@ -35,7 +37,7 @@ index bdfee19..2466615 100644
distutils distutils/command \
importlib \
turtledemo \
@@ -1261,6 +1262,10 @@ ifeq (@EXPAT@,yes)
@@ -1275,6 +1276,10 @@ ifeq (@EXPAT@,yes)
LIBSUBDIRS += $(XMLLIBSUBDIRS)
endif
@@ -43,14 +45,14 @@ index bdfee19..2466615 100644
+LIBSUBDIRS += idlelib idlelib/Icons
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
ifeq (@LIB2TO3@,yes)
LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
TESTSUBDIRS += lib2to3/tests \
diff --git a/configure.ac b/configure.ac
index a7ddb2b..6b59792 100644
index 1d610e132b..2699e7ceb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2965,6 +2965,12 @@ AC_ARG_ENABLE(lib2to3,
@@ -3183,6 +3183,12 @@ AC_ARG_ENABLE(lib2to3,
AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
[ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
@@ -64,15 +66,15 @@ index a7ddb2b..6b59792 100644
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
diff --git a/setup.py b/setup.py
index ecddb6a..7fe68e8 100644
index 38aa5e605e..d642825c1e 100644
--- a/setup.py
+++ b/setup.py
@@ -2221,11 +2221,13 @@ def main():
@@ -2282,11 +2282,13 @@ def main():
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
- scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py']
+ scripts = ['Lib/smtpd.py']
+ scripts = [ 'Lib/smtpd.py']
if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
scripts += [ 'Tools/scripts/pydoc3' ]
if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"):
@@ -83,5 +85,5 @@ index ecddb6a..7fe68e8 100644
setup(# PyPI Metadata (PEP 301)
name = "Python",
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From ff77defc777a57d4caee5183796fd44dd265e78b Mon Sep 17 00:00:00 2001
From 0870559b9af82b55f1fd8b35528510f563577256 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:51:31 +0100
Subject: [PATCH] Add an option to disable decimal
@@ -15,10 +15,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6b59792..51e1760 100644
index 2699e7ceb1..e2c3b6f25c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2624,13 +2624,20 @@ AC_SUBST(LIBFFI_INCLUDEDIR)
@@ -2862,13 +2862,20 @@ AC_SUBST(LIBFFI_INCLUDEDIR)
AC_MSG_RESULT($with_system_ffi)
# Check for use of the system libmpdec library
@@ -45,10 +45,10 @@ index 6b59792..51e1760 100644
# Check for support for loadable sqlite extensions
AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
diff --git a/setup.py b/setup.py
index 7fe68e8..364b350 100644
index d642825c1e..5b98255857 100644
--- a/setup.py
+++ b/setup.py
@@ -1988,7 +1988,7 @@ class PyBuildExt(build_ext):
@@ -2058,7 +2058,7 @@ class PyBuildExt(build_ext):
def _decimal_ext(self):
extra_compile_args = []
undef_macros = []
@@ -58,5 +58,5 @@ index 7fe68e8..364b350 100644
libraries = [':libmpdec.so.2']
sources = ['_decimal/_decimal.c']
--
2.6.4
2.13.5

View File

@@ -1,4 +1,4 @@
From 789b0f99d7c1d25bfa9c05fd12f4d55bb70f377b Mon Sep 17 00:00:00 2001
From a04fb6159e394ec8346cd49993fdf70db3e1b184 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:51:58 +0100
Subject: [PATCH] Add an option to disable the ossaudiodev module
@@ -9,10 +9,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index 51e1760..c4c2353 100644
index e2c3b6f25c..8e3dded25e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2639,6 +2639,12 @@ else
@@ -2877,6 +2877,12 @@ else
fi
AC_SUBST(MPDEC)
@@ -26,5 +26,5 @@ index 51e1760..c4c2353 100644
AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
AC_ARG_ENABLE(loadable-sqlite-extensions,
--
2.6.4
2.13.5

View File

@@ -1,4 +1,6 @@
From 4b001683ad1cb1d90b7c389e67447a250fa9c218 Mon Sep 17 00:00:00 2001
From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Date: Wed, 22 Feb 2017 17:55:59 -0800
Subject: [PATCH] Add an option to disable openssl support.
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
@@ -6,9 +8,11 @@ Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index 8e3dded25e..28bcdabd67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3027,6 +3027,12 @@
@@ -3160,6 +3160,12 @@ AC_ARG_ENABLE(unicodedata,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata"
fi])
@@ -21,3 +25,6 @@ Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.13.5

View File

@@ -0,0 +1,30 @@
From d35deaa5c65c29f2a56a29fd5fc1dadadd485eaf Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Tue, 7 Mar 2017 23:29:05 +0100
Subject: [PATCH] Add an option to disable the readline module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index 28bcdabd67..484f6ebaca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3166,6 +3166,12 @@ AC_ARG_ENABLE(openssl,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl _ssl _hashlib"
fi])
+AC_ARG_ENABLE(readline,
+ AS_HELP_STRING([--disable-readline], [disable readline]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} readline"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.13.5

View File

@@ -0,0 +1,42 @@
From 9e95f88906f850caa789977dab4b0f256b575254 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Tue, 7 Mar 2017 23:31:11 +0100
Subject: [PATCH] Add options to disable zlib, bzip2 and xz modules
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.ac | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/configure.ac b/configure.ac
index 484f6ebaca..79538df0cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3172,6 +3172,24 @@ AC_ARG_ENABLE(readline,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} readline"
fi])
+AC_ARG_ENABLE(bzip2,
+ AS_HELP_STRING([--disable-bzip2], [disable bzip2]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _bz2"
+ fi])
+
+AC_ARG_ENABLE(zlib,
+ AS_HELP_STRING([--disable-zlib], [disable zlib]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} zlib"
+ fi])
+
+AC_ARG_ENABLE(xz,
+ AS_HELP_STRING([--disable-xz], [disable xz]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _lzma"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.13.5

View File

@@ -1,62 +0,0 @@
From 4f851142b8f3149d23654117621285df34ec768b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 13:58:00 +0100
Subject: [PATCH] Support PGEN_FOR_BUILD and FREEZE_IMPORTLIB_FOR_BUILD
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Makefile.pre.in | 10 ++++++++++
configure.ac | 3 +++
2 files changed, 13 insertions(+)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 2466615..fdf622d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -712,10 +712,15 @@ Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
############################################################################
# Importlib
+ifeq (@FREEZE_IMPORTLIB_FOR_BUILD@,)
Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
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)
+else
+Programs/_freeze_importlib: @FREEZE_IMPORTLIB_FOR_BUILD@
+ cp $^ $@
+endif
Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
./Programs/_freeze_importlib \
@@ -789,8 +794,13 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
$(GRAMMAR_C): $(GRAMMAR_H)
touch $(GRAMMAR_C)
+ifeq (@PGEN_FOR_BUILD@,)
$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
+else
+$(PGEN): @PGEN_FOR_BUILD@
+ cp $^ $@
+endif
Parser/grammar.o: $(srcdir)/Parser/grammar.c \
$(srcdir)/Include/token.h \
diff --git a/configure.ac b/configure.ac
index c4c2353..750c232 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,9 @@ else
fi
AC_SUBST(PYTHON_FOR_BUILD)
+AC_SUBST(PGEN_FOR_BUILD)
+AC_SUBST(FREEZE_IMPORTLIB_FOR_BUILD)
+
dnl Ensure that if prefix is specified, it does not end in a slash. If
dnl it does, we get path names containing '//' which is both ugly and
dnl can cause trouble.
--
2.6.4

View File

@@ -22,7 +22,8 @@ choice
prompt "python3 module format to install"
default BR2_PACKAGE_PYTHON3_PYC_ONLY
help
Select Python module format to install on target (py, pyc or both)
Select Python module format to install on target (py, pyc or
both)
config BR2_PACKAGE_PYTHON3_PY_ONLY
bool ".py sources only"
@@ -84,7 +85,8 @@ config BR2_PACKAGE_PYTHON3_UNICODEDATA
bool "unicodedata module"
default y
help
Unicode character database (used by stringprep module) (large).
Unicode character database (used by stringprep module)
(large).
config BR2_PACKAGE_PYTHON3_SQLITE
bool "sqlite module"

View File

@@ -1,4 +1,4 @@
# From https://www.python.org/downloads/release/python-352/
md5 8906efbacfcdc7c3c9198aeefafd159e Python-3.5.2.tar.xz
# From https://www.python.org/downloads/release/python-363/
md5 b9c2c36c33fb89bda1fefd37ad5af9be Python-3.6.3.tar.xz
# Locally computed
sha256 0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40 Python-3.5.2.tar.xz
sha256 cda7d967c9a4bfa52337cdf551bcc5cff026b6ac50a8834e568ce4a794ca81da Python-3.6.3.tar.xz

View File

@@ -4,11 +4,11 @@
#
################################################################################
PYTHON3_VERSION_MAJOR = 3.5
PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).2
PYTHON3_VERSION_MAJOR = 3.6
PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).3
PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz
PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION)
PYTHON3_LICENSE = Python software foundation license v2, others
PYTHON3_SITE = https://python.org/ftp/python/$(PYTHON3_VERSION)
PYTHON3_LICENSE = Python-2.0, others
PYTHON3_LICENSE_FILES = LICENSE
# Python itself doesn't use libtool, but it includes the source code
@@ -18,25 +18,22 @@ PYTHON3_LICENSE_FILES = LICENSE
# the Python sources, but instead use an external libffi library.
PYTHON3_LIBTOOL_PATCH = NO
# Python needs itself and a "pgen" program to build itself, both being
# provided in the Python sources. So in order to cross-compile Python,
# we need to build a host Python first. This host Python is also
# installed in $(HOST_DIR), as it is needed when cross-compiling
# third-party Python modules.
# This host Python is installed in $(HOST_DIR), as it is needed when
# cross-compiling third-party Python modules.
HOST_PYTHON3_CONF_OPTS += \
--without-ensurepip \
--without-cxx-main \
--disable-sqlite3 \
--disable-tk \
--with-expat=system \
--disable-curses \
--disable-codecs-cjk \
--disable-nis \
--enable-unicodedata \
--disable-test-modules \
--disable-idle3 \
--disable-ossaudiodev \
HOST_PYTHON3_CONF_OPTS += \
--without-ensurepip \
--without-cxx-main \
--disable-sqlite3 \
--disable-tk \
--with-expat=system \
--disable-curses \
--disable-codecs-cjk \
--disable-nis \
--enable-unicodedata \
--disable-test-modules \
--disable-idle3 \
--disable-ossaudiodev \
--disable-openssl
# Make sure that LD_LIBRARY_PATH overrides -rpath.
@@ -56,6 +53,8 @@ PYTHON3_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y)
PYTHON3_DEPENDENCIES += readline
else
PYTHON3_CONF_OPTS += --disable-readline
endif
ifeq ($(BR2_PACKAGE_PYTHON3_CURSES),y)
@@ -90,6 +89,8 @@ endif
ifeq ($(BR2_PACKAGE_PYTHON3_SSL),y)
PYTHON3_DEPENDENCIES += openssl
else
PYTHON3_CONF_OPTS += --disable-openssl
endif
ifneq ($(BR2_PACKAGE_PYTHON3_CODECSCJK),y)
@@ -102,14 +103,20 @@ endif
ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y)
PYTHON3_DEPENDENCIES += bzip2
else
PYTHON3_CONF_OPTS += --disable-bzip2
endif
ifeq ($(BR2_PACKAGE_PYTHON3_XZ),y)
PYTHON3_DEPENDENCIES += xz
else
PYTHON3_CONF_OPTS += --disable-xz
endif
ifeq ($(BR2_PACKAGE_PYTHON3_ZLIB),y)
PYTHON3_DEPENDENCIES += zlib
else
PYTHON3_CONF_OPTS += --disable-zlib
endif
ifeq ($(BR2_PACKAGE_PYTHON3_OSSAUDIODEV),y)
@@ -141,32 +148,57 @@ PYTHON3_CONF_ENV += ac_cv_func_wcsftime=no
endif
PYTHON3_CONF_OPTS += \
--without-ensurepip \
--without-cxx-main \
--with-system-ffi \
--disable-pydoc \
--disable-test-modules \
--disable-lib2to3 \
--disable-tk \
--disable-nis \
--disable-idle3 \
--without-ensurepip \
--without-cxx-main \
--with-system-ffi \
--disable-pydoc \
--disable-test-modules \
--disable-lib2to3 \
--disable-tk \
--disable-nis \
--disable-idle3 \
--disable-pyc-build
# Python builds two tools to generate code: 'pgen' and
# '_freeze_importlib'. Unfortunately, for the target Python, they are
# built for the target, while we need to run them at build time. So
# when installing host-python, we copy them to
# $(HOST_DIR)/usr/bin. And then, when building the target python
# package, we tell the configure script where they are located.
define HOST_PYTHON3_INSTALL_TOOLS
cp $(@D)/Parser/pgen $(HOST_DIR)/usr/bin/python-pgen
cp $(@D)/Programs/_freeze_importlib $(HOST_DIR)/usr/bin/python-freeze-importlib
#
# Some of CPython's source code is generated using Python interpreter
# and some helper tools such as "Programs/_freeze_importlib" or
# "Parser/pgen" (look for regen-* targets in Makefile.pre.in for more
# info). Normally CPython codebase ships with those files
# pre-generated, so just regular "make" with no additional steps
# should be sufficient for a succesfull build, however due to
# Buildroot's "Add importlib fix for PEP 3147 issue" custom patch we
# end up modifying "Lib/importlib/_bootstrap_external.py" which means
# we have to do "regen-importlib" step before building CPython
# (Importlib is a builtin module that needs to be "frozen"/converted
# to a C array of bytecode using "Programs/_freeze_importlib")
#
# To achive that we add pre-build steps to host-python3 as well as
# python3 that execute "regen-importlib" target.
#
# Unfortunately, for the target Python, "Programs/_freeze_importlib"
# is built for the target, while we need to run them at build time. So
# when installing host-python3, we copy them to $(HOST_DIR)/bin...
#
define HOST_PYTHON3_MAKE_REGEN_IMPORTLIB
$(HOST_MAKE_ENV) $(PYTHON3_CONF_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) regen-importlib
cp $(@D)/Programs/_freeze_importlib $(HOST_DIR)/bin/python-freeze-importlib
endef
HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_TOOLS
PYTHON3_CONF_ENV += \
PGEN_FOR_BUILD=$(HOST_DIR)/usr/bin/python-pgen \
FREEZE_IMPORTLIB_FOR_BUILD=$(HOST_DIR)/usr/bin/python-freeze-importlib
HOST_PYTHON3_PRE_BUILD_HOOKS += HOST_PYTHON3_MAKE_REGEN_IMPORTLIB
#
# ... And then, when building the target python we first buid
# 'Programs/_freeze_importlib' to force GNU Make to update all of the
# prerequisites of 'Programs/_freeze_importlib', then copy our stashed
# "host-usable" version over the one that was just build and then
# build "regen-importlib" target
#
define PYTHON3_MAKE_REGEN_IMPORTLIB
$(TARGET_MAKE_ENV) $(PYTHON3_CONF_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) Programs/_freeze_importlib
cp $(HOST_DIR)/bin/python-freeze-importlib $(@D)/Programs/_freeze_importlib
$(TARGET_MAKE_ENV) $(PYTHON3_CONF_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) regen-importlib
endef
PYTHON3_PRE_BUILD_HOOKS += PYTHON3_MAKE_REGEN_IMPORTLIB
#
# Remove useless files. In the config/ directory, only the Makefile
@@ -214,24 +246,33 @@ endif
# for the target.
ifeq ($(BR2_PACKAGE_PYTHON3),y)
define HOST_PYTHON3_INSTALL_SYMLINK
ln -fs python3 $(HOST_DIR)/usr/bin/python
ln -fs python3-config $(HOST_DIR)/usr/bin/python-config
ln -fs python3 $(HOST_DIR)/bin/python
ln -fs python3-config $(HOST_DIR)/bin/python-config
endef
HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK
endif
# Provided to other packages
PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/
PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/
$(eval $(autotools-package))
$(eval $(host-autotools-package))
ifeq ($(BR2_REPRODUCIBLE),y)
define PYTHON3_FIX_TIME
find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) -name '*.py' -print0 | \
xargs -0 --no-run-if-empty touch -d @$(SOURCE_DATE_EPOCH)
endef
endif
define PYTHON3_CREATE_PYC_FILES
$(PYTHON3_FIX_TIME)
PYTHONPATH="$(PYTHON3_PATH)" \
$(HOST_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR) \
support/scripts/pycompile.py \
$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)
cd $(TARGET_DIR) && $(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR) \
$(TOPDIR)/support/scripts/pycompile.py \
$(if $(BR2_REPRODUCIBLE),--force) \
usr/lib/python$(PYTHON3_VERSION_MAJOR)
endef
ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PY_PYC),y)