diff --git a/package/python3/0008-Add-an-option-to-disable-pydoc.patch b/package/python3/0008-Add-an-option-to-disable-pydoc.patch index 3c678bef1c..ffb6a7796f 100644 --- a/package/python3/0008-Add-an-option-to-disable-pydoc.patch +++ b/package/python3/0008-Add-an-option-to-disable-pydoc.patch @@ -1,4 +1,4 @@ -From 77fcd90a1236d59d40aa32d3bc4bef4303eb4066 Mon Sep 17 00:00:00 2001 +From e6284624679a525440dc4bfddc1347f8add22fd8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 17:07:56 -0800 Subject: [PATCH] Add an option to disable pydoc @@ -12,6 +12,8 @@ Signed-off-by: Samuel Martin Signed-off-by: Andrey Smirnov [ Adam Duskett: ported to Python 3.10.0 ] Signed-off-by: Adam Duskett +[ Vincent Fazio: fix scripts array to reflect upstream ] +Signed-off-by: Vincent Fazio --- Makefile.pre.in | 7 ++++++- configure.ac | 6 ++++++ @@ -19,7 +21,7 @@ Signed-off-by: Adam Duskett 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 5a40b7c5484..e87bc1fcd32 100644 +index 5a40b7c548..e87bc1fcd3 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1877,7 +1877,9 @@ bininstall: commoninstall altbininstall @@ -52,7 +54,7 @@ index 5a40b7c5484..e87bc1fcd32 100644 libinstall: all $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ diff --git a/configure.ac b/configure.ac -index b4d7d2cca6a..d56d8f9d1c5 100644 +index b4d7d2cca6..d56d8f9d1c 100644 --- a/configure.ac +++ b/configure.ac @@ -4222,6 +4222,12 @@ AS_VAR_IF([posix_threads], [stub], [ @@ -69,7 +71,7 @@ index b4d7d2cca6a..d56d8f9d1c5 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 53b066cb18b..d8647724650 100644 +index 53b066cb18..25e6f4fc26 100644 --- a/setup.py +++ b/setup.py @@ -1597,6 +1597,12 @@ class DummyProcess: @@ -77,8 +79,8 @@ index 53b066cb18b..d8647724650 100644 import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) + -+ scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3', -+ 'Lib/smtpd.py'] ++ scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3'] ++ + if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"): + scripts += [ 'Tools/scripts/pydoc3' ] + @@ -96,5 +98,5 @@ index 53b066cb18b..d8647724650 100644 # --install-platlib -- -2.44.0 +2.34.1 diff --git a/package/python3/0009-Add-an-option-to-disable-lib2to3.patch b/package/python3/0009-Add-an-option-to-disable-lib2to3.patch index 13cb273bf8..06f38e92b3 100644 --- a/package/python3/0009-Add-an-option-to-disable-lib2to3.patch +++ b/package/python3/0009-Add-an-option-to-disable-lib2to3.patch @@ -1,4 +1,4 @@ -From 18e19402fab3939223a58481734e685d25c3102b Mon Sep 17 00:00:00 2001 +From 3fbd10c59a777c4ef7ee1bd3fb70808e25e11703 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 22 Feb 2017 17:15:31 -0800 Subject: [PATCH] Add an option to disable lib2to3 @@ -14,14 +14,16 @@ Signed-off-by: Andrey Smirnov Signed-off-by: Adam Duskett [ Bernd Kuhls: ported to Python 3.11.4] Signed-off-by: Bernd Kuhls +[ Vincent Fazio: fix scripts array to reflect upstream ] +Signed-off-by: Vincent Fazio --- Makefile.pre.in | 17 ++++++++++++----- configure.ac | 6 ++++++ - setup.py | 6 +++--- - 3 files changed, 21 insertions(+), 8 deletions(-) + setup.py | 4 +++- + 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index e87bc1fcd32..1a0ab0de426 100644 +index e87bc1fcd3..1a0ab0de42 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1881,7 +1881,9 @@ ifeq (@PYDOC@,yes) @@ -82,7 +84,7 @@ index e87bc1fcd32..1a0ab0de426 100644 # bpo-21536: Misc/python-config.sh is generated in the build directory # from $(srcdir)Misc/python-config.sh.in. diff --git a/configure.ac b/configure.ac -index d56d8f9d1c5..bf91fb2f824 100644 +index d56d8f9d1c..bf91fb2f82 100644 --- a/configure.ac +++ b/configure.ac @@ -7147,6 +7147,12 @@ PY_STDLIB_MOD([xxlimited_35], [test "$with_trace_refs" = "no"], [test "$ac_cv_fu @@ -99,24 +101,23 @@ index d56d8f9d1c5..bf91fb2f824 100644 AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh) AC_CONFIG_FILES([Modules/Setup.bootstrap Modules/Setup.stdlib]) diff --git a/setup.py b/setup.py -index d8647724650..e02591dae10 100644 +index 25e6f4fc26..78d880f9db 100644 --- a/setup.py +++ b/setup.py -@@ -1598,11 +1598,11 @@ class DummyProcess: +@@ -1598,10 +1598,12 @@ 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'] +- scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3'] ++ scripts = ['Tools/scripts/idle3'] + 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.44.0 +2.34.1 diff --git a/package/python3/0017-Add-an-option-to-disable-IDLE.patch b/package/python3/0017-Add-an-option-to-disable-IDLE.patch index f0af3f53f4..fe44ef0d05 100644 --- a/package/python3/0017-Add-an-option-to-disable-IDLE.patch +++ b/package/python3/0017-Add-an-option-to-disable-IDLE.patch @@ -1,4 +1,4 @@ -From f74c580b9e5bd8c710627b48cea4e152426e71e6 Mon Sep 17 00:00:00 2001 +From dd4ac2662ae1feaa3a29c4088193e48645b080f7 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 22 Feb 2017 17:45:14 -0800 Subject: [PATCH] Add an option to disable IDLE @@ -11,14 +11,16 @@ Signed-off-by: Maxime Ripard Signed-off-by: Andrey Smirnov [ Adam Duskett: ported to Python 3.10.0 ] Signed-off-by: Adam Duskett +[ Vincent Fazio: fixup setup array to reflect upstream ] +Signed-off-by: Vincent Fazio --- Makefile.pre.in | 7 ++++++- configure.ac | 6 ++++++ - setup.py | 5 ++++- - 3 files changed, 16 insertions(+), 2 deletions(-) + setup.py | 4 +++- + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 8e5f6762d20..4e407cbcfa9 100644 +index 8e5f6762d2..4e407cbcfa 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1875,7 +1875,9 @@ bininstall: commoninstall altbininstall @@ -51,7 +53,7 @@ index 8e5f6762d20..4e407cbcfa9 100644 libinstall: all $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ diff --git a/configure.ac b/configure.ac -index cb7e980e5b5..fe497ec9dfb 100644 +index cb7e980e5b..fe497ec9df 100644 --- a/configure.ac +++ b/configure.ac @@ -7206,6 +7206,12 @@ AC_ARG_ENABLE(lib2to3, @@ -68,25 +70,25 @@ index cb7e980e5b5..fe497ec9dfb 100644 AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh) AC_CONFIG_FILES([Modules/Setup.bootstrap Modules/Setup.stdlib]) diff --git a/setup.py b/setup.py -index e02591dae10..ada914c5501 100644 +index 78d880f9db..ca05faec97 100644 --- a/setup.py +++ b/setup.py -@@ -1598,11 +1598,14 @@ class DummyProcess: +@@ -1598,12 +1598,14 @@ class DummyProcess: import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) -- scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py'] -+ scripts = [ 'Lib/smtpd.py'] +- scripts = ['Tools/scripts/idle3'] ++ scripts = [] + 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.44.0 +2.34.1 diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 5d9d77af50..6859fc2274 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -36,8 +36,7 @@ HOST_PYTHON3_CONF_OPTS += \ # Make python believe we don't have 'hg', so that it doesn't try to # communicate over the network during the build. HOST_PYTHON3_CONF_ENV += \ - LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \ - ac_cv_prog_HAS_HG=/bin/false + LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" PYTHON3_DEPENDENCIES = host-python3 libffi @@ -156,14 +155,11 @@ else PYTHON3_CONF_OPTS += --disable-ossaudiodev endif -# Make python believe we don't have 'hg', so that it doesn't try to -# communicate over the network during the build. PYTHON3_CONF_ENV += \ ac_cv_have_long_long_format=yes \ ac_cv_file__dev_ptmx=yes \ ac_cv_file__dev_ptc=yes \ - ac_cv_working_tzset=yes \ - ac_cv_prog_HAS_HG=/bin/false + ac_cv_working_tzset=yes # GCC is always compliant with IEEE754 ifeq ($(BR2_ENDIAN),"LITTLE") @@ -200,18 +196,11 @@ PYTHON3_CONF_OPTS += \ # define PYTHON3_REMOVE_USELESS_FILES rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)-config - rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config rm -f $(TARGET_DIR)/usr/bin/python3-config - rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3 - rm -f $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/distutils/command/wininst*.exe - for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m-*/ \ - -type f -not -name Makefile` ; do \ - rm -f $$i ; \ - done - rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/__pycache__/ - rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/lib-dynload/sysconfigdata/__pycache__ - rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/collections/__pycache__ - rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/importlib/__pycache__ + find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)-*/ \ + -type f -not -name Makefile -exec rm -rf {} \; + find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/ -type d \ + -name __pycache__ -exec rm -rf {} \; endef PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_USELESS_FILES