Revert "package/python3: bump version to 3.12.1"

This reverts commit 36e635d2d5.

Python 3.12 is still causing too many build failures, so revert for 2024.02.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Peter Korsgaard 2024-02-24 11:34:40 +01:00
parent 7bae4ea6ee
commit fb6274f5de
37 changed files with 1038 additions and 456 deletions

View File

@ -1075,21 +1075,35 @@ package/python-web2py/S51web2py Shellcheck Variables
package/python-ws4py/0001-Adjust-ws4py-for-Python-3.7-syntax.patch Upstream package/python-ws4py/0001-Adjust-ws4py-for-Python-3.7-syntax.patch Upstream
package/python3/0001-Make-the-build-of-pyc-files-conditional.patch Upstream package/python3/0001-Make-the-build-of-pyc-files-conditional.patch Upstream
package/python3/0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch Upstream package/python3/0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch Upstream
package/python3/0003-Adjust-library-header-paths-for-cross-compilation.patch Upstream package/python3/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch Upstream
package/python3/0004-Serial-ioctl-workaround.patch Upstream package/python3/0004-Adjust-library-header-paths-for-cross-compilation.patch Upstream
package/python3/0005-Misc-python-config.sh.in-ensure-sed-invocations-only.patch Upstream package/python3/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch Upstream
package/python3/0006-Add-an-option-to-disable-pydoc.patch Upstream package/python3/0006-Don-t-add-multiarch-paths.patch Upstream
package/python3/0007-Add-an-option-to-disable-lib2to3.patch Upstream package/python3/0007-Abort-on-failed-module-build.patch Upstream
package/python3/0008-Add-an-option-to-disable-IDLE.patch Upstream package/python3/0008-Serial-ioctl-workaround.patch Upstream
package/python3/0009-python-config.sh-don-t-reassign-prefix.patch Upstream package/python3/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch Upstream
package/python3/0010-configure.ac-move-PY_STDLIB_MOD_SET_NA-further-up.patch Upstream package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch Upstream
package/python3/0011-Add-option-to-disable-the-sqlite3-module.patch Upstream package/python3/0011-Add-an-option-to-disable-pydoc.patch Upstream
package/python3/0012-Add-an-option-to-disable-the-tk-module.patch Upstream package/python3/0012-Add-an-option-to-disable-lib2to3.patch Upstream
package/python3/0013-Add-an-option-to-disable-the-curses-module.patch Upstream package/python3/0013-Add-option-to-disable-the-sqlite3-module.patch Upstream
package/python3/0014-Add-an-option-to-disable-expat.patch Upstream package/python3/0014-Add-an-option-to-disable-the-tk-module.patch Upstream
package/python3/0015-fix-building-on-older-distributions.patch Upstream package/python3/0015-Add-an-option-to-disable-the-curses-module.patch Upstream
package/python3/0016-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch Upstream package/python3/0016-Add-an-option-to-disable-expat.patch Upstream
package/python3/0017-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch Upstream package/python3/0017-Add-an-option-to-disable-CJK-codecs.patch Upstream
package/python3/0018-Add-an-option-to-disable-NIS.patch Upstream
package/python3/0019-Add-an-option-to-disable-unicodedata.patch Upstream
package/python3/0020-Add-an-option-to-disable-IDLE.patch Upstream
package/python3/0021-Add-an-option-to-disable-decimal.patch Upstream
package/python3/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch Upstream
package/python3/0023-Add-an-option-to-disable-openssl-support.patch Upstream
package/python3/0024-Add-an-option-to-disable-the-readline-module.patch Upstream
package/python3/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch Upstream
package/python3/0026-python-config.sh-don-t-reassign-prefix.patch Upstream
package/python3/0027-Add-an-option-to-disable-uuid-module.patch Upstream
package/python3/0028-fix-building-on-older-distributions.patch Upstream
package/python3/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch Upstream
package/python3/0030-Add-an-option-to-disable-the-berkeleydb-module.patch Upstream
package/python3/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch Upstream
package/qemu/0001-tests-fp-disable-fp-bench-build-by-default.patch Upstream package/qemu/0001-tests-fp-disable-fp-bench-build-by-default.patch Upstream
package/qemu/0002-softmmu-qemu-seccomp.c-add-missing-header-for-CLONE_.patch Upstream package/qemu/0002-softmmu-qemu-seccomp.c-add-missing-header-for-CLONE_.patch Upstream
package/qextserialport/0001-Create-a-main-include-file-QExtSerialPort.patch Upstream package/qextserialport/0001-Create-a-main-include-file-QExtSerialPort.patch Upstream

View File

@ -1,4 +1,4 @@
From f0305dc99c0c723912bab7058f4b569f8c666dea Mon Sep 17 00:00:00 2001 From 51ed7f93cc0333efa8fccd9b88db713c48993df9 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 22 Feb 2017 16:21:31 -0800 Date: Wed, 22 Feb 2017 16:21:31 -0800
Subject: [PATCH] Make the build of pyc files conditional Subject: [PATCH] Make the build of pyc files conditional
@ -9,40 +9,38 @@ the compilation of pyc.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[ Andrey Smrinov: ported to Python 3.6 ] [ Andrey Smrinov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
[ Adam Duskett: ported to Python 3.12.0 ]
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
--- ---
Makefile.pre.in | 2 ++ Makefile.pre.in | 2 ++
configure.ac | 6 ++++++ configure.ac | 6 ++++++
2 files changed, 8 insertions(+) 2 files changed, 8 insertions(+)
diff --git a/Makefile.pre.in b/Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in
index dd5e69f7ab1..d7634f5b94a 100644 index 8fbcd7ac17..2957c8e5a1 100644
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -2320,6 +2320,7 @@ libinstall: all $(srcdir)/Modules/xxmodule.c @@ -2078,6 +2078,7 @@ libinstall: all $(srcdir)/Modules/xxmodule.c
$(DESTDIR)$(LIBDEST); \ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt $(DESTDIR)$(LIBDEST)/distutils/tests ; \
@ # Build PYC files for the 3 optimization levels (0, 1, 2) fi
+ifeq (@PYC_BUILD@,yes) +ifeq (@PYC_BUILD@,yes)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-o 0 -o 1 -o 2 $(COMPILEALL_OPTS) -d $(LIBDEST) -f \ -j0 -d $(LIBDEST) -f \
@@ -2329,6 +2330,7 @@ libinstall: all $(srcdir)/Modules/xxmodule.c @@ -2105,6 +2106,7 @@ libinstall: all $(srcdir)/Modules/xxmodule.c
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
-o 0 -o 1 -o 2 $(COMPILEALL_OPTS) -d $(LIBDEST)/site-packages -f \ -j0 -d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+endif +endif
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index 384718db1f0..a53c6fa9e08 100644 index ab5e1de6fa..0cf89ed641 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -1479,6 +1479,12 @@ fi @@ -1441,6 +1441,12 @@ fi
AC_MSG_CHECKING([LDLIBRARY]) AC_MSG_CHECKING(LDLIBRARY)
+AC_SUBST(PYC_BUILD) +AC_SUBST(PYC_BUILD)
+ +
@ -54,5 +52,5 @@ index 384718db1f0..a53c6fa9e08 100644
# library that we build, but we do not want to link against it (we # 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 # will find it with a -framework option). For this reason there is an
-- --
2.43.0 2.34.1

View File

@ -1,4 +1,4 @@
From 2b524755e1e66c67f37f83b60a09fe017fd50c8c Mon Sep 17 00:00:00 2001 From b180ab302e2a82be239af334382436628b81381e Mon Sep 17 00:00:00 2001
From: Vanya Sergeev <vsergeev@gmail.com> From: Vanya Sergeev <vsergeev@gmail.com>
Date: Wed, 23 Dec 2015 11:30:33 +0100 Date: Wed, 23 Dec 2015 11:30:33 +0100
Subject: [PATCH] Disable buggy_getaddrinfo configure test when cross-compiling 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(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index a53c6fa9e08..e515c2a510b 100644 index 0cf89ed641..830885fcb3 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -5402,7 +5402,7 @@ fi])) @@ -5086,7 +5086,7 @@ fi]))
dnl if ac_cv_func_getaddrinfo dnl if ac_cv_func_getaddrinfo
]) ])
@ -23,5 +23,5 @@ index a53c6fa9e08..e515c2a510b 100644
AS_VAR_IF([ipv6], [yes], [ AS_VAR_IF([ipv6], [yes], [
AC_MSG_ERROR([m4_normalize([ AC_MSG_ERROR([m4_normalize([
-- --
2.43.0 2.34.1

View File

@ -0,0 +1,108 @@
From 8e02cebdac536dfb6748da2c50656a26f70d9da7 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
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
external libraries (sqlite, tk, etc.) or are relatively big and not
necessarly always useful (CJK codecs for example). By extensions, we
mean part of Python modules that are written in C and therefore
compiled to binary code.
Therefore, we introduce a small infrastructure that allows to disable
some of those extensions. This can be done inside the configure.ac by
adding values to the DISABLED_EXTENSIONS variable (which is a
word-separated list of extensions).
The implementation works as follow :
* configure.ac defines a DISABLED_EXTENSIONS variable, which is
substituted (so that when Makefile.pre is generated from
Makefile.pre.in, the value of the variable is substituted). For
now, this DISABLED_EXTENSIONS variable is empty, later patches will
use it.
* Makefile.pre.in passes the DISABLED_EXTENSIONS value down to the
variables passed in the environment when calling the setup.py
script that actually builds and installs those extensions.
* setup.py is modified so that the existing "disabled_module_list" is
filled with those pre-disabled extensions listed in
DISABLED_EXTENSIONS.
Patch ported to python2.7 by Maxime Ripard <ripard@archos.com>, and
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(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 2957c8e5a1..c1cfb96767 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -239,6 +239,8 @@ FILEMODE= 644
# configure script arguments
CONFIG_ARGS= @CONFIG_ARGS@
+# disabled extensions
+DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
# Subdirectories with code
SRCDIRS= @SRCDIRS@
@@ -739,6 +741,7 @@ sharedmods: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt @LIBMPDEC_INTERNAL@ @LIBEXPA
*) quiet="";; \
esac; \
echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
@@ -2228,7 +2231,8 @@ libainstall: all python-config
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: all
- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
+ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
diff --git a/configure.ac b/configure.ac
index 830885fcb3..5a6a1fe608 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3562,6 +3562,8 @@ LIBS="$withval $LIBS"
],
[AC_MSG_RESULT(no)])
+AC_SUBST(DISABLED_EXTENSIONS)
+
# Check for use of the system expat library
AC_MSG_CHECKING(for --with-system-expat)
AC_ARG_WITH(system_expat,
diff --git a/setup.py b/setup.py
index 15d0d4576a..e496ee34c2 100644
--- a/setup.py
+++ b/setup.py
@@ -56,7 +56,10 @@
# This global variable is used to hold the list of modules to be disabled.
-DISABLED_MODULE_LIST = []
+try:
+ DISABLED_MODULE_LIST = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
+except KeyError:
+ DISABLED_MODULE_LIST = list()
# --list-module-names option used by Tools/scripts/generate_module_names.py
LIST_MODULE_NAMES = False
--
2.34.1

View File

@ -1,4 +1,4 @@
From 9f58bc7a648990d89258191c39651c075ce1c1c7 Mon Sep 17 00:00:00 2001 From 132b9dca3bb4d4682f7e318648ce11e1abb31b62 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:33:14 +0100 Date: Wed, 23 Dec 2015 11:33:14 +0100
Subject: [PATCH] Adjust library/header paths for cross-compilation Subject: [PATCH] Adjust library/header paths for cross-compilation
@ -15,19 +15,34 @@ values, and get correct header/library paths when cross-compiling
third-party Python modules. third-party Python modules.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[ Adam Duskett: ported to Python 3.10.0 ]
Signed-off-by: Adam Duskett <aduskett@gmail.com> Signed-off-by: Adam Duskett <aduskett@gmail.com>
[ Adam Duskett: ported to Python 3.12.1 ] Refresh for 3.10.0
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
--- ---
Lib/sysconfig.py | 15 +++++++++++---- Lib/distutils/command/build_ext.py | 5 ++++-
1 file changed, 11 insertions(+), 4 deletions(-) Lib/sysconfig.py | 15 +++++++++++----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index f287b34998..298234d6a1 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -234,7 +234,10 @@ def finalize_options(self):
if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
if not sysconfig.python_build:
# building third party extensions
- self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
+ libdir = sysconfig.get_config_var('LIBDIR')
+ if "_python_sysroot" in os.environ:
+ libdir = os.environ.get("_python_sysroot") + libdir
+ self.library_dirs.append(libdir)
else:
# building python standard extensions
self.library_dirs.append('.')
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 122d441bd19..a4922c429a3 100644 index ebe3711827..6328ec41af 100644
--- a/Lib/sysconfig.py --- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py +++ b/Lib/sysconfig.py
@@ -169,10 +169,17 @@ def joinuser(*args): @@ -168,10 +168,17 @@ def joinuser(*args):
_PY_VERSION = sys.version.split()[0] _PY_VERSION = sys.version.split()[0]
_PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}' _PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}'
_PY_VERSION_SHORT_NO_DOT = f'{sys.version_info[0]}{sys.version_info[1]}' _PY_VERSION_SHORT_NO_DOT = f'{sys.version_info[0]}{sys.version_info[1]}'
@ -46,9 +61,9 @@ index 122d441bd19..a4922c429a3 100644
+ _EXEC_PREFIX = os.path.normpath(sys.exec_prefix) + _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+ _BASE_PREFIX = os.path.normpath(sys.base_prefix) + _BASE_PREFIX = os.path.normpath(sys.base_prefix)
+ _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) + _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
# Mutex guarding initialization of _CONFIG_VARS.
_CONFIG_VARS_LOCK = threading.RLock()
_CONFIG_VARS = None _CONFIG_VARS = None
_USER_BASE = None
-- --
2.43.0 2.34.1

View File

@ -0,0 +1,31 @@
From 5d13e384b30a2c0b1c7b65718590b7fb0c3ba55e 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
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/setup.py b/setup.py
index e496ee34c2..1904898165 100644
--- a/setup.py
+++ b/setup.py
@@ -1107,12 +1107,9 @@ def detect_readline_curses(self):
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
readline_libs.append(curses_library)
- elif self.compiler.find_library_file(self.lib_dirs +
- ['/usr/lib/termcap'],
- 'termcap'):
+ elif self.compiler.find_library_file(self.lib_dirs, 'termcap'):
readline_libs.append('termcap')
self.add(Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
libraries=readline_libs))
else:
self.missing.append('readline')
--
2.34.1

View File

@ -1,84 +0,0 @@
From 3439c04c1ea45c47c658c7f12042a278477a87ed Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
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
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>
[ Adam Duskett: ported to Python 3.10.0 ]
Signed-off-by: Adam Duskett <aduskett@gmail.com>
[ Adam Duskett: ported to Python 3.12.1 ]
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
Makefile.pre.in | 9 ++++++++-
configure.ac | 6 ++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index d7634f5b94a..ecf1b995c01 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -2048,7 +2048,9 @@ bininstall: commoninstall altbininstall
-rm -f $(DESTDIR)$(BINDIR)/idle3
(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
+ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
+endif
-rm -f $(DESTDIR)$(BINDIR)/2to3
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
@@ -2100,7 +2102,6 @@ LIBSUBDIRS= asyncio \
lib2to3 lib2to3/fixes lib2to3/pgen2 \
logging \
multiprocessing multiprocessing/dummy \
- pydoc_data \
re \
site-packages \
sqlite3 \
@@ -2248,6 +2249,10 @@ TESTSUBDIRS= idlelib/idle_test \
COMPILEALL_OPTS=-j0
+ifeq (@PYDOC@,yes)
+LIBSUBDIRS += pydoc_data
+endif
+
TEST_MODULES=@TEST_MODULES@
.PHONY: libinstall
@@ -2462,7 +2467,9 @@ libainstall: all scripts
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
$(INSTALL_SCRIPT) $(SCRIPT_2TO3) $(DESTDIR)$(BINDIR)/2to3-$(VERSION)
$(INSTALL_SCRIPT) $(SCRIPT_IDLE) $(DESTDIR)$(BINDIR)/idle$(VERSION)
+ifeq (@PYDOC@,yes)
$(INSTALL_SCRIPT) $(SCRIPT_PYDOC) $(DESTDIR)$(BINDIR)/pydoc$(VERSION)
+endif
@if [ -s Modules/python.exp -a \
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
echo; echo "Installing support files for building shared extension modules on AIX:"; \
diff --git a/configure.ac b/configure.ac
index e515c2a510b..277a16a903e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4485,6 +4485,12 @@ AS_VAR_IF([posix_threads], [stub], [
AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support])
])
+AC_SUBST(PYDOC)
+
+AC_ARG_ENABLE(pydoc,
+ AS_HELP_STRING([--disable-pydoc], [disable pydoc]),
+ [ PYDOC="${enableval}" ], [ PYDOC=yes ])
+
# Check for enable-ipv6
AH_TEMPLATE([ENABLE_IPV6], [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
--
2.43.0

View File

@ -0,0 +1,37 @@
From ad463b5d58ae79f69b011fb048861bd874d34369 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
The add_multiarch_paths() function leads, in certain build
environments, to the addition of host header paths to the CFLAGS,
which is not appropriate for cross-compilation. This patch fixes that
by simply removing the call to add_multiarch_paths() when we're
cross-compiling.
Investigation done by David <buildroot-2014@inbox.com>.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 1904898165..32294546b6 100644
--- a/setup.py
+++ b/setup.py
@@ -852,10 +852,10 @@ def configure_compiler(self):
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')
+ self.add_multiarch_paths()
# only change this for cross builds for 3.3, issues on Mageia
if CROSS_COMPILING:
self.add_cross_compiling_paths()
- self.add_multiarch_paths()
self.add_ldflags_cppflags()
def init_inc_lib_dirs(self):
--
2.34.1

View File

@ -0,0 +1,30 @@
From 60b1664a7acebadb1a3d6df871145147f33b5afe 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
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
nice behavior, so this patch changes setup.py to abort with an error,
so that the build issue is clearly noticeable.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/setup.py b/setup.py
index 32294546b6..0e04944ce0 100644
--- a/setup.py
+++ b/setup.py
@@ -579,6 +579,7 @@ def print_three_column(lst):
print("Failed to build these modules:")
print_three_column(failed)
print()
+ sys.exit(1)
if self.failed_on_import:
failed = self.failed_on_import[:]
--
2.34.1

View File

@ -1,4 +1,4 @@
From 52a85666f956ee11d5d165447dcc108e9034d78c Mon Sep 17 00:00:00 2001 From 90f3075b629d90d942da1d22ef7563f7149f4f6c Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch@tkos.co.il> From: Baruch Siach <baruch@tkos.co.il>
Date: Wed, 23 Dec 2015 11:44:02 +0100 Date: Wed, 23 Dec 2015 11:44:02 +0100
Subject: [PATCH] Serial ioctl() workaround Subject: [PATCH] Serial ioctl() workaround
@ -15,7 +15,7 @@ Signed-off-by: Baruch Siach <baruch@tkos.co.il>
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/Modules/termios.c b/Modules/termios.c diff --git a/Modules/termios.c b/Modules/termios.c
index 402e6ac908a..688afd78994 100644 index 354e5ca18d..c08957c500 100644
--- a/Modules/termios.c --- a/Modules/termios.c
+++ b/Modules/termios.c +++ b/Modules/termios.c
@@ -15,7 +15,9 @@ @@ -15,7 +15,9 @@
@ -29,5 +29,5 @@ index 402e6ac908a..688afd78994 100644
/* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR, /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
* MDTR, MRI, and MRTS (apparently used internally by some things * MDTR, MRI, and MRTS (apparently used internally by some things
-- --
2.43.0 2.34.1

View File

@ -0,0 +1,35 @@
From 2439bd2ed5dbdd7e5fda15adefd0f6f1b047ec1b 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
cross-compilation
The copy_scripts() method in distutils copies the scripts listed in
the setup file and adjusts the first line to refer to the current
Python interpreter. When cross-compiling, this means that the adjusted
shebang refers to the host Python interpreter.
This patch modifies copy_scripts() to preserve the shebang when
cross-compilation is detected.
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
---
Lib/distutils/command/build_scripts.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py
index ccc70e6465..d6d54195c1 100644
--- a/Lib/distutils/command/build_scripts.py
+++ b/Lib/distutils/command/build_scripts.py
@@ -91,7 +91,7 @@ def copy_scripts(self):
adjust = True
post_interp = match.group(1) or b''
- if adjust:
+ if adjust and not '_python_sysroot' in os.environ:
log.info("copying and adjusting %s -> %s", script,
self.build_dir)
updated_files.append(outfile)
--
2.34.1

View File

@ -1,4 +1,4 @@
From 600abaceba40d3f6db03d5f12f1f33b18a8f4348 Mon Sep 17 00:00:00 2001 From 55ef5552e4ee60266e3299f253bec3b13785e585 Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com> From: Peter Korsgaard <peter@korsgaard.com>
Date: Thu, 20 Nov 2014 13:24:59 +0100 Date: Thu, 20 Nov 2014 13:24:59 +0100
Subject: [PATCH] Misc/python-config.sh.in: ensure sed invocations only match 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, 7 insertions(+), 6 deletions(-) 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
index 2602fe24c04..a1bc3cd5f7a 100644 index 2602fe24c0..a1bc3cd5f7 100644
--- a/Misc/python-config.sh.in --- a/Misc/python-config.sh.in
+++ b/Misc/python-config.sh.in +++ b/Misc/python-config.sh.in
@@ -24,18 +24,19 @@ installed_prefix () @@ -24,18 +24,19 @@ installed_prefix ()
@ -63,5 +63,5 @@ index 2602fe24c04..a1bc3cd5f7a 100644
PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
-- --
2.43.0 2.34.1

View File

@ -1,44 +0,0 @@
From fddea49ba296fa5d265ec50f407632d94cca6dcf Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Tue, 6 Feb 2024 22:46:59 +0100
Subject: [PATCH] configure.ac: move PY_STDLIB_MOD_SET_NA further up
We will need PY_STDLIB_MOD_SET_NA in next patches further up in the
configure.ac script.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
configure.ac | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 306127274e0..1bb63cbd5b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,11 @@ AC_DEFUN([PY_CHECK_EMSCRIPTEN_PORT], [
AS_VAR_POPDEF([py_libs])
])
+AC_DEFUN([PY_STDLIB_MOD_SET_NA], [
+ m4_foreach([mod], [$@], [
+ AS_VAR_SET([py_cv_module_]mod, [n/a])])
+])
+
AC_SUBST([BASECPPFLAGS])
if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
# If we're building out-of-tree, we need to make sure the following
@@ -7232,11 +7237,6 @@ AC_ARG_ENABLE([test-modules],
AC_MSG_RESULT([$TEST_MODULES])
AC_SUBST([TEST_MODULES])
-AC_DEFUN([PY_STDLIB_MOD_SET_NA], [
- m4_foreach([mod], [$@], [
- AS_VAR_SET([py_cv_module_]mod, [n/a])])
-])
-
# stdlib not available
dnl Modules that are not available on some platforms
dnl AIX has shadow passwords, but access is not via getspent()
--
2.43.0

View File

@ -0,0 +1,100 @@
From 38b7f7949258aeadf8bc45525be91340bb732a2a Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
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
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>
[ Adam Duskett: ported to Python 3.10.0 ]
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Makefile.pre.in | 7 ++++++-
configure.ac | 6 ++++++
setup.py | 9 +++++++--
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index c1cfb96767..403380e181 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1864,7 +1864,9 @@ bininstall: altbininstall
-rm -f $(DESTDIR)$(BINDIR)/idle3
(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
+ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
+endif
-rm -f $(DESTDIR)$(BINDIR)/2to3
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
@@ -1915,7 +1917,6 @@ LIBSUBDIRS= asyncio \
lib2to3 lib2to3/fixes lib2to3/pgen2 \
logging \
multiprocessing multiprocessing/dummy \
- pydoc_data \
re \
site-packages \
sqlite3 \
@@ -2008,6 +2009,10 @@ TESTSUBDIRS= ctypes/test \
tkinter/test/test_ttk \
unittest/test unittest/test/testmock
+ifeq (@PYDOC@,yes)
+LIBSUBDIRS += pydoc_data
+endif
+
TEST_MODULES=@TEST_MODULES@
libinstall: all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
diff --git a/configure.ac b/configure.ac
index 5a6a1fe608..f68ea72321 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4171,6 +4171,12 @@ AS_VAR_IF([posix_threads], [stub], [
AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support])
])
+AC_SUBST(PYDOC)
+
+AC_ARG_ENABLE(pydoc,
+ AS_HELP_STRING([--disable-pydoc], [disable pydoc]),
+ [ PYDOC="${enableval}" ], [ PYDOC=yes ])
+
# Check for enable-ipv6
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 0e04944ce0..3e55f5b2e0 100644
--- a/setup.py
+++ b/setup.py
@@ -1593,6 +1593,12 @@ class DummyProcess:
# turn off warnings when deprecated modules are imported
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
+
+ scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3',
+ 'Lib/smtpd.py']
+ if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
+ scripts += [ 'Tools/scripts/pydoc3' ]
+
setup(# PyPI Metadata (PEP 301)
name = "Python",
version = sys.version.split()[0],
@@ -1617,8 +1623,7 @@ class DummyProcess:
# 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"]
+ scripts = scripts
)
# --install-platlib
--
2.34.1

View File

@ -1,4 +1,4 @@
From d53e271be8952fd95a593741f91bf0ef2a7e5f02 Mon Sep 17 00:00:00 2001 From 0e4f0a525ea0a68f6d4c5349c301da2e9b0c8ac9 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 22 Feb 2017 17:15:31 -0800 Date: Wed, 22 Feb 2017 17:15:31 -0800
Subject: [PATCH] Add an option to disable lib2to3 Subject: [PATCH] Add an option to disable lib2to3
@ -14,18 +14,17 @@ Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com> Signed-off-by: Adam Duskett <aduskett@gmail.com>
[ Bernd Kuhls: ported to Python 3.11.4] [ Bernd Kuhls: ported to Python 3.11.4]
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[ Adam Duskett: ported to Python 3.12.1 ]
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
--- ---
Makefile.pre.in | 19 ++++++++++++++----- Makefile.pre.in | 17 ++++++++++++-----
configure.ac | 6 ++++++ configure.ac | 6 ++++++
2 files changed, 20 insertions(+), 5 deletions(-) setup.py | 6 +++---
3 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in
index ecf1b995c01..a5feddcbbc3 100644 index 403380e181..f5d0573067 100644
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -2052,7 +2052,9 @@ ifeq (@PYDOC@,yes) @@ -1868,7 +1868,9 @@ ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
endif endif
-rm -f $(DESTDIR)$(BINDIR)/2to3 -rm -f $(DESTDIR)$(BINDIR)/2to3
@ -35,7 +34,7 @@ index ecf1b995c01..a5feddcbbc3 100644
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \ if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \ rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \
@@ -2099,7 +2101,6 @@ LIBSUBDIRS= asyncio \ @@ -1914,7 +1916,6 @@ LIBSUBDIRS= asyncio \
idlelib idlelib/Icons \ idlelib idlelib/Icons \
importlib importlib/resources importlib/metadata \ importlib importlib/resources importlib/metadata \
json \ json \
@ -43,34 +42,34 @@ index ecf1b995c01..a5feddcbbc3 100644
logging \ logging \
multiprocessing multiprocessing/dummy \ multiprocessing multiprocessing/dummy \
re \ re \
@@ -2203,10 +2204,6 @@ TESTSUBDIRS= idlelib/idle_test \ @@ -1934,10 +1935,6 @@ LIBSUBDIRS= asyncio \
test/test_importlib/resources/zipdata02 \ TESTSUBDIRS= ctypes/test \
test/test_importlib/source \ distutils/tests \
test/test_json \ idlelib/idle_test \
- test/test_lib2to3 \ - lib2to3/tests \
- test/test_lib2to3/data \ - lib2to3/tests/data \
- test/test_lib2to3/data/fixers \ - lib2to3/tests/data/fixers \
- test/test_lib2to3/data/fixers/myfixes \ - lib2to3/tests/data/fixers/myfixes \
test/test_module \ test \
test/test_peg_generator \ test/audiodata \
test/test_sqlite3 \ test/capath \
@@ -2253,6 +2250,14 @@ ifeq (@PYDOC@,yes) @@ -2013,6 +2010,14 @@ ifeq (@PYDOC@,yes)
LIBSUBDIRS += pydoc_data LIBSUBDIRS += pydoc_data
endif endif
+ifeq (@LIB2TO3@,yes) +ifeq (@LIB2TO3@,yes)
+LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2 +LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
+TESTSUBDIRS += test/test_lib2to3 \ +TESTSUBDIRS += lib2to3/tests \
+ test/test_lib2to3/data \ + lib2to3/tests/data \
+ test/test_lib2to3/data/fixers \ + lib2to3/tests/data/fixers \
+ test/test_lib2to3/data/fixers/myfixes + lib2to3/tests/data/fixers/myfixes
+endif +endif
+ +
TEST_MODULES=@TEST_MODULES@ TEST_MODULES=@TEST_MODULES@
libinstall: all $(srcdir)/Modules/xxmodule.c
.PHONY: libinstall @for i in $(SCRIPTDIR) $(LIBDEST); \
@@ -2336,10 +2341,12 @@ ifeq (@PYC_BUILD@,yes) @@ -2115,10 +2120,12 @@ ifeq (@PYC_BUILD@,yes)
-o 0 -o 1 -o 2 $(COMPILEALL_OPTS) -d $(LIBDEST)/site-packages -f \ -j0 -d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
endif endif
+ifeq (@LIB2TO3@,yes) +ifeq (@LIB2TO3@,yes)
@ -82,21 +81,11 @@ index ecf1b995c01..a5feddcbbc3 100644
# bpo-21536: Misc/python-config.sh is generated in the build directory # bpo-21536: Misc/python-config.sh is generated in the build directory
# from $(srcdir)Misc/python-config.sh.in. # from $(srcdir)Misc/python-config.sh.in.
@@ -2465,7 +2472,9 @@ libainstall: all scripts
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
$(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
+ifeq (@LIB2TO3@,yes)
$(INSTALL_SCRIPT) $(SCRIPT_2TO3) $(DESTDIR)$(BINDIR)/2to3-$(VERSION)
+endif
$(INSTALL_SCRIPT) $(SCRIPT_IDLE) $(DESTDIR)$(BINDIR)/idle$(VERSION)
ifeq (@PYDOC@,yes)
$(INSTALL_SCRIPT) $(SCRIPT_PYDOC) $(DESTDIR)$(BINDIR)/pydoc$(VERSION)
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index 277a16a903e..654f903ef12 100644 index f68ea72321..d8e10cf2b2 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -7535,6 +7535,12 @@ PY_STDLIB_MOD([xxlimited_35], [test "$with_trace_refs" = "no"], [test "$ac_cv_fu @@ -7078,6 +7078,12 @@ PY_STDLIB_MOD([xxlimited_35], [test "$with_trace_refs" = "no"], [test "$ac_cv_fu
# substitute multiline block, must come after last PY_STDLIB_MOD() # substitute multiline block, must come after last PY_STDLIB_MOD()
AC_SUBST([MODULE_BLOCK]) AC_SUBST([MODULE_BLOCK])
@ -107,8 +96,27 @@ index 277a16a903e..654f903ef12 100644
+ [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ]) + [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
+ +
# generate output files # generate output files
AC_CONFIG_FILES(m4_normalize([ AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)
Makefile.pre AC_CONFIG_FILES([Modules/Setup.bootstrap Modules/Setup.stdlib])
diff --git a/setup.py b/setup.py
index 3e55f5b2e0..c490b0b08f 100644
--- a/setup.py
+++ b/setup.py
@@ -1594,11 +1594,11 @@ class DummyProcess:
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
- scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3',
- 'Lib/smtpd.py']
+ scripts = ['Tools/scripts/idle3', '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"):
+ scripts += [ 'Tools/scripts/2to3' ]
setup(# PyPI Metadata (PEP 301)
name = "Python",
version = sys.version.split()[0],
-- --
2.43.0 2.34.1

View File

@ -1,79 +0,0 @@
From e64b522e05801221a093037250579fd8a55b0baf Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
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>
[ Adam Duskett: ported to Python 3.10.0 ]
Signed-off-by: Adam Duskett <aduskett@gmail.com>
[ Bernd Kuhls: ported to Python 3.11.4]
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[ Adam Duskett: ported to Python 3.12.1 ]
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
Makefile.pre.in | 8 +++++---
configure.ac | 5 +++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 9bbe16d4cb8..8af8a3aa40b 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -2106,7 +2106,6 @@ LIBSUBDIRS= asyncio \
multiprocessing multiprocessing/dummy \
re \
site-packages \
- tkinter \
tomllib \
turtledemo \
unittest \
@@ -2207,7 +2206,6 @@ TESTSUBDIRS= idlelib/idle_test \
test/test_module \
test/test_peg_generator \
test/test_sqlite3 \
- test/test_tkinter \
test/test_tomllib \
test/test_tomllib/data \
test/test_tomllib/data/invalid \
@@ -2227,7 +2225,6 @@ TESTSUBDIRS= idlelib/idle_test \
test/test_tomllib/data/valid/dates-and-times \
test/test_tomllib/data/valid/multiline-basic-str \
test/test_tools \
- test/test_ttk \
test/test_unittest \
test/test_unittest/testmock \
test/test_warnings \
@@ -2244,6 +2241,11 @@ TESTSUBDIRS= idlelib/idle_test \
test/xmltestdata/c14n-20 \
test/ziptestdata
+ifeq (@TK@,yes)
+LIBSUBDIRS += tkinter
+TESTSUBDIRS += test/test_tkinter test/test_ttk
+endif
+
COMPILEALL_OPTS=-j0
ifeq (@PYDOC@,yes)
diff --git a/configure.ac b/configure.ac
index c8ae60aa6b5..7caa361138d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4503,6 +4503,11 @@ AC_ARG_ENABLE(pydoc,
AS_HELP_STRING([--disable-pydoc], [disable pydoc]),
[ PYDOC="${enableval}" ], [ PYDOC=yes ])
+AC_SUBST(TK)
+AC_ARG_ENABLE(tk,
+ AS_HELP_STRING([--disable-tk], [disable tk]),
+ [ TK="${enableval}" ], [ TK=yes ])
+
# Check for enable-ipv6
AH_TEMPLATE([ENABLE_IPV6], [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
--
2.43.0

View File

@ -1,6 +1,6 @@
From 39c39b93110f702f7fd8cefb0f456b40d6ace98a Mon Sep 17 00:00:00 2001 From ef8c030e01b1be8be582e90c31298a5863094858 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Tue, 6 Feb 2024 22:12:20 +0100 Date: Wed, 22 Feb 2017 17:20:45 -0800
Subject: [PATCH] Add option to disable the sqlite3 module Subject: [PATCH] Add option to disable the sqlite3 module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
@ -9,17 +9,16 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
[ Adam Duskett: ported to Python 3.10.0 ] [ Adam Duskett: ported to Python 3.10.0 ]
Signed-off-by: Adam Duskett <aduskett@gmail.com> Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
--- ---
Makefile.pre.in | 5 ++++- Makefile.pre.in | 5 ++++-
configure.ac | 7 +++++++ configure.ac | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-) 2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in
index 28ba723fe83..9bbe16d4cb8 100644 index f5d0573067..9f4cdf14cf 100644
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -2106,7 +2106,6 @@ LIBSUBDIRS= asyncio \ @@ -1920,7 +1920,6 @@ LIBSUBDIRS= asyncio \
multiprocessing multiprocessing/dummy \ multiprocessing multiprocessing/dummy \
re \ re \
site-packages \ site-packages \
@ -27,8 +26,8 @@ index 28ba723fe83..9bbe16d4cb8 100644
tkinter \ tkinter \
tomllib \ tomllib \
turtledemo \ turtledemo \
@@ -2263,6 +2262,10 @@ ifeq (@IDLE@,yes) @@ -2018,6 +2017,10 @@ TESTSUBDIRS += lib2to3/tests \
LIBSUBDIRS += idlelib idlelib/Icons lib2to3/tests/data/fixers/myfixes
endif endif
+ifeq (@SQLITE3@,yes) +ifeq (@SQLITE3@,yes)
@ -36,13 +35,13 @@ index 28ba723fe83..9bbe16d4cb8 100644
+endif +endif
+ +
TEST_MODULES=@TEST_MODULES@ TEST_MODULES=@TEST_MODULES@
libinstall: all $(srcdir)/Modules/xxmodule.c
.PHONY: libinstall @for i in $(SCRIPTDIR) $(LIBDEST); \
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index 1bb63cbd5b2..c8ae60aa6b5 100644 index d8e10cf2b2..4cc0951ab9 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -4490,6 +4490,13 @@ AS_VAR_IF([posix_threads], [stub], [ @@ -4171,6 +4171,15 @@ AS_VAR_IF([posix_threads], [stub], [
AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support]) AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support])
]) ])
@ -50,12 +49,14 @@ index 1bb63cbd5b2..c8ae60aa6b5 100644
+AC_ARG_ENABLE(sqlite3, +AC_ARG_ENABLE(sqlite3,
+ AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]), + AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]),
+ [ SQLITE3="${enableval}" ], [ SQLITE3=yes ]) + [ SQLITE3="${enableval}" ], [ SQLITE3=yes ])
+AS_IF([test "$SQLITE3" = "no"], +
+ [PY_STDLIB_MOD_SET_NA([_sqlite3])]) +if test "$SQLITE3" = "no" ; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
+fi
+ +
AC_SUBST(PYDOC) AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc, AC_ARG_ENABLE(pydoc,
-- --
2.43.0 2.34.1

View File

@ -0,0 +1,77 @@
From bbbfe699d648a5cb191203b16e1786e8cf4ea908 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
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>
[ Adam Duskett: ported to Python 3.10.0 ]
Signed-off-by: Adam Duskett <aduskett@gmail.com>
[ Bernd Kuhls: ported to Python 3.11.4]
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
Makefile.pre.in | 10 +++++++---
configure.ac | 9 +++++++++
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 9f4cdf14cf..4f83911200 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1920,7 +1920,6 @@ LIBSUBDIRS= asyncio \
multiprocessing multiprocessing/dummy \
re \
site-packages \
- tkinter \
tomllib \
turtledemo \
unittest \
@@ -2038,9 +2038,6 @@
test/xmltestdata \
test/xmltestdata/c14n-20 \
test/ziptestdata \
- tkinter/test \
- tkinter/test/test_tkinter \
- tkinter/test/test_ttk \
unittest/test \
unittest/test/testmock
ifeq (@PYDOC@,yes)
@@ -2021,6 +2018,13 @@ ifeq (@SQLITE3@,yes)
LIBSUBDIRS += sqlite3
endif
+ifeq (@TK@,yes)
+LIBSUBDIRS += tkinter
+TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
+ tkinter/test/test_ttk
+endif
+
+
TEST_MODULES=@TEST_MODULES@
libinstall: all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
diff --git a/configure.ac b/configure.ac
index 4cc0951ab9..f4ce506801 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4180,6 +4180,15 @@ if test "$SQLITE3" = "no" ; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
+AC_SUBST(TK)
+AC_ARG_ENABLE(tk,
+ AS_HELP_STRING([--disable-tk], [disable tk]),
+ [ TK="${enableval}" ], [ TK=yes ])
+
+if test "$TK" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
+fi
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
--
2.34.1

View File

@ -1,4 +1,4 @@
From a295784d19553cc28e4d531c0f21ac2935b8bef9 Mon Sep 17 00:00:00 2001 From 03e28cdd46dac1b7e4e9c8bbd2ea44b09e514205 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 22 Feb 2017 17:31:51 -0800 Date: Wed, 22 Feb 2017 17:31:51 -0800
Subject: [PATCH] Add an option to disable the curses module Subject: [PATCH] Add an option to disable the curses module
@ -10,51 +10,52 @@ Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
[ Adam Duskett: ported to Python 3.10.0 ] [ Adam Duskett: ported to Python 3.10.0 ]
Signed-off-by: Adam Duskett <aduskett@gmail.com> Signed-off-by: Adam Duskett <aduskett@gmail.com>
--- ---
Makefile.pre.in | 5 ++++- Makefile.pre.in | 4 +++-
configure.ac | 7 +++++++ configure.ac | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-) 2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in
index 8af8a3aa40b..7162d9d3634 100644 index 4f83911200..8e879b35c6 100644
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -2093,7 +2093,6 @@ LIBSUBDIRS= asyncio \ @@ -1905,7 +1905,6 @@ LIBSUBDIRS= asyncio \
concurrent concurrent/futures \ concurrent concurrent/futures \
csv \ csv \
ctypes ctypes/macholib \ ctypes ctypes/macholib \
- curses \ - curses \
dbm \ dbm \
distutils distutils/command \
email email/mime \ email email/mime \
encodings \ @@ -2024,6 +2023,9 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
@@ -2246,6 +2245,10 @@ LIBSUBDIRS += tkinter tkinter/test/test_ttk
TESTSUBDIRS += test/test_tkinter test/test_ttk
endif endif
+ifeq (@CURSES@,yes) +ifeq (@CURSES@,yes)
+LIBSUBDIRS += curses +LIBSUBDIRS += curses
+endif +endif
+
COMPILEALL_OPTS=-j0
ifeq (@PYDOC@,yes) TEST_MODULES=@TEST_MODULES@
libinstall: all $(srcdir)/Modules/xxmodule.c
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index 7caa361138d..748a16d7eab 100644 index f4ce506801..0ae9863cd6 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -4497,6 +4497,13 @@ AC_ARG_ENABLE(sqlite3, @@ -4189,6 +4189,15 @@ if test "$TK" = "no"; then
AS_IF([test "$SQLITE3" = "no"], DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
[PY_STDLIB_MOD_SET_NA([_sqlite3])]) fi
+AC_SUBST(CURSES) +AC_SUBST(CURSES)
+AC_ARG_ENABLE(curses, +AC_ARG_ENABLE(curses,
+ AS_HELP_STRING([--disable-curses], [disable curses]), + AS_HELP_STRING([--disable-curses], [disable curses]),
+ [ CURSES="${enableval}" ], [ CURSES=yes ]) + [ CURSES="${enableval}" ], [ CURSES=yes ])
+AS_IF([test "$CURSES" = "no"], +
+ [PY_STDLIB_MOD_SET_NA([_curses], [_curses_panel])]) +if test "$CURSES" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
+fi
+ +
AC_SUBST(PYDOC) AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc, AC_ARG_ENABLE(pydoc,
-- --
2.43.0 2.34.1

View File

@ -1,4 +1,4 @@
From 1e9dacb7afa602d9e73da17966aed024298e84ba Mon Sep 17 00:00:00 2001 From c9a2ea3edacf57746517600ccc11c254a9fd6c48 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 22 Feb 2017 17:40:45 -0800 Date: Wed, 22 Feb 2017 17:40:45 -0800
Subject: [PATCH] Add an option to disable expat Subject: [PATCH] Add an option to disable expat
@ -17,23 +17,23 @@ Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com> Signed-off-by: Adam Duskett <aduskett@gmail.com>
--- ---
Makefile.pre.in | 5 ++++- Makefile.pre.in | 5 ++++-
configure.ac | 24 +++++++++++++----------- configure.ac | 20 ++++++++++++++------
2 files changed, 17 insertions(+), 12 deletions(-) 2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in
index 7162d9d3634..d9fae62aa9c 100644 index 8e879b35c6..80d617cf7f 100644
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -2111,7 +2111,6 @@ LIBSUBDIRS= asyncio \ @@ -1925,7 +1925,6 @@ LIBSUBDIRS= asyncio \
urllib \ urllib \
venv venv/scripts venv/scripts/common venv/scripts/posix \ venv venv/scripts venv/scripts/common venv/scripts/posix \
wsgiref \ wsgiref \
- $(XMLLIBSUBDIRS) \ - $(XMLLIBSUBDIRS) \
xmlrpc \ xmlrpc \
zipfile zipfile/_path \
zoneinfo \ zoneinfo \
@@ -2271,6 +2270,10 @@ ifeq (@SQLITE3@,yes) __phello__
LIBSUBDIRS += sqlite3 @@ -2027,6 +2026,10 @@ ifeq (@CURSES@,yes)
LIBSUBDIRS += curses
endif endif
+ifeq (@EXPAT@,yes) +ifeq (@EXPAT@,yes)
@ -41,37 +41,36 @@ index 7162d9d3634..d9fae62aa9c 100644
+endif +endif
+ +
TEST_MODULES=@TEST_MODULES@ TEST_MODULES=@TEST_MODULES@
libinstall: all $(srcdir)/Modules/xxmodule.c
.PHONY: libinstall @for i in $(SCRIPTDIR) $(LIBDEST); \
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index 748a16d7eab..1c902de8af3 100644 index 0ae9863cd6..201cad0bfc 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -3797,17 +3797,19 @@ LIBS="$withval $LIBS" @@ -3565,15 +3565,23 @@ LIBS="$withval $LIBS"
[AC_MSG_RESULT([no])]) AC_SUBST(DISABLED_EXTENSIONS)
# Check for use of the system expat library # Check for use of the system expat library
-AC_MSG_CHECKING([for --with-system-expat]) -AC_MSG_CHECKING(for --with-system-expat)
-AC_ARG_WITH( -AC_ARG_WITH(system_expat,
- [system_expat], - AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library, see Doc/library/pyexpat.rst (default is no)]),
- [AS_HELP_STRING(
- [--with-system-expat],
- [build pyexpat module using an installed expat library, see Doc/library/pyexpat.rst (default is no)]
- )], [], [with_system_expat="no"])
-
-AC_MSG_RESULT([$with_system_expat])
-
-AS_VAR_IF([with_system_expat], [yes], [
+AC_MSG_CHECKING(for --with-expat) +AC_MSG_CHECKING(for --with-expat)
+AC_ARG_WITH(expat, +AC_ARG_WITH(expat,
+ AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]), + AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]),
+ [], [],
- [with_system_expat="no"])
+ [with_expat="builtin"]) + [with_expat="builtin"])
-AC_MSG_RESULT($with_system_expat)
+AC_MSG_RESULT($with_expat) +AC_MSG_RESULT($with_expat)
+AS_IF([test "$with_expat" != "none"],
+ [EXPAT=yes], -AS_VAR_IF([with_system_expat], [yes], [
+ [PY_STDLIB_MOD_SET_NA([pyexpat]) +if test "$with_expat" != "none"; then
+ EXPAT=no]) + EXPAT=yes
+else
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} pyexpat"
+ EXPAT=no
+fi
+AC_SUBST(EXPAT) +AC_SUBST(EXPAT)
+ +
+AS_VAR_IF([with_expat], [system], [ +AS_VAR_IF([with_expat], [system], [
@ -79,5 +78,5 @@ index 748a16d7eab..1c902de8af3 100644
LIBEXPAT_LDFLAGS=${LIBEXPAT_LDFLAGS-"-lexpat"} LIBEXPAT_LDFLAGS=${LIBEXPAT_LDFLAGS-"-lexpat"}
LIBEXPAT_INTERNAL= LIBEXPAT_INTERNAL=
-- --
2.43.0 2.34.1

View File

@ -0,0 +1,30 @@
From d8ef6a7a9f2b954cf1c1e37fc3c35055b42af0f5 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
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 201cad0bfc..ecdd7dbc07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4188,6 +4188,12 @@ if test "$SQLITE3" = "no" ; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
+AC_ARG_ENABLE(codecs-cjk,
+ AS_HELP_STRING([--disable-codecs-cjk], [disable CJK codecs]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.34.1

View File

@ -0,0 +1,33 @@
From 09fc9f72ebe60bb65e80732a6bd4f12a84159f6d 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
NIS is not necessarily available in uClibc, so we need an option to
not compile support for it.
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 ecdd7dbc07..1bdde7f69d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4194,6 +4194,12 @@ AC_ARG_ENABLE(codecs-cjk,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022"
fi])
+AC_ARG_ENABLE(nis,
+ AS_HELP_STRING([--disable-nis], [disable NIS]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.34.1

View File

@ -0,0 +1,30 @@
From 4fe7f375a3d171d294caebdd7b7ce49bbc9ad9f3 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
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 1bdde7f69d..ba4b0e0c1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4200,6 +4200,12 @@ AC_ARG_ENABLE(nis,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
+AC_ARG_ENABLE(unicodedata,
+ AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.34.1

View File

@ -1,4 +1,4 @@
From 1bde6bbbae166b9a5ce9ddfea378a6401c56123d Mon Sep 17 00:00:00 2001 From 2c9dbd6d49744aa8da8ebf8d0187d6b06f93c2b5 Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime.ripard@free-electrons.com> From: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Wed, 22 Feb 2017 17:45:14 -0800 Date: Wed, 22 Feb 2017 17:45:14 -0800
Subject: [PATCH] Add an option to disable IDLE Subject: [PATCH] Add an option to disable IDLE
@ -11,18 +11,17 @@ Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
[ Adam Duskett: ported to Python 3.10.0 ] [ Adam Duskett: ported to Python 3.10.0 ]
Signed-off-by: Adam Duskett <aduskett@gmail.com> Signed-off-by: Adam Duskett <aduskett@gmail.com>
[ Adam Duskett: ported to Python 3.12.1 ]
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
--- ---
Makefile.pre.in | 9 ++++++++- Makefile.pre.in | 7 ++++++-
configure.ac | 6 ++++++ configure.ac | 6 ++++++
2 files changed, 14 insertions(+), 1 deletion(-) setup.py | 5 ++++-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in
index a5feddcbbc3..28ba723fe83 100644 index 80d617cf7f..8d1ba1356c 100644
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -2046,7 +2046,9 @@ bininstall: commoninstall altbininstall @@ -1862,7 +1862,9 @@ bininstall: altbininstall
-rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc -rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.pc) (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.pc)
-rm -f $(DESTDIR)$(BINDIR)/idle3 -rm -f $(DESTDIR)$(BINDIR)/idle3
@ -32,7 +31,7 @@ index a5feddcbbc3..28ba723fe83 100644
-rm -f $(DESTDIR)$(BINDIR)/pydoc3 -rm -f $(DESTDIR)$(BINDIR)/pydoc3
ifeq (@PYDOC@,yes) ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
@@ -2098,7 +2100,6 @@ LIBSUBDIRS= asyncio \ @@ -1912,7 +1914,6 @@ LIBSUBDIRS= asyncio \
ensurepip ensurepip/_bundled \ ensurepip ensurepip/_bundled \
html \ html \
http \ http \
@ -40,8 +39,8 @@ index a5feddcbbc3..28ba723fe83 100644
importlib importlib/resources importlib/metadata \ importlib importlib/resources importlib/metadata \
json \ json \
logging \ logging \
@@ -2258,6 +2259,10 @@ TESTSUBDIRS += test/test_lib2to3 \ @@ -2030,6 +2031,10 @@ ifeq (@EXPAT@,yes)
test/test_lib2to3/data/fixers/myfixes LIBSUBDIRS += $(XMLLIBSUBDIRS)
endif endif
+ifeq (@IDLE@,yes) +ifeq (@IDLE@,yes)
@ -49,23 +48,13 @@ index a5feddcbbc3..28ba723fe83 100644
+endif +endif
+ +
TEST_MODULES=@TEST_MODULES@ TEST_MODULES=@TEST_MODULES@
libinstall: all $(srcdir)/Modules/xxmodule.c
.PHONY: libinstall @for i in $(SCRIPTDIR) $(LIBDEST); \
@@ -2475,7 +2480,9 @@ libainstall: all scripts
ifeq (@LIB2TO3@,yes)
$(INSTALL_SCRIPT) $(SCRIPT_2TO3) $(DESTDIR)$(BINDIR)/2to3-$(VERSION)
endif
+ifeq (@IDLE@,yes)
$(INSTALL_SCRIPT) $(SCRIPT_IDLE) $(DESTDIR)$(BINDIR)/idle$(VERSION)
+endif
ifeq (@PYDOC@,yes)
$(INSTALL_SCRIPT) $(SCRIPT_PYDOC) $(DESTDIR)$(BINDIR)/pydoc$(VERSION)
endif
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index 654f903ef12..306127274e0 100644 index ba4b0e0c1c..5e6d72f7db 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -7541,6 +7541,12 @@ AC_ARG_ENABLE(lib2to3, @@ -7137,6 +7137,12 @@ AC_ARG_ENABLE(lib2to3,
AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]), AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
[ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ]) [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
@ -76,8 +65,28 @@ index 654f903ef12..306127274e0 100644
+ [ IDLE="${enableval}" ], [ IDLE=yes ]) + [ IDLE="${enableval}" ], [ IDLE=yes ])
+ +
# generate output files # generate output files
AC_CONFIG_FILES(m4_normalize([ AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)
Makefile.pre AC_CONFIG_FILES([Modules/Setup.bootstrap Modules/Setup.stdlib])
diff --git a/setup.py b/setup.py
index c490b0b08f..4d49a792f7 100644
--- a/setup.py
+++ b/setup.py
@@ -1594,11 +1594,14 @@ class DummyProcess:
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
- scripts = ['Tools/scripts/idle3', '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"):
scripts += [ 'Tools/scripts/2to3' ]
+ if not '--disable-idle3' in sysconfig.get_config_var("CONFIG_ARGS"):
+ scripts += [ 'Tools/scripts/idle3' ]
+
setup(# PyPI Metadata (PEP 301)
name = "Python",
version = sys.version.split()[0],
-- --
2.43.0 2.34.1

View File

@ -0,0 +1,54 @@
From 7091fdf77f612425c178a75148560f9c3514e8b8 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
This patch replaces the existing --with-system-libmpdec option with a
--with-libmpdec={system,builtin,none} option, which allows to tell
Python whether we want to use the system libmpdec (already installed),
the libmpdec builtin the Python sources, or no libmpdec at all.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[aduskett@gmail.com: Update for python 3.7.0]
Signed-off-by: Adam Duskett <aduskett@gmail.com>
[james.hilliard1@gmail.com: adapt to python 3.9]
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
configure.ac | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5e6d72f7db..e6b1f1e9de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3630,14 +3630,21 @@ fi
AC_SUBST(LIBFFI_INCLUDEDIR)
# Check for use of the system libmpdec library
-AC_MSG_CHECKING(for --with-system-libmpdec)
-AC_ARG_WITH(system_libmpdec,
- AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec library, see Doc/library/decimal.rst (default is no)]),
+AC_MSG_CHECKING(for --with-libmpdec)
+AC_ARG_WITH(libmpdec,
+ AS_HELP_STRING([--with-libmpdec], [select which libmpdec version to use: system, builtin, none]),
[],
- [with_system_libmpdec="no"])
-AC_MSG_RESULT($with_system_libmpdec)
+ [with_libmpdec="builtin"])
+AC_MSG_RESULT($with_libmpdec)
+if test "$with_libmpdec" != "none"; then
+ MPDEC=yes
+else
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _decimal"
+ MPDEC=no
+fi
+AC_SUBST(MPDEC)
-AS_VAR_IF([with_system_libmpdec], [yes], [
+AS_VAR_IF([with_libmpdec], [system], [
LIBMPDEC_CFLAGS=${LIBMPDEC_CFLAGS-""}
LIBMPDEC_LDFLAGS=${LIBMPDEC_LDFLAGS-"-lmpdec"}
LIBMPDEC_INTERNAL=
--
2.34.1

View File

@ -0,0 +1,30 @@
From d48d9da534cec7891ae444b4ab94a76ac67f5daa 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
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 e6b1f1e9de..db33d567ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3678,6 +3678,12 @@ fi
AC_MSG_RESULT($with_decimal_contextvar)
+AC_ARG_ENABLE(ossaudiodev,
+ AS_HELP_STRING([--disable-ossaudiodev], [disable OSSAUDIODEV]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ossaudiodev"
+ fi])
+
# Check for libmpdec machine flavor
AC_MSG_CHECKING(for decimal libmpdec machine)
AS_CASE([$ac_sys_system],
--
2.34.1

View File

@ -0,0 +1,30 @@
From 25c900e81a2fc0bbe35e7c94e2e5028cfbf6582a 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>
---
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index db33d567ad..42fe6c8f5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4219,6 +4219,12 @@ AC_ARG_ENABLE(unicodedata,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata"
fi])
+AC_ARG_ENABLE(openssl,
+ AS_HELP_STRING([--disable-openssl], [disable openssl support]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl _ssl _hashlib"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.34.1

View File

@ -0,0 +1,30 @@
From 9082468ca620db77b670ccf568a96bbabb865f80 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 42fe6c8f5a..19875d7d30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4225,6 +4225,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.34.1

View File

@ -0,0 +1,42 @@
From 988a335cb34b5fc25ea345ba04ff5ddffe2e946c 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 19875d7d30..ca6c16491a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4231,6 +4231,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.34.1

View File

@ -1,4 +1,4 @@
From 83eee4af197f70dd3b14e79efa044d8ef70e9e0f Mon Sep 17 00:00:00 2001 From 755fb526a62df2a73560f42184db8aadb6899bb0 Mon Sep 17 00:00:00 2001
From: Matt Weber <matthew.weber@rockwellcollins.com> From: Matt Weber <matthew.weber@rockwellcollins.com>
Date: Fri, 6 Oct 2017 09:54:15 -0500 Date: Fri, 6 Oct 2017 09:54:15 -0500
Subject: [PATCH] python-config.sh: don't reassign ${prefix} Subject: [PATCH] python-config.sh: don't reassign ${prefix}
@ -27,7 +27,7 @@ Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
index a1bc3cd5f7a..164d2d36030 100644 index a1bc3cd5f7..164d2d3603 100644
--- a/Misc/python-config.sh.in --- a/Misc/python-config.sh.in
+++ b/Misc/python-config.sh.in +++ b/Misc/python-config.sh.in
@@ -31,7 +31,7 @@ prefix_real=$(installed_prefix "$0") @@ -31,7 +31,7 @@ prefix_real=$(installed_prefix "$0")
@ -49,5 +49,5 @@ index a1bc3cd5f7a..164d2d36030 100644
SO="@EXT_SUFFIX@" SO="@EXT_SUFFIX@"
PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
-- --
2.43.0 2.34.1

View File

@ -0,0 +1,33 @@
From 58027d25c3cabcf654cb0b31a61d7cbd53dc68c0 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Sat, 18 Aug 2018 10:54:56 +0200
Subject: [PATCH] Add an option to disable uuid module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
configure.ac | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index ca6c16491a..ed03b27fb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4267,6 +4267,15 @@ if test "$CURSES" = "no"; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
fi
+AC_SUBST(UUID)
+AC_ARG_ENABLE(uuid,
+ AS_HELP_STRING([--disable-uuid], [disable uuid]),
+ [ UUID="${enableval}" ], [ UUID=yes ])
+
+if test "$UUID" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _uuid"
+fi
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
--
2.34.1

View File

@ -1,4 +1,4 @@
From 56d4b5976a5ba57ccbb2e00c7bdfaa3a57384224 Mon Sep 17 00:00:00 2001 From e52e2c5e3df4bc3d2ff07ecb3b8e2a9099ea1631 Mon Sep 17 00:00:00 2001
From: Adam Duskett <aduskett@gmail.com> From: Adam Duskett <aduskett@gmail.com>
Date: Thu, 16 Aug 2018 14:52:37 -0700 Date: Thu, 16 Aug 2018 14:52:37 -0700
Subject: [PATCH] fix building on older distributions Subject: [PATCH] fix building on older distributions
@ -16,16 +16,14 @@ This change fixes building on older systems such as CentOS7, that only come
with python 2. with python 2.
Signed-off-by: Adam Duskett <aduskett@gmail.com> Signed-off-by: Adam Duskett <aduskett@gmail.com>
[ Adam Duskett: ported to Python 3.12.1 ]
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
--- ---
Tools/build/update_file.py | 4 ++-- Tools/scripts/update_file.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Tools/build/update_file.py b/Tools/build/update_file.py diff --git a/Tools/scripts/update_file.py b/Tools/scripts/update_file.py
index b4182c1d0cb..ab443cb1a60 100644 index b4182c1d0c..ab443cb1a6 100644
--- a/Tools/build/update_file.py --- a/Tools/scripts/update_file.py
+++ b/Tools/build/update_file.py +++ b/Tools/scripts/update_file.py
@@ -53,7 +53,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, create=False): @@ -53,7 +53,7 @@ def update_file_with_tmpfile(filename, tmpfile, *, create=False):
if not create: if not create:
raise # re-raise raise # re-raise
@ -45,5 +43,5 @@ index b4182c1d0cb..ab443cb1a60 100644
outcome = 'same' outcome = 'same'
os.unlink(tmpfile) os.unlink(tmpfile)
-- --
2.43.0 2.34.1

View File

@ -1,4 +1,4 @@
From 5996962c00f263612e1b1f70654cee5f227267a5 Mon Sep 17 00:00:00 2001 From 07b950aadd570b9f96a1f128505a959b32f40962 Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com> From: Peter Korsgaard <peter@korsgaard.com>
Date: Fri, 2 Aug 2019 15:53:16 +0200 Date: Fri, 2 Aug 2019 15:53:16 +0200
Subject: [PATCH] configure.ac: fixup $CC --print-multiarch output for Subject: [PATCH] configure.ac: fixup $CC --print-multiarch output for
@ -30,10 +30,10 @@ Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
1 file changed, 5 insertions(+), 1 deletion(-) 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index 1c902de8af3..06df165ccc8 100644 index ed03b27fb1..841fd6732c 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -1128,7 +1128,11 @@ AC_MSG_CHECKING([for multiarch]) @@ -1086,7 +1086,11 @@ AC_MSG_CHECKING([for multiarch])
AS_CASE([$ac_sys_system], AS_CASE([$ac_sys_system],
[Darwin*], [MULTIARCH=""], [Darwin*], [MULTIARCH=""],
[FreeBSD*], [MULTIARCH=""], [FreeBSD*], [MULTIARCH=""],
@ -47,5 +47,5 @@ index 1c902de8af3..06df165ccc8 100644
AC_SUBST([MULTIARCH]) AC_SUBST([MULTIARCH])
AC_MSG_RESULT([$MULTIARCH]) AC_MSG_RESULT([$MULTIARCH])
-- --
2.43.0 2.34.1

View File

@ -0,0 +1,30 @@
From 67e9793d070ac5c8e83abbe95b9208533ffeadd0 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Sat, 11 Apr 2020 22:01:40 +0200
Subject: [PATCH] Add an option to disable the berkeleydb module
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index 841fd6732c..06c9a81f95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4280,6 +4280,12 @@ if test "$UUID" = "no"; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _uuid"
fi
+AC_ARG_ENABLE(berkeleydb,
+ AS_HELP_STRING([--disable-berkeleydb], [disable berkeleydb]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _dbm"
+ fi])
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
--
2.34.1

View File

@ -1,4 +1,4 @@
From f478c8d19d259272294f8502239dfe3fee9fb7e7 Mon Sep 17 00:00:00 2001 From 3edeed879871a10acbe802f4a68cff3d4869dbde Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com> From: Romain Naour <romain.naour@gmail.com>
Date: Thu, 12 Nov 2020 00:16:18 +0100 Date: Thu, 12 Nov 2020 00:16:18 +0100
Subject: [PATCH] lib/crypt: uClibc-ng doesn't set errno when encryption method Subject: [PATCH] lib/crypt: uClibc-ng doesn't set errno when encryption method
@ -23,7 +23,7 @@ Signed-off-by: Daniel Lang <d.lang@abatec.at>
1 file changed, 3 insertions(+), 1 deletion(-) 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Lib/crypt.py b/Lib/crypt.py diff --git a/Lib/crypt.py b/Lib/crypt.py
index de4a14a3884..ba482487a7a 100644 index de4a14a388..ba482487a7 100644
--- a/Lib/crypt.py --- a/Lib/crypt.py
+++ b/Lib/crypt.py +++ b/Lib/crypt.py
@@ -98,7 +98,9 @@ def _add_method(name, *args, rounds=None): @@ -98,7 +98,9 @@ def _add_method(name, *args, rounds=None):
@ -38,5 +38,5 @@ index de4a14a3884..ba482487a7a 100644
raise raise
if result and len(result) == method.total_size: if result and len(result) == method.total_size:
-- --
2.43.0 2.34.1

View File

@ -1,5 +1,5 @@
# From https://www.python.org/downloads/release/python-3121/ # From https://www.python.org/downloads/release/python-3116/
md5 50f827c800483776c8ef86e6a53831fa Python-3.12.1.tar.xz md5 d0c5a1a31efe879723e51addf56dd206 Python-3.11.6.tar.xz
# Locally computed # Locally computed
sha256 8dfb8f426fcd226657f9e2bd5f1e96e53264965176fa17d32658e873591aeb21 Python-3.12.1.tar.xz sha256 0fab78fa7f133f4f38210c6260d90d7c0d5c7198446419ce057ec7ac2e6f5f38 Python-3.11.6.tar.xz
sha256 3b2f81fe21d181c499c59a256c8e1968455d6689d269aa85373bfb6af41da3bf LICENSE sha256 3b2f81fe21d181c499c59a256c8e1968455d6689d269aa85373bfb6af41da3bf LICENSE

View File

@ -4,8 +4,8 @@
# #
################################################################################ ################################################################################
PYTHON3_VERSION_MAJOR = 3.12 PYTHON3_VERSION_MAJOR = 3.11
PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).1 PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).6
PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz
PYTHON3_SITE = https://python.org/ftp/python/$(PYTHON3_VERSION) PYTHON3_SITE = https://python.org/ftp/python/$(PYTHON3_VERSION)
PYTHON3_LICENSE = Python-2.0, others PYTHON3_LICENSE = Python-2.0, others
@ -22,8 +22,12 @@ HOST_PYTHON3_CONF_OPTS += \
--disable-sqlite3 \ --disable-sqlite3 \
--disable-tk \ --disable-tk \
--with-expat=system \ --with-expat=system \
--disable-codecs-cjk \
--disable-nis \
--enable-unicodedata \
--disable-test-modules \ --disable-test-modules \
--disable-idle3 \ --disable-idle3 \
--disable-uuid \
--disable-ossaudiodev --disable-ossaudiodev
# Make sure that LD_LIBRARY_PATH overrides -rpath. # Make sure that LD_LIBRARY_PATH overrides -rpath.
@ -33,15 +37,6 @@ HOST_PYTHON3_CONF_OPTS += \
# communicate over the network during the build. # communicate over the network during the build.
HOST_PYTHON3_CONF_ENV += \ HOST_PYTHON3_CONF_ENV += \
LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \ LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \
py_cv_module_nis=n/a \
py_cv_module_unicodedata=yes \
py_cv_module__codecs_cn=n/a \
py_cv_module__codecs_hk=n/a \
py_cv_module__codecs_iso2022=n/a \
py_cv_module__codecs_jp=n/a \
py_cv_module__codecs_kr=n/a \
py_cv_module__codecs_tw=n/a \
py_cv_module__uuid=n/a \
ac_cv_prog_HAS_HG=/bin/false ac_cv_prog_HAS_HG=/bin/false
PYTHON3_DEPENDENCIES = host-python3 libffi PYTHON3_DEPENDENCIES = host-python3 libffi
@ -56,7 +51,7 @@ HOST_PYTHON3_DEPENDENCIES = \
ifeq ($(BR2_PACKAGE_HOST_PYTHON3_BZIP2),y) ifeq ($(BR2_PACKAGE_HOST_PYTHON3_BZIP2),y)
HOST_PYTHON3_DEPENDENCIES += host-bzip2 HOST_PYTHON3_DEPENDENCIES += host-bzip2
else else
HOST_PYTHON3_CONF_ENV += py_cv_module__bz2=n/a HOST_PYTHON3_CONF_OPTS += --disable-bzip2
endif endif
ifeq ($(BR2_PACKAGE_HOST_PYTHON3_CURSES),y) ifeq ($(BR2_PACKAGE_HOST_PYTHON3_CURSES),y)
@ -68,9 +63,7 @@ endif
ifeq ($(BR2_PACKAGE_HOST_PYTHON3_SSL),y) ifeq ($(BR2_PACKAGE_HOST_PYTHON3_SSL),y)
HOST_PYTHON3_DEPENDENCIES += host-openssl HOST_PYTHON3_DEPENDENCIES += host-openssl
else else
HOST_PYTHON3_CONF_ENV += \ HOST_PYTHON3_CONF_OPTS += --disable-openssl
py_cv_module__hashlib=n/a \
py_cv_module__ssl=n/a
endif endif
PYTHON3_INSTALL_STAGING = YES PYTHON3_INSTALL_STAGING = YES
@ -84,14 +77,13 @@ endif
ifeq ($(BR2_PACKAGE_PYTHON3_BERKELEYDB),y) ifeq ($(BR2_PACKAGE_PYTHON3_BERKELEYDB),y)
PYTHON3_DEPENDENCIES += berkeleydb PYTHON3_DEPENDENCIES += berkeleydb
else else
PYTHON3_CONF_ENV += py_cv_module__dbm=n/a PYTHON3_CONF_OPTS += --disable-berkeleydb
endif endif
ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y) ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y)
PYTHON3_CONF_OPTS += --with-readline
PYTHON3_DEPENDENCIES += readline PYTHON3_DEPENDENCIES += readline
else else
PYTHON3_CONF_OPTS += --without-readline PYTHON3_CONF_OPTS += --disable-readline
endif endif
ifeq ($(BR2_PACKAGE_PYTHON3_CURSES),y) ifeq ($(BR2_PACKAGE_PYTHON3_CURSES),y)
@ -102,9 +94,9 @@ endif
ifeq ($(BR2_PACKAGE_PYTHON3_DECIMAL),y) ifeq ($(BR2_PACKAGE_PYTHON3_DECIMAL),y)
PYTHON3_DEPENDENCIES += mpdecimal PYTHON3_DEPENDENCIES += mpdecimal
PYTHON3_CONF_OPTS += --with-system-libmpdec PYTHON3_CONF_OPTS += --with-libmpdec=system
else else
PYTHON3_CONF_ENV += py_cv_module__decimal=n/a PYTHON3_CONF_OPTS += --with-libmpdec=none
endif endif
ifeq ($(BR2_PACKAGE_PYTHON3_PYEXPAT),y) ifeq ($(BR2_PACKAGE_PYTHON3_PYEXPAT),y)
@ -124,50 +116,44 @@ ifeq ($(BR2_PACKAGE_PYTHON3_SSL),y)
PYTHON3_DEPENDENCIES += openssl PYTHON3_DEPENDENCIES += openssl
PYTHON3_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr PYTHON3_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr
else else
PYTHON3_CONF_ENV += \ PYTHON3_CONF_OPTS += --disable-openssl
py_cv_module__hashlib=n/a \
py_cv_module__ssl=n/a
endif endif
ifneq ($(BR2_PACKAGE_PYTHON3_CODECSCJK),y) ifneq ($(BR2_PACKAGE_PYTHON3_CODECSCJK),y)
PYTHON3_CONF_ENV += \ PYTHON3_CONF_OPTS += --disable-codecs-cjk
py_cv_module__codecs_cn=n/a \
py_cv_module__codecs_hk=n/a \
py_cv_module__codecs_iso2022=n/a \
py_cv_module__codecs_jp=n/a \
py_cv_module__codecs_kr=n/a \
py_cv_module__codecs_tw=n/a
endif endif
ifneq ($(BR2_PACKAGE_PYTHON3_UNICODEDATA),y) ifneq ($(BR2_PACKAGE_PYTHON3_UNICODEDATA),y)
PYTHON3_CONF_ENV += py_cv_module_unicodedata=n/a PYTHON3_CONF_OPTS += --disable-unicodedata
endif endif
# Disable auto-detection of uuid.h (util-linux) # Disable auto-detection of uuid.h (util-linux)
# which would add _uuid module support, instead # which would add _uuid module support, instead
# default to the pure python implementation # default to the pure python implementation
PYTHON3_CONF_ENV += py_cv_module__uuid=n/a PYTHON3_CONF_OPTS += --disable-uuid
ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y) ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y)
PYTHON3_DEPENDENCIES += bzip2 PYTHON3_DEPENDENCIES += bzip2
else else
PYTHON3_CONF_ENV += py_cv_module__bz2=n/a PYTHON3_CONF_OPTS += --disable-bzip2
endif endif
ifeq ($(BR2_PACKAGE_PYTHON3_XZ),y) ifeq ($(BR2_PACKAGE_PYTHON3_XZ),y)
PYTHON3_DEPENDENCIES += xz PYTHON3_DEPENDENCIES += xz
else else
PYTHON3_CONF_ENV += py_cv_module__lzma=n/a PYTHON3_CONF_OPTS += --disable-xz
endif endif
ifeq ($(BR2_PACKAGE_PYTHON3_ZLIB),y) ifeq ($(BR2_PACKAGE_PYTHON3_ZLIB),y)
PYTHON3_DEPENDENCIES += zlib PYTHON3_DEPENDENCIES += zlib
else else
PYTHON3_CONF_ENV += py_cv_module_zlib=n/a PYTHON3_CONF_OPTS += --disable-zlib
endif endif
ifneq ($(BR2_PACKAGE_PYTHON3_OSSAUDIODEV),y) ifeq ($(BR2_PACKAGE_PYTHON3_OSSAUDIODEV),y)
PYTHON3_CONF_ENV += py_cv_module_ossaudiodev=n/a PYTHON3_CONF_OPTS += --enable-ossaudiodev
else
PYTHON3_CONF_OPTS += --disable-ossaudiodev
endif endif
# Make python believe we don't have 'hg', so that it doesn't try to # Make python believe we don't have 'hg', so that it doesn't try to
@ -177,7 +163,6 @@ PYTHON3_CONF_ENV += \
ac_cv_file__dev_ptmx=yes \ ac_cv_file__dev_ptmx=yes \
ac_cv_file__dev_ptc=yes \ ac_cv_file__dev_ptc=yes \
ac_cv_working_tzset=yes \ ac_cv_working_tzset=yes \
py_cv_module_nis=n/a \
ac_cv_prog_HAS_HG=/bin/false ac_cv_prog_HAS_HG=/bin/false
# GCC is always compliant with IEEE754 # GCC is always compliant with IEEE754
@ -205,6 +190,7 @@ PYTHON3_CONF_OPTS += \
--disable-pydoc \ --disable-pydoc \
--disable-test-modules \ --disable-test-modules \
--disable-tk \ --disable-tk \
--disable-nis \
--disable-idle3 \ --disable-idle3 \
--disable-pyc-build --disable-pyc-build