diff --git a/packages/lang/Python3/package.mk b/packages/lang/Python3/package.mk index 7d196eee03..d548cf3e30 100644 --- a/packages/lang/Python3/package.mk +++ b/packages/lang/Python3/package.mk @@ -3,19 +3,20 @@ PKG_NAME="Python3" # When changing PKG_VERSION remember to sync PKG_PYTHON_VERSION! -PKG_VERSION="3.7.3" -PKG_SHA256="da60b54064d4cfcd9c26576f6df2690e62085123826cff2e667e72a91952d318" +PKG_VERSION="3.7.5" +PKG_SHA256="e85a76ea9f3d6c485ec1780fca4e500725a4a7bbc63c78ebc44170de9b619d94" PKG_LICENSE="OSS" PKG_SITE="http://www.python.org/" PKG_URL="http://www.python.org/ftp/python/$PKG_VERSION/${PKG_NAME::-1}-$PKG_VERSION.tar.xz" PKG_DEPENDS_HOST="zlib:host bzip2:host libffi:host util-linux:host xz:host" -PKG_DEPENDS_TARGET="toolchain sqlite expat zlib bzip2 openssl Python3:host readline ncurses" +PKG_DEPENDS_TARGET="toolchain Python3:host sqlite expat zlib bzip2 openssl libffi readline ncurses" PKG_LONGDESC="Python3 is an interpreted object-oriented programming language." - -PKG_PYTHON_VERSION=python3.7 - PKG_TOOLCHAIN="autotools" +PKG_PYTHON_VERSION="python3.7" + +PKG_PY_DISABLED_MODULES="_tkinter nis gdbm bsddb ossaudiodev" + PKG_CONFIGURE_OPTS_HOST="ac_cv_prog_HAS_HG=/bin/false ac_cv_prog_SVNVERSION=/bin/false --disable-pyc-build @@ -78,20 +79,21 @@ PKG_CONFIGURE_OPTS_TARGET="ac_cv_prog_HAS_HG=/bin/false --with-doc-strings --without-pymalloc --without-ensurepip - --with-threads --enable-ipv6 " -post_unpack() { - # This is needed to make sure the Python build process doesn't try to - # regenerate those files with the pgen program. Otherwise, it builds - # pgen for the target, and tries to run it on the host. - touch $PKG_BUILD/Include/graminit.h - touch $PKG_BUILD/Python/graminit.c +pre_configure_host() { + export DISABLED_EXTENSIONS="readline _curses _curses_panel $PKG_PY_DISABLED_MODULES" +} + +post_make_host() { + # python distutils per default adds -L$LIBDIR when linking binary extensions + sed -e "s|^ 'LIBDIR':.*| 'LIBDIR': '/usr/lib',|g" -i $(find $PKG_BUILD/.$HOST_NAME -not -path '*/__pycache__/*' -name '_sysconfigdata__*.py') } post_makeinstall_host() { - rm -f $TOOLCHAIN/bin/python*-config + ln -sf $PKG_PYTHON_VERSION $TOOLCHAIN/bin/python + rm -f $TOOLCHAIN/bin/smtpd.py* rm -f $TOOLCHAIN/bin/pyvenv rm -f $TOOLCHAIN/bin/pydoc* @@ -101,7 +103,13 @@ post_makeinstall_host() { cp $PKG_BUILD/Tools/scripts/reindent.py $TOOLCHAIN/lib/$PKG_PYTHON_VERSION } +pre_configure_target() { + export DISABLED_EXTENSIONS="$PKG_PY_DISABLED_MODULES" +} + post_makeinstall_target() { + ln -sf $PKG_PYTHON_VERSION $INSTALL/usr/bin/python + rm -fr $PKG_BUILD/.$TARGET_NAME/build/temp.* PKG_INSTALL_PATH_LIB=$INSTALL/usr/lib/$PKG_PYTHON_VERSION @@ -110,6 +118,8 @@ post_makeinstall_target() { rm -rf $PKG_INSTALL_PATH_LIB/$dir done + rm -rf $PKG_INSTALL_PATH_LIB/distutils/command/*.exe + rm -rf $INSTALL/usr/bin/pyvenv rm -rf $INSTALL/usr/bin/python*-config rm -rf $INSTALL/usr/bin/smtpd.py $INSTALL/usr/bin/smtpd.py.* diff --git a/packages/lang/Python3/patches/Python3-0000-default-is-optimized.patch b/packages/lang/Python3/patches/Python3-0000-default-is-optimized.patch index d39eea7b09..60cf2bcd34 100644 --- a/packages/lang/Python3/patches/Python3-0000-default-is-optimized.patch +++ b/packages/lang/Python3/patches/Python3-0000-default-is-optimized.patch @@ -1,14 +1,18 @@ -From 722c059f586ffd26bb3c447c56cb4d2601d9f94c Mon Sep 17 00:00:00 2001 +From 34116c8ab386aa1fb29f1819ee44b4e89260a1f1 Mon Sep 17 00:00:00 2001 From: MilhouseVH -Date: Sat, 8 Sep 2018 06:24:14 +0100 -Subject: [PATCH] Default is optimized +Date: Thu, 17 Oct 2019 00:18:30 +0100 +Subject: [PATCH] Enable optimization by default + +Do *not* enable Py_OptimizeFlag=2 (or higher) as this will stop +__doc__ output from being generated which will prevent the qemu +package for Generic from building. --- Python/pylifecycle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c -index fdb759f..432119e 100644 +index 55d1ba5..fe6e082 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -115,7 +115,7 @@ int Py_VerboseFlag = 0; /* Needed by import.c */ @@ -16,7 +20,7 @@ index fdb759f..432119e 100644 int Py_InteractiveFlag = 0; /* Needed by Py_FdIsInteractive() below */ int Py_InspectFlag = 0; /* Needed to determine whether to exit at SystemExit */ -int Py_OptimizeFlag = 0; /* Needed by compile.c */ -+int Py_OptimizeFlag = 2; /* Needed by compile.c */ ++int Py_OptimizeFlag = 1; /* Needed by compile.c */ int Py_NoSiteFlag = 0; /* Suppress 'import site' */ int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */ int Py_FrozenFlag = 0; /* Needed by getpath.c */ diff --git a/packages/lang/Python3/patches/Python3-0100-buildroot-patches.patch b/packages/lang/Python3/patches/Python3-0100-buildroot-patches.patch index 9d678cbe08..7eee2185d7 100644 --- a/packages/lang/Python3/patches/Python3-0100-buildroot-patches.patch +++ b/packages/lang/Python3/patches/Python3-0100-buildroot-patches.patch @@ -1,7 +1,7 @@ -From 1df58e4e6932c4c887fdd2f6a92509ae91e3d86f Mon Sep 17 00:00:00 2001 +From f385063603ac76f4765a53ce51cc1404e135a020 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 16:21:31 -0800 -Subject: [PATCH 01/32] Make the build of pyc files conditional +Subject: [PATCH 01/33] Make the build of pyc files conditional This commit adds a new configure option --disable-pyc-build to disable the compilation of pyc. @@ -15,10 +15,10 @@ Signed-off-by: Andrey Smirnov 2 files changed, 8 insertions(+) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 4c23c0e..ca52776 100644 +index beaccf5..bc205d1 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1385,6 +1385,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c +@@ -1404,6 +1404,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \ fi @@ -26,7 +26,7 @@ index 4c23c0e..ca52776 100644 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST) -f \ -@@ -1412,6 +1413,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c +@@ -1431,6 +1432,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 @@ -35,7 +35,7 @@ index 4c23c0e..ca52776 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 b5beb08..027901d 100644 +index 1ef0df7..74b6526 100644 --- a/configure.ac +++ b/configure.ac @@ -1107,6 +1107,12 @@ fi @@ -55,10 +55,10 @@ index b5beb08..027901d 100644 2.7.4 -From 4bf9295c7c03ecdcfeb40cf9cabeefb414fa3b2f Mon Sep 17 00:00:00 2001 +From 841e315367262f7567e76f80820485ba7a6fc529 Mon Sep 17 00:00:00 2001 From: Vanya Sergeev Date: Wed, 23 Dec 2015 11:30:33 +0100 -Subject: [PATCH 02/32] Disable buggy_getaddrinfo configure test when +Subject: [PATCH 02/33] Disable buggy_getaddrinfo configure test when cross-compiling with IPv6 support Signed-off-by: Vanya Sergeev @@ -67,10 +67,10 @@ Signed-off-by: Vanya Sergeev 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 027901d..3aa3e33 100644 +index 74b6526..e043d35 100644 --- a/configure.ac +++ b/configure.ac -@@ -3985,7 +3985,7 @@ fi +@@ -4059,7 +4059,7 @@ fi AC_MSG_RESULT($ac_cv_buggy_getaddrinfo) @@ -83,10 +83,10 @@ index 027901d..3aa3e33 100644 2.7.4 -From 3c1728bb10f2d8e5dbe42d35bd7b1ec354e31d89 Mon Sep 17 00:00:00 2001 +From c5287f9cd9b29a5bd6c75da6a2c541d33392cdbc Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 16:33:22 -0800 -Subject: [PATCH 03/32] Add infrastructure to disable the build of certain +Subject: [PATCH 03/33] Add infrastructure to disable the build of certain extensions Some of the extensions part of the Python core have dependencies on @@ -130,10 +130,10 @@ Signed-off-by: Andrey Smirnov 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index ca52776..5d64ab7 100644 +index bc205d1..0fd1db7 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -196,6 +196,8 @@ FILEMODE= 644 +@@ -206,6 +206,8 @@ FILEMODE= 644 # configure script arguments CONFIG_ARGS= @CONFIG_ARGS@ @@ -142,7 +142,7 @@ index ca52776..5d64ab7 100644 # Subdirectories with code SRCDIRS= @SRCDIRS@ -@@ -609,6 +611,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o +@@ -620,6 +622,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o esac; \ echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ @@ -150,7 +150,7 @@ index ca52776..5d64ab7 100644 $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ -@@ -1508,7 +1511,8 @@ libainstall: @DEF_MAKE_RULE@ python-config +@@ -1537,7 +1540,8 @@ libainstall: @DEF_MAKE_RULE@ python-config # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods @@ -161,10 +161,10 @@ index ca52776..5d64ab7 100644 --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ diff --git a/configure.ac b/configure.ac -index 3aa3e33..d68d410 100644 +index e043d35..788516d 100644 --- a/configure.ac +++ b/configure.ac -@@ -2902,6 +2902,8 @@ LIBS="$withval $LIBS" +@@ -2966,6 +2966,8 @@ LIBS="$withval $LIBS" PKG_PROG_PKG_CONFIG @@ -174,10 +174,10 @@ index 3aa3e33..d68d410 100644 AC_MSG_CHECKING(for --with-system-expat) AC_ARG_WITH(system_expat, diff --git a/setup.py b/setup.py -index a97a755..e62b499 100644 +index 88cff61..6c56426 100644 --- a/setup.py +++ b/setup.py -@@ -43,7 +43,11 @@ host_platform = get_platform() +@@ -48,7 +48,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. @@ -194,10 +194,10 @@ index a97a755..e62b499 100644 2.7.4 -From 4ba45fbf70789f51f5bb83a513a7633c065ee6f3 Mon Sep 17 00:00:00 2001 +From 0b8e9819206e749f8400ad6c535023db24370e79 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 23 Dec 2015 11:33:14 +0100 -Subject: [PATCH 04/32] Adjust library/header paths for cross-compilation +Subject: [PATCH 04/33] Adjust library/header paths for cross-compilation When cross-compiling third-party extensions, the get_python_inc() or get_python_lib() can be called, to return the path to headers or @@ -217,10 +217,10 @@ Signed-off-by: Thomas Petazzoni 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py -index 8fad9cd..bfe5122 100644 +index 0428466..dbf879a 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py -@@ -233,7 +233,10 @@ class build_ext(Command): +@@ -234,7 +234,10 @@ class build_ext(Command): if (sysconfig.get_config_var('Py_ENABLE_SHARED')): if not sysconfig.python_build: # building third party extensions @@ -233,7 +233,7 @@ index 8fad9cd..bfe5122 100644 # building python standard extensions self.library_dirs.append('.') diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index e07a6c8..a9d78a5 100644 +index 0a034ee..e5dec2d 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -17,10 +17,17 @@ import sys @@ -262,10 +262,10 @@ index e07a6c8..a9d78a5 100644 2.7.4 -From 5737dfd186e53233c63c36aa2f359fa15081d3bc Mon Sep 17 00:00:00 2001 +From ac7a2166ab7c991f3201841f20d9301fd879a9e2 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 23 Dec 2015 11:36:00 +0100 -Subject: [PATCH 05/32] Don't look in /usr/lib/termcap for libraries +Subject: [PATCH 05/33] Don't look in /usr/lib/termcap for libraries Signed-off-by: Thomas Petazzoni --- @@ -273,10 +273,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup.py b/setup.py -index e62b499..c065092 100644 +index 6c56426..1b0838a 100644 --- a/setup.py +++ b/setup.py -@@ -850,12 +850,9 @@ class PyBuildExt(build_ext): +@@ -894,12 +894,9 @@ class PyBuildExt(build_ext): pass # Issue 7384: Already linked against curses or tinfo. elif curses_library: readline_libs.append(curses_library) @@ -294,10 +294,10 @@ index e62b499..c065092 100644 2.7.4 -From 1dd3495fcbec3ad495fc0a05cd2f0cb6a68c4bba Mon Sep 17 00:00:00 2001 +From b140aca6c2eef959b07d5863c565fa5bdfee0ab1 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 23 Dec 2015 11:36:27 +0100 -Subject: [PATCH 06/32] Don't add multiarch paths +Subject: [PATCH 06/33] Don't add multiarch paths The add_multiarch_paths() function leads, in certain build environments, to the addition of host header paths to the CFLAGS, @@ -313,10 +313,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py -index c065092..c44a683 100644 +index 1b0838a..ce7472d 100644 --- a/setup.py +++ b/setup.py -@@ -547,10 +547,10 @@ class PyBuildExt(build_ext): +@@ -591,10 +591,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') @@ -332,10 +332,10 @@ index c065092..c44a683 100644 2.7.4 -From af7fdaf9d5ac109f052a5ac687e5ebf3254a0ae6 Mon Sep 17 00:00:00 2001 +From 3601f296ad1e343a522ba19cd3a4795c809d4519 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 23 Dec 2015 11:43:24 +0100 -Subject: [PATCH 07/32] Abort on failed module build +Subject: [PATCH 07/33] Abort on failed module build When building a Python module fails, the setup.py script currently doesn't exit with an error, and simply continues. This is not a really @@ -348,10 +348,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py -index c44a683..a6eb2be 100644 +index ce7472d..da7984c 100644 --- a/setup.py +++ b/setup.py -@@ -358,6 +358,7 @@ class PyBuildExt(build_ext): +@@ -402,6 +402,7 @@ class PyBuildExt(build_ext): print("Failed to build these modules:") print_three_column(failed) print() @@ -363,10 +363,10 @@ index c44a683..a6eb2be 100644 2.7.4 -From bb03d2ab3820d0ba0f6788c58c7d02b7ec5a6f2e Mon Sep 17 00:00:00 2001 +From 381f68374b6f58497bc4e745f2dc884cbcc10a41 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Wed, 23 Dec 2015 11:44:02 +0100 -Subject: [PATCH 08/32] Serial ioctl() workaround +Subject: [PATCH 08/33] Serial ioctl() workaround The ioctls.h of some architectures (notably xtensa) references structs from linux/serial.h. Make sure to include this header as well. @@ -380,7 +380,7 @@ Signed-off-by: Baruch Siach 1 file changed, 2 insertions(+) diff --git a/Modules/termios.c b/Modules/termios.c -index b4aa77f..760a4a8 100644 +index 7601b68..36e4828 100644 --- a/Modules/termios.c +++ b/Modules/termios.c @@ -15,7 +15,9 @@ @@ -397,10 +397,10 @@ index b4aa77f..760a4a8 100644 2.7.4 -From fc9e8c17bd551d71a8e8250fd8d03717328f7ef0 Mon Sep 17 00:00:00 2001 +From e8bae9f4b05b4f3053975af402dd47f4e1b5cb33 Mon Sep 17 00:00:00 2001 From: Christophe Vu-Brugier Date: Wed, 23 Dec 2015 11:44:30 +0100 -Subject: [PATCH 09/32] Do not adjust the shebang of Python scripts for +Subject: [PATCH 09/33] Do not adjust the shebang of Python scripts for cross-compilation The copy_scripts() method in distutils copies the scripts listed in @@ -433,10 +433,10 @@ index ccc70e6..d6d5419 100644 2.7.4 -From f02eded6c8aa395e287c17d1514bbef76be22c07 Mon Sep 17 00:00:00 2001 +From 7a99661a038e7989add860d92304bcd59df644b5 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Thu, 20 Nov 2014 13:24:59 +0100 -Subject: [PATCH 10/32] Misc/python-config.sh.in: ensure sed invocations only +Subject: [PATCH 10/33] Misc/python-config.sh.in: ensure sed invocations only match beginning of strings The build/real prefix handling using sed breaks if build != real and the @@ -460,7 +460,7 @@ Signed-off-by: Peter Korsgaard 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in -index d1d3275..9e259c0 100644 +index a3c479c..db91bd6 100644 --- a/Misc/python-config.sh.in +++ b/Misc/python-config.sh.in @@ -24,18 +24,19 @@ installed_prefix () @@ -488,7 +488,7 @@ index d1d3275..9e259c0 100644 VERSION="@VERSION@" LIBM="@LIBM@" LIBC="@LIBC@" -@@ -49,7 +50,7 @@ OPT="@OPT@" +@@ -48,7 +49,7 @@ OPT="@OPT@" PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" LDVERSION="@LDVERSION@" LIBDEST=${prefix_real}/lib/python${VERSION} @@ -501,10 +501,10 @@ index d1d3275..9e259c0 100644 2.7.4 -From d60ebafd835463f75ea05ef1dc2be46d10f9f9fb Mon Sep 17 00:00:00 2001 +From c7744bc1ae27dd893167dba3328de426d72ea371 Mon Sep 17 00:00:00 2001 From: Samuel Cabrero Date: Wed, 23 Dec 2015 11:45:48 +0100 -Subject: [PATCH 11/32] Override system locale and set to default when adding +Subject: [PATCH 11/33] Override system locale and set to default when adding gcc paths Forces the use of the default locale in the function @@ -523,10 +523,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py -index a6eb2be..184999e 100644 +index da7984c..646440e 100644 --- a/setup.py +++ b/setup.py -@@ -514,7 +514,7 @@ class PyBuildExt(build_ext): +@@ -558,7 +558,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) @@ -539,10 +539,10 @@ index a6eb2be..184999e 100644 2.7.4 -From bc0f12d5f610852f9dd59f7c77e275c9c5d6b50a Mon Sep 17 00:00:00 2001 +From 07805143eda6e2477525db660922eb690348fada Mon Sep 17 00:00:00 2001 From: Christophe Vu-Brugier Date: Wed, 22 Feb 2017 16:48:49 -0800 -Subject: [PATCH 12/32] Add importlib fix for PEP 3147 issue +Subject: [PATCH 12/33] Add importlib fix for PEP 3147 issue Python 3 has a new standard for installing .pyc file, called PEP 3147. Unfortunately, this standard requires both the .py and .pyc @@ -566,7 +566,7 @@ Signed-off-by: Andrey Smirnov 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py -index 53b24ff..8b28bad 100644 +index 66a16a6..1638060 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -283,8 +283,6 @@ def cache_from_source(path, debug_override=None, *, optimization=None): @@ -639,10 +639,10 @@ index 53b24ff..8b28bad 100644 2.7.4 -From 84d23f2038c36b100d168586609abba7d1de03e3 Mon Sep 17 00:00:00 2001 +From e95437f70805736f9a23dcfa0e981ecbb0c458cc Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 17:01:18 -0800 -Subject: [PATCH 13/32] Add an option to disable installation of test modules +Subject: [PATCH 13/33] Add an option to disable installation of test modules The Python standard distribution comes with many test modules, that are not necessarly useful on embedded targets. @@ -657,10 +657,10 @@ Signed-off-by: Andrey Smirnov 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 5d64ab7..194dbfc 100644 +index 0fd1db7..353236b 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1251,8 +1251,28 @@ maninstall: altmaninstall +@@ -1270,8 +1270,28 @@ maninstall: altmaninstall # Install the library XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax @@ -691,7 +691,7 @@ index 5d64ab7..194dbfc 100644 test/audiodata \ test/capath test/data \ test/cjkencodings test/decimaltestdata test/xmltestdata \ -@@ -1306,26 +1326,24 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ +@@ -1325,26 +1345,24 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ test/test_importlib/source \ test/test_importlib/zipdata01 \ test/test_importlib/zipdata02 \ @@ -733,10 +733,10 @@ index 5d64ab7..194dbfc 100644 @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ diff --git a/configure.ac b/configure.ac -index d68d410..ea7aaeb 100644 +index 788516d..097793e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3162,6 +3162,11 @@ if test "$posix_threads" = "yes"; then +@@ -3229,6 +3229,11 @@ if test "$posix_threads" = "yes"; then AC_CHECK_FUNCS(pthread_getcpuclockid) fi @@ -752,10 +752,10 @@ index d68d410..ea7aaeb 100644 2.7.4 -From 66627f9f652400a125cf78a2356bf5b984ef707c Mon Sep 17 00:00:00 2001 +From a7fe54a20781adbb7f63fa0162c1cdc47377999e Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 17:07:56 -0800 -Subject: [PATCH 14/32] Add an option to disable pydoc +Subject: [PATCH 14/33] Add an option to disable pydoc It removes 0.5 MB of data from the target plus the pydoc script itself. @@ -771,10 +771,10 @@ Signed-off-by: Andrey Smirnov 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 194dbfc..efba1b5 100644 +index 353236b..5980c69 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1221,7 +1221,9 @@ bininstall: altbininstall +@@ -1240,7 +1240,9 @@ bininstall: altbininstall -rm -f $(DESTDIR)$(BINDIR)/idle3 (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3) -rm -f $(DESTDIR)$(BINDIR)/pydoc3 @@ -784,7 +784,7 @@ index 194dbfc..efba1b5 100644 -rm -f $(DESTDIR)$(BINDIR)/2to3 (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3) -rm -f $(DESTDIR)$(BINDIR)/pyvenv -@@ -1269,7 +1271,7 @@ LIBSUBDIRS= tkinter site-packages \ +@@ -1288,7 +1290,7 @@ LIBSUBDIRS= tkinter site-packages \ multiprocessing multiprocessing/dummy \ unittest \ venv venv/scripts venv/scripts/common venv/scripts/posix \ @@ -793,7 +793,7 @@ index 194dbfc..efba1b5 100644 TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \ tkinter/test/test_ttk test \ -@@ -1344,6 +1346,10 @@ ifeq (@TEST_MODULES@,yes) +@@ -1363,6 +1365,10 @@ ifeq (@TEST_MODULES@,yes) LIBSUBDIRS += $(TESTSUBDIRS) endif @@ -805,10 +805,10 @@ index 194dbfc..efba1b5 100644 @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ diff --git a/configure.ac b/configure.ac -index ea7aaeb..608ef45 100644 +index 097793e..2cdcb63 100644 --- a/configure.ac +++ b/configure.ac -@@ -3162,6 +3162,12 @@ if test "$posix_threads" = "yes"; then +@@ -3229,6 +3229,12 @@ if test "$posix_threads" = "yes"; then AC_CHECK_FUNCS(pthread_getcpuclockid) fi @@ -822,10 +822,10 @@ index ea7aaeb..608ef45 100644 AC_ARG_ENABLE(test-modules, diff --git a/setup.py b/setup.py -index 184999e..0492942 100644 +index 646440e..11ac959 100644 --- a/setup.py +++ b/setup.py -@@ -2332,6 +2332,12 @@ def main(): +@@ -2376,6 +2376,12 @@ def main(): # turn off warnings when deprecated modules are imported import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) @@ -838,7 +838,7 @@ index 184999e..0492942 100644 setup(# PyPI Metadata (PEP 301) name = "Python", version = sys.version.split()[0], -@@ -2356,8 +2362,7 @@ def main(): +@@ -2400,8 +2406,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 @@ -852,10 +852,10 @@ index 184999e..0492942 100644 2.7.4 -From 9879ed6a7efae3152feabc880f4d01e1fa2ff389 Mon Sep 17 00:00:00 2001 +From 2b57b759f1a91dd99e80096be6abf1c56ae4b3dc Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 17:15:31 -0800 -Subject: [PATCH 15/32] Add an option to disable lib2to3 +Subject: [PATCH 15/33] Add an option to disable lib2to3 lib2to3 is a library to convert Python 2.x code to Python 3.x. As such, it is probably not very useful on embedded system targets. @@ -871,10 +871,10 @@ Signed-off-by: Andrey Smirnov 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index efba1b5..017844f 100644 +index 5980c69..037362c 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1225,7 +1225,9 @@ ifeq (@PYDOC@,yes) +@@ -1244,7 +1244,9 @@ ifeq (@PYDOC@,yes) (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) endif -rm -f $(DESTDIR)$(BINDIR)/2to3 @@ -884,7 +884,7 @@ index efba1b5..017844f 100644 -rm -f $(DESTDIR)$(BINDIR)/pyvenv (cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv) if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \ -@@ -1262,7 +1264,6 @@ LIBSUBDIRS= tkinter site-packages \ +@@ -1281,7 +1283,6 @@ LIBSUBDIRS= tkinter site-packages \ html json http dbm xmlrpc \ sqlite3 \ logging csv wsgiref urllib \ @@ -892,7 +892,7 @@ index efba1b5..017844f 100644 ctypes ctypes/macholib \ idlelib idlelib/Icons \ distutils distutils/command $(XMLLIBSUBDIRS) \ -@@ -1332,9 +1333,6 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \ +@@ -1351,9 +1352,6 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \ test/test_email test/test_email/data \ test/test_json \ sqlite3/test \ @@ -902,7 +902,7 @@ index efba1b5..017844f 100644 ctypes/test \ idlelib/idle_test \ distutils/tests \ -@@ -1342,6 +1340,14 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \ +@@ -1361,6 +1359,14 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \ test/test_tools test/test_warnings test/test_warnings/data \ unittest/test unittest/test/testmock @@ -917,7 +917,7 @@ index efba1b5..017844f 100644 ifeq (@TEST_MODULES@,yes) LIBSUBDIRS += $(TESTSUBDIRS) endif -@@ -1441,10 +1447,12 @@ ifeq (@PYC_BUILD@,yes) +@@ -1460,10 +1466,12 @@ ifeq (@PYC_BUILD@,yes) -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages endif @@ -931,10 +931,10 @@ index efba1b5..017844f 100644 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 608ef45..3f73186 100644 +index 2cdcb63..7b735bf 100644 --- a/configure.ac +++ b/configure.ac -@@ -3174,6 +3174,12 @@ AC_ARG_ENABLE(test-modules, +@@ -3241,6 +3241,12 @@ AC_ARG_ENABLE(test-modules, AS_HELP_STRING([--disable-test-modules], [disable test modules]), [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ]) @@ -948,10 +948,10 @@ index 608ef45..3f73186 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 0492942..2c2fbd5 100644 +index 11ac959..104ed28 100644 --- a/setup.py +++ b/setup.py -@@ -2333,10 +2333,11 @@ def main(): +@@ -2377,10 +2377,11 @@ def main(): import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) @@ -969,10 +969,10 @@ index 0492942..2c2fbd5 100644 2.7.4 -From 8a8ea383325abb2237f526d7a3744172a19c881f Mon Sep 17 00:00:00 2001 +From 14ff67e98e43b4e0c75c53611edc7208cc7633d7 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 17:20:45 -0800 -Subject: [PATCH 16/32] Add option to disable the sqlite3 module +Subject: [PATCH 16/33] Add option to disable the sqlite3 module Signed-off-by: Thomas Petazzoni Signed-off-by: Samuel Martin @@ -984,10 +984,10 @@ Signed-off-by: Andrey Smirnov 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 017844f..c5f1389 100644 +index 037362c..40c0255 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1262,7 +1262,6 @@ LIBSUBDIRS= tkinter site-packages \ +@@ -1281,7 +1281,6 @@ LIBSUBDIRS= tkinter site-packages \ email email/mime \ ensurepip ensurepip/_bundled \ html json http dbm xmlrpc \ @@ -995,7 +995,7 @@ index 017844f..c5f1389 100644 logging csv wsgiref urllib \ ctypes ctypes/macholib \ idlelib idlelib/Icons \ -@@ -1332,7 +1331,6 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \ +@@ -1351,7 +1350,6 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \ test/test_asyncio \ test/test_email test/test_email/data \ test/test_json \ @@ -1003,7 +1003,7 @@ index 017844f..c5f1389 100644 ctypes/test \ idlelib/idle_test \ distutils/tests \ -@@ -1348,6 +1346,11 @@ TESTSUBDIRS += lib2to3/tests \ +@@ -1367,6 +1365,11 @@ TESTSUBDIRS += lib2to3/tests \ lib2to3/tests/data/fixers/myfixes endif @@ -1016,10 +1016,10 @@ index 017844f..c5f1389 100644 LIBSUBDIRS += $(TESTSUBDIRS) endif diff --git a/configure.ac b/configure.ac -index 3f73186..8252ee9 100644 +index 7b735bf..efb7488 100644 --- a/configure.ac +++ b/configure.ac -@@ -3162,6 +3162,15 @@ if test "$posix_threads" = "yes"; then +@@ -3229,6 +3229,15 @@ if test "$posix_threads" = "yes"; then AC_CHECK_FUNCS(pthread_getcpuclockid) fi @@ -1039,10 +1039,10 @@ index 3f73186..8252ee9 100644 2.7.4 -From 44fb56b626118fc994277a433930d2bd5f77e446 Mon Sep 17 00:00:00 2001 +From 62c298482f43a07cddf98d66bfef1d17887b88b2 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 17:23:42 -0800 -Subject: [PATCH 17/32] Add an option to disable the tk module +Subject: [PATCH 17/33] Add an option to disable the tk module Signed-off-by: Thomas Petazzoni Signed-off-by: Samuel Martin @@ -1054,10 +1054,10 @@ Signed-off-by: Andrey Smirnov 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index c5f1389..62b0617 100644 +index 40c0255..b0e35f5 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1256,7 +1256,7 @@ maninstall: altmaninstall +@@ -1275,7 +1275,7 @@ maninstall: altmaninstall # Install the library XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax @@ -1066,7 +1066,7 @@ index c5f1389..62b0617 100644 asyncio \ collections concurrent concurrent/futures encodings \ email email/mime \ -@@ -1273,8 +1273,7 @@ LIBSUBDIRS= tkinter site-packages \ +@@ -1292,8 +1292,7 @@ LIBSUBDIRS= tkinter site-packages \ venv venv/scripts venv/scripts/common venv/scripts/posix \ curses @@ -1076,7 +1076,7 @@ index c5f1389..62b0617 100644 test/audiodata \ test/capath test/data \ test/cjkencodings test/decimaltestdata test/xmltestdata \ -@@ -1338,6 +1337,12 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \ +@@ -1357,6 +1356,12 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \ test/test_tools test/test_warnings test/test_warnings/data \ unittest/test unittest/test/testmock @@ -1090,10 +1090,10 @@ index c5f1389..62b0617 100644 LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2 TESTSUBDIRS += lib2to3/tests \ diff --git a/configure.ac b/configure.ac -index 8252ee9..a668e0e 100644 +index efb7488..298a08c 100644 --- a/configure.ac +++ b/configure.ac -@@ -3171,6 +3171,15 @@ if test "$SQLITE3" = "no" ; then +@@ -3238,6 +3238,15 @@ if test "$SQLITE3" = "no" ; then DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" fi @@ -1113,10 +1113,10 @@ index 8252ee9..a668e0e 100644 2.7.4 -From fadc3279588dbf99fb5f044edd329dc4ea2b30a6 Mon Sep 17 00:00:00 2001 +From 7637783b28e8b4e6b1bb0ee874d967824ed41210 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 17:31:51 -0800 -Subject: [PATCH 18/32] Add an option to disable the curses module +Subject: [PATCH 18/33] Add an option to disable the curses module Signed-off-by: Thomas Petazzoni Signed-off-by: Samuel Martin @@ -1128,10 +1128,10 @@ Signed-off-by: Andrey Smirnov 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 62b0617..5cef555 100644 +index b0e35f5..8f16377 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1270,8 +1270,7 @@ LIBSUBDIRS= site-packages \ +@@ -1289,8 +1289,7 @@ LIBSUBDIRS= site-packages \ turtledemo \ multiprocessing multiprocessing/dummy \ unittest \ @@ -1141,7 +1141,7 @@ index 62b0617..5cef555 100644 TESTSUBDIRS= test \ test/audiodata \ -@@ -1343,6 +1342,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \ +@@ -1362,6 +1361,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \ tkinter/test/test_ttk endif @@ -1153,10 +1153,10 @@ index 62b0617..5cef555 100644 LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2 TESTSUBDIRS += lib2to3/tests \ diff --git a/configure.ac b/configure.ac -index a668e0e..c4b15ce 100644 +index 298a08c..69dd6ca 100644 --- a/configure.ac +++ b/configure.ac -@@ -3180,6 +3180,15 @@ if test "$TK" = "no"; then +@@ -3247,6 +3247,15 @@ if test "$TK" = "no"; then DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" fi @@ -1176,10 +1176,10 @@ index a668e0e..c4b15ce 100644 2.7.4 -From d14bc30bf2758459a42f1315601e5a829935601e Mon Sep 17 00:00:00 2001 +From 065a94499216924c8558e3ba581368777d2c677c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 17:40:45 -0800 -Subject: [PATCH 19/32] Add an option to disable expat +Subject: [PATCH 19/33] Add an option to disable expat This patch replaces the existing --with-system-expat option with a --with-expat={system,builtin,none} option, which allows to tell Python @@ -1198,10 +1198,10 @@ Signed-off-by: Andrey Smirnov 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 5cef555..d703c36 100644 +index 8f16377..6b262f4 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1265,7 +1265,7 @@ LIBSUBDIRS= site-packages \ +@@ -1284,7 +1284,7 @@ LIBSUBDIRS= site-packages \ logging csv wsgiref urllib \ ctypes ctypes/macholib \ idlelib idlelib/Icons \ @@ -1210,7 +1210,7 @@ index 5cef555..d703c36 100644 importlib \ turtledemo \ multiprocessing multiprocessing/dummy \ -@@ -1346,6 +1346,10 @@ ifeq (@CURSES@,yes) +@@ -1365,6 +1365,10 @@ ifeq (@CURSES@,yes) LIBSUBDIRS += curses endif @@ -1222,10 +1222,10 @@ index 5cef555..d703c36 100644 LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2 TESTSUBDIRS += lib2to3/tests \ diff --git a/configure.ac b/configure.ac -index c4b15ce..46fef2c 100644 +index 69dd6ca..214a666 100644 --- a/configure.ac +++ b/configure.ac -@@ -2905,13 +2905,21 @@ PKG_PROG_PKG_CONFIG +@@ -2969,13 +2969,21 @@ PKG_PROG_PKG_CONFIG AC_SUBST(DISABLED_EXTENSIONS) # Check for use of the system expat library @@ -1253,10 +1253,10 @@ index c4b15ce..46fef2c 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 2c2fbd5..27c4e1a 100644 +index 104ed28..85d823f 100644 --- a/setup.py +++ b/setup.py -@@ -1485,7 +1485,7 @@ class PyBuildExt(build_ext): +@@ -1529,7 +1529,7 @@ class PyBuildExt(build_ext): # # More information on Expat can be found at www.libexpat.org. # @@ -1269,10 +1269,10 @@ index 2c2fbd5..27c4e1a 100644 2.7.4 -From aa2d0e7d0cd008f4a9b886806119d05bf81cebe1 Mon Sep 17 00:00:00 2001 +From 5fa5150e9bc718971947bc04a767042abdc74706 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 23 Dec 2015 11:49:55 +0100 -Subject: [PATCH 20/32] Add an option to disable CJK codecs +Subject: [PATCH 20/33] Add an option to disable CJK codecs Signed-off-by: Thomas Petazzoni --- @@ -1280,10 +1280,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac -index 46fef2c..db47ca1 100644 +index 214a666..34dc0b8 100644 --- a/configure.ac +++ b/configure.ac -@@ -3179,6 +3179,12 @@ if test "$SQLITE3" = "no" ; then +@@ -3246,6 +3246,12 @@ if test "$SQLITE3" = "no" ; then DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" fi @@ -1300,10 +1300,10 @@ index 46fef2c..db47ca1 100644 2.7.4 -From 453934f6ffbcbe113f0a1ca01f6747810472392e Mon Sep 17 00:00:00 2001 +From cf2f18c7682004a8351141c460e300eaedc1782a Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 23 Dec 2015 11:50:11 +0100 -Subject: [PATCH 21/32] Add an option to disable NIS +Subject: [PATCH 21/33] Add an option to disable NIS NIS is not necessarily available in uClibc, so we need an option to not compile support for it. @@ -1314,10 +1314,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac -index db47ca1..7a79890 100644 +index 34dc0b8..ba1b1fc 100644 --- a/configure.ac +++ b/configure.ac -@@ -3185,6 +3185,12 @@ AC_ARG_ENABLE(codecs-cjk, +@@ -3252,6 +3252,12 @@ AC_ARG_ENABLE(codecs-cjk, DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022" fi]) @@ -1334,10 +1334,10 @@ index db47ca1..7a79890 100644 2.7.4 -From 423e0dbcb0e14e8b14b42a77056b646a1eb21ebd Mon Sep 17 00:00:00 2001 +From dcd9e9ff46b624222092e7a0ac5d5a9f80cce9b1 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 23 Dec 2015 11:50:27 +0100 -Subject: [PATCH 22/32] Add an option to disable unicodedata +Subject: [PATCH 22/33] Add an option to disable unicodedata Signed-off-by: Thomas Petazzoni --- @@ -1345,10 +1345,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac -index 7a79890..9ea602f 100644 +index ba1b1fc..f902d14 100644 --- a/configure.ac +++ b/configure.ac -@@ -3191,6 +3191,12 @@ AC_ARG_ENABLE(nis, +@@ -3258,6 +3258,12 @@ AC_ARG_ENABLE(nis, DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" fi]) @@ -1365,10 +1365,10 @@ index 7a79890..9ea602f 100644 2.7.4 -From d7f5a846ebc198214364fb810880778f5ff16d46 Mon Sep 17 00:00:00 2001 +From 5d7312323a17f7d7dd495a1459905dff8f09880d Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 22 Feb 2017 17:45:14 -0800 -Subject: [PATCH 23/32] Add an option to disable IDLE +Subject: [PATCH 23/33] 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. @@ -1383,10 +1383,10 @@ Signed-off-by: Andrey Smirnov 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index d703c36..b8e9388 100644 +index 6b262f4..31dc7c3 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1219,7 +1219,9 @@ bininstall: altbininstall +@@ -1238,7 +1238,9 @@ bininstall: altbininstall -rm -f $(DESTDIR)$(LIBPC)/python3.pc (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc) -rm -f $(DESTDIR)$(BINDIR)/idle3 @@ -1396,7 +1396,7 @@ index d703c36..b8e9388 100644 -rm -f $(DESTDIR)$(BINDIR)/pydoc3 ifeq (@PYDOC@,yes) (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) -@@ -1264,7 +1266,6 @@ LIBSUBDIRS= site-packages \ +@@ -1283,7 +1285,6 @@ LIBSUBDIRS= site-packages \ html json http dbm xmlrpc \ logging csv wsgiref urllib \ ctypes ctypes/macholib \ @@ -1404,7 +1404,7 @@ index d703c36..b8e9388 100644 distutils distutils/command \ importlib \ turtledemo \ -@@ -1350,6 +1351,10 @@ ifeq (@EXPAT@,yes) +@@ -1369,6 +1370,10 @@ ifeq (@EXPAT@,yes) LIBSUBDIRS += $(XMLLIBSUBDIRS) endif @@ -1416,10 +1416,10 @@ index d703c36..b8e9388 100644 LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2 TESTSUBDIRS += lib2to3/tests \ diff --git a/configure.ac b/configure.ac -index 9ea602f..047d080 100644 +index f902d14..799ebd6 100644 --- a/configure.ac +++ b/configure.ac -@@ -3233,6 +3233,12 @@ AC_ARG_ENABLE(lib2to3, +@@ -3300,6 +3300,12 @@ AC_ARG_ENABLE(lib2to3, AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]), [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ]) @@ -1433,10 +1433,10 @@ index 9ea602f..047d080 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 27c4e1a..c0995ed 100644 +index 85d823f..f377381 100644 --- a/setup.py +++ b/setup.py -@@ -2333,11 +2333,13 @@ def main(): +@@ -2377,11 +2377,13 @@ def main(): import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) @@ -1455,10 +1455,10 @@ index 27c4e1a..c0995ed 100644 2.7.4 -From 7dfb61f2454472b8acf1e8fad3867ba91c20273f Mon Sep 17 00:00:00 2001 +From 9395a0bd66319ef5745902bcd4e8dda0bd2b78bb Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 23 Dec 2015 11:51:31 +0100 -Subject: [PATCH 24/32] Add an option to disable decimal +Subject: [PATCH 24/33] Add an option to disable decimal This patch replaces the existing --with-system-libmpdec option with a --with-libmpdec={system,builtin,none} option, which allows to tell @@ -1474,10 +1474,10 @@ Signed-off-by: Adam Duskett 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac -index 047d080..8fd595e 100644 +index 799ebd6..6f674d8 100644 --- a/configure.ac +++ b/configure.ac -@@ -2956,13 +2956,20 @@ fi +@@ -3020,13 +3020,20 @@ fi AC_SUBST(LIBFFI_INCLUDEDIR) # Check for use of the system libmpdec library @@ -1504,10 +1504,10 @@ index 047d080..8fd595e 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 c0995ed..1a7085c 100644 +index f377381..aadfb75 100644 --- a/setup.py +++ b/setup.py -@@ -2010,7 +2010,7 @@ class PyBuildExt(build_ext): +@@ -2054,7 +2054,7 @@ class PyBuildExt(build_ext): def _decimal_ext(self): extra_compile_args = [] undef_macros = [] @@ -1520,10 +1520,10 @@ index c0995ed..1a7085c 100644 2.7.4 -From 27bbc7b6892807d152f1ce808eadfa87fc0e9349 Mon Sep 17 00:00:00 2001 +From b34d8abb5aa757839df0b6caefd4100a0d1710b3 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 23 Dec 2015 11:51:58 +0100 -Subject: [PATCH 25/32] Add an option to disable the ossaudiodev module +Subject: [PATCH 25/33] Add an option to disable the ossaudiodev module Signed-off-by: Thomas Petazzoni --- @@ -1531,10 +1531,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac -index 8fd595e..2287a3e 100644 +index 6f674d8..7d438ed 100644 --- a/configure.ac +++ b/configure.ac -@@ -2971,6 +2971,12 @@ else +@@ -3035,6 +3035,12 @@ else fi AC_SUBST(MPDEC) @@ -1551,10 +1551,10 @@ index 8fd595e..2287a3e 100644 2.7.4 -From e335230b4e7f82a4e8aa628fd41cc0bac4cbb58b Mon Sep 17 00:00:00 2001 +From 3b5c8b96475c047ae59bea38285f53f6fa38a3ae Mon Sep 17 00:00:00 2001 From: Nicolas Cavallari Date: Wed, 22 Feb 2017 17:55:59 -0800 -Subject: [PATCH 26/32] Add an option to disable openssl support. +Subject: [PATCH 26/33] Add an option to disable openssl support. Signed-off-by: Nicolas Cavallari --- @@ -1562,10 +1562,10 @@ Signed-off-by: Nicolas Cavallari 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac -index 2287a3e..5433aaa 100644 +index 7d438ed..32657f5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3210,6 +3210,12 @@ AC_ARG_ENABLE(unicodedata, +@@ -3277,6 +3277,12 @@ AC_ARG_ENABLE(unicodedata, DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata" fi]) @@ -1582,10 +1582,10 @@ index 2287a3e..5433aaa 100644 2.7.4 -From 3f17b4b32b490f451d20e88f59ad0d12b1a77aa7 Mon Sep 17 00:00:00 2001 +From d97fb86e2794a44076462a6e07829bc4df162284 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 7 Mar 2017 23:29:05 +0100 -Subject: [PATCH 27/32] Add an option to disable the readline module +Subject: [PATCH 27/33] Add an option to disable the readline module Signed-off-by: Thomas Petazzoni --- @@ -1593,10 +1593,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac -index 5433aaa..1bfade6 100644 +index 32657f5..d568f25 100644 --- a/configure.ac +++ b/configure.ac -@@ -3216,6 +3216,12 @@ AC_ARG_ENABLE(openssl, +@@ -3283,6 +3283,12 @@ AC_ARG_ENABLE(openssl, DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl _ssl _hashlib" fi]) @@ -1613,10 +1613,10 @@ index 5433aaa..1bfade6 100644 2.7.4 -From fbe47fb2f70635ffeb7b44d9af23cc6352ade250 Mon Sep 17 00:00:00 2001 +From 0d2cf7a3c9a43debfef8d9eb4dae68df145ff41c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 7 Mar 2017 23:31:11 +0100 -Subject: [PATCH 28/32] Add options to disable zlib, bzip2 and xz modules +Subject: [PATCH 28/33] Add options to disable zlib, bzip2 and xz modules Signed-off-by: Thomas Petazzoni --- @@ -1624,10 +1624,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 18 insertions(+) diff --git a/configure.ac b/configure.ac -index 1bfade6..b022460 100644 +index d568f25..6d8c6ec 100644 --- a/configure.ac +++ b/configure.ac -@@ -3222,6 +3222,24 @@ AC_ARG_ENABLE(readline, +@@ -3289,6 +3289,24 @@ AC_ARG_ENABLE(readline, DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} readline" fi]) @@ -1656,10 +1656,10 @@ index 1bfade6..b022460 100644 2.7.4 -From 3ce895014bc7a43e4af09268037ca3ae11ab5434 Mon Sep 17 00:00:00 2001 +From 06fe0264238cc01fc8e89634b3c3849864bc9bf1 Mon Sep 17 00:00:00 2001 From: Matt Weber Date: Fri, 6 Oct 2017 09:54:15 -0500 -Subject: [PATCH 29/32] python-config.sh: don't reassign ${prefix} +Subject: [PATCH 29/33] python-config.sh: don't reassign ${prefix} When prefix is set to a path like /usr during crossbuild the sed operations end up executing twice, once for the prefix @@ -1685,7 +1685,7 @@ Signed-off-by: Matthew Weber 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in -index 9e259c0..8b249d9 100644 +index db91bd6..c12640b 100644 --- a/Misc/python-config.sh.in +++ b/Misc/python-config.sh.in @@ -31,7 +31,7 @@ prefix_real=$(installed_prefix "$0") @@ -1697,7 +1697,7 @@ index 9e259c0..8b249d9 100644 exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#") exec_prefix_real=${prefix_real} includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#") -@@ -49,7 +49,7 @@ LINKFORSHARED="@LINKFORSHARED@" +@@ -48,7 +48,7 @@ LDLIBRARY="@LDLIBRARY@" OPT="@OPT@" PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" LDVERSION="@LDVERSION@" @@ -1710,10 +1710,10 @@ index 9e259c0..8b249d9 100644 2.7.4 -From cacbe32e00706bd30ac85c61c3ef7968e7842daa Mon Sep 17 00:00:00 2001 +From 15f1dd515d45edbaff26b77c8bb144cd5ee8ea7d Mon Sep 17 00:00:00 2001 From: Adam Duskett Date: Fri, 20 Jul 2018 10:17:39 -0400 -Subject: [PATCH 30/32] Fix cross compiling the uuid module +Subject: [PATCH 30/33] Fix cross compiling the uuid module Python 3.7 has a new _uuid module, however, the include directory search path for uuid.h is hardcoded to /usr/include/uuid, which should @@ -1732,10 +1732,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py -index 1a7085c..f33d0b5 100644 +index aadfb75..94a327b 100644 --- a/setup.py +++ b/setup.py -@@ -1627,7 +1627,8 @@ class PyBuildExt(build_ext): +@@ -1671,7 +1671,8 @@ class PyBuildExt(build_ext): missing.append('_tkinter') # Build the _uuid module if possible @@ -1749,10 +1749,10 @@ index 1a7085c..f33d0b5 100644 2.7.4 -From 2fa6601532a26fa443af815515fb4606e3ed365c Mon Sep 17 00:00:00 2001 +From 3b7a6b54a04564ba05f8f628a0114e45d1c1ea77 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 18 Aug 2018 10:54:56 +0200 -Subject: [PATCH 31/32] Add an option to disable uuid module +Subject: [PATCH 31/33] Add an option to disable uuid module Signed-off-by: Thomas Petazzoni --- @@ -1760,10 +1760,10 @@ Signed-off-by: Thomas Petazzoni 1 file changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac -index b022460..505b7c9 100644 +index 6d8c6ec..91c55da 100644 --- a/configure.ac +++ b/configure.ac -@@ -3258,6 +3258,15 @@ if test "$CURSES" = "no"; then +@@ -3325,6 +3325,15 @@ if test "$CURSES" = "no"; then DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel" fi @@ -1783,10 +1783,10 @@ index b022460..505b7c9 100644 2.7.4 -From 09ce21cc094ef0545eda45299474365d910cb91f Mon Sep 17 00:00:00 2001 -From: Adam Duskett +From b2bf4f1cf6141ff19ef3a6e61d054dabea83d3c9 Mon Sep 17 00:00:00 2001 +From: Adam Duskett Date: Thu, 16 Aug 2018 14:52:37 -0700 -Subject: [PATCH 32/32] fix building on older distributions +Subject: [PATCH 32/33] fix building on older distributions Python > 3.6.3 calls os.replace in the update_file.py script, during the regen-importlib phase of the build process. @@ -1800,7 +1800,7 @@ safe to change os.replace back to os.rename. This change fixes building on older systems such as CentOS7, that only come with python 2. -Signed-off-by: Adam Duskett +Signed-off-by: Adam Duskett --- Tools/scripts/update_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -1821,3 +1821,52 @@ index 224585c..ef458c0 100644 -- 2.7.4 + +From b532835bd1f1d169e2339f0b1324558c153cac99 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Fri, 2 Aug 2019 15:53:16 +0200 +Subject: [PATCH 33/33] configure.ac: fixup $CC --print-multiarch output for + musl/uclibc GCC 8+ toolchains + +GCC commit 6834b83784dcf0364eb820e8 (multiarch support for non-glibc linux +systems), which is part of GCC 8+, changed the multiarch logic to use +$arch-linux-musl / $arch-linux-uclibc rather than $arch-linux-gnu. + +This then causes the python3 configure script to error out: + +checking for the platform triplet based on compiler characteristics... powerpc-linux-gnu +configure: error: internal configure error for the platform triplet, please file a bug report + +http://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05b + +As it requires that the --print-multiarch output (if not empty) matches the +deduced triplet (which always uses -linux-gnu). + +It isn't quite clear why --print-multiarch returns something for a +non-multiarch toolchain on some architectures (E.G. PowerPC), but as a +workaround, rewrite the --print-multiarch output to match older GCC versions +to keep the configure script happy. + +Signed-off-by: Peter Korsgaard +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 91c55da..371e199 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -724,7 +724,9 @@ then + fi + + +-MULTIARCH=$($CC --print-multiarch 2>/dev/null) ++# GCC 8+ returns $arch-linux-{musl,uclibc} for musl/uClibc based ++# toolchains confusing python. Fix that up ++MULTIARCH=$($CC --print-multiarch 2>/dev/null | sed -E 's/-linux-(musl|uclibc)*$/-linux-gnu/') + AC_SUBST(MULTIARCH) + + AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) +-- +2.7.4 +