Browse Source

- python3: move target to package dir

master
vanhofen 3 years ago
parent
commit
157424ff4d
  1. 4
      make/environment-host.mk
  2. 44
      make/host-tools.mk
  3. 6
      package/python3/patches/0001-Make-the-build-of-pyc-files-conditional.patch
  4. 2
      package/python3/patches/0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch
  5. 16
      package/python3/patches/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch
  6. 52
      package/python3/patches/0004-Adjust-library-header-paths-for-cross-compilation.patch
  7. 4
      package/python3/patches/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch
  8. 2
      package/python3/patches/0006-Don-t-add-multiarch-paths.patch
  9. 2
      package/python3/patches/0007-Abort-on-failed-module-build.patch
  10. 6
      package/python3/patches/0011-Add-importlib-fix-for-PEP-3147-issue.patch
  11. 39
      package/python3/patches/0011-Override-system-locale-and-set-to-default-when-addin.patch
  12. 49
      package/python3/patches/0012-Add-an-option-to-disable-pydoc.patch
  13. 117
      package/python3/patches/0013-Add-an-option-to-disable-installation-of-test-module.patch
  14. 83
      package/python3/patches/0013-Add-an-option-to-disable-lib2to3.patch
  15. 46
      package/python3/patches/0014-Add-option-to-disable-the-sqlite3-module.patch
  16. 61
      package/python3/patches/0015-Add-an-option-to-disable-the-tk-module.patch
  17. 37
      package/python3/patches/0016-Add-an-option-to-disable-the-curses-module.patch
  18. 43
      package/python3/patches/0017-Add-an-option-to-disable-expat.patch
  19. 2
      package/python3/patches/0018-Add-an-option-to-disable-CJK-codecs.patch
  20. 2
      package/python3/patches/0019-Add-an-option-to-disable-NIS.patch
  21. 2
      package/python3/patches/0020-Add-an-option-to-disable-unicodedata.patch
  22. 51
      package/python3/patches/0021-Add-an-option-to-disable-IDLE.patch
  23. 6
      package/python3/patches/0022-Add-an-option-to-disable-decimal.patch
  24. 2
      package/python3/patches/0023-Add-an-option-to-disable-the-ossaudiodev-module.patch
  25. 6
      package/python3/patches/0024-Add-an-option-to-disable-openssl-support.patch
  26. 6
      package/python3/patches/0025-Add-an-option-to-disable-the-readline-module.patch
  27. 6
      package/python3/patches/0026-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch
  28. 4
      package/python3/patches/0027-python-config.sh-don-t-reassign-prefix.patch
  29. 19
      package/python3/patches/0028-Fix-cross-compiling-the-uuid-module.patch
  30. 6
      package/python3/patches/0029-Add-an-option-to-disable-uuid-module.patch
  31. 0
      package/python3/patches/0030-fix-building-on-older-distributions.patch
  32. 35
      package/python3/patches/0031-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch
  33. 30
      package/python3/patches/0032-Add-an-option-to-disable-the-berkeleydb-module.patch
  34. 0
      package/python3/patches/0033-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch
  35. 72
      package/python3/python3.mk

4
make/environment-host.mk

@ -61,7 +61,7 @@ HOST_PYTHON_BUILD = \
CFLAGS="$(CFLAGS)" \
LDFLAGS="$(LDFLAGS)" \
LDSHARED="$(HOSTCC) -shared" \
PYTHONPATH=$(HOST_DIR)/$(HOST_PYTHON3_BASE_DIR)/site-packages \
PYTHONPATH=$(HOST_DIR)/$(HOST_PYTHON3_LIB_DIR)/site-packages \
$(HOST_DIR)/bin/python3 ./setup.py build --executable=/usr/python
HOST_PYTHON_INSTALL = \
@ -69,5 +69,5 @@ HOST_PYTHON_INSTALL = \
CFLAGS="$(CFLAGS)" \
LDFLAGS="$(LDFLAGS)" \
LDSHARED="$(HOSTCC) -shared" \
PYTHONPATH=$(HOST_DIR)/$(HOST_PYTHON3_BASE_DIR)/site-packages \
PYTHONPATH=$(HOST_DIR)/$(HOST_PYTHON3_LIB_DIR)/site-packages \
$(HOST_DIR)/bin/python3 ./setup.py install --root=$(HOST_DIR) --prefix=

44
make/host-tools.mk

@ -58,50 +58,6 @@ host-meson: $(HOST_MESON_DEPENDENCIES) $(DL_DIR)/$(HOST_MESON_SOURCE) | $(HOST_D
# -----------------------------------------------------------------------------
HOST_PYTHON3_VERSION = 3.9.0
HOST_PYTHON3_DIR = Python-$(HOST_PYTHON3_VERSION)
HOST_PYTHON3_SOURCE = Python-$(HOST_PYTHON3_VERSION).tar.xz
HOST_PYTHON3_SITE = https://www.python.org/ftp/python/$(HOST_PYTHON3_VERSION)
HOST_PYTHON3_BASE_DIR = lib/python$(basename $(HOST_PYTHON3_VERSION))
HOST_PYTHON3_INCLUDE_DIR = include/python$(basename $(HOST_PYTHON3_VERSION))
$(DL_DIR)/$(HOST_PYTHON3_SOURCE):
$(download) $(HOST_PYTHON3_SITE)/$(HOST_PYTHON3_SOURCE)
HOST_PYTHON3_DEPENDENCIES = host-expat host-libffi
HOST_PYTHON3_CONF_ENV = \
OPT="$(HOST_CFLAGS)"
HOST_PYTHON3_CONF_OPTS = \
--without-ensurepip \
--without-cxx-main \
--disable-sqlite3 \
--disable-tk \
--with-expat=system \
--disable-curses \
--disable-codecs-cjk \
--disable-nis \
--enable-unicodedata \
--disable-test-modules \
--disable-idle3 \
--disable-ossaudiodev
host-python3: $(HOST_PYTHON3_DEPENDENCIES) $(DL_DIR)/$(HOST_PYTHON3_SOURCE) | $(HOST_DIR)
$(REMOVE)/$(PKG_DIR)
$(UNTAR)/$(PKG_SOURCE)
#$(call APPLY_PATCHES,$(PKG_PATCHES_DIR))
$(CHDIR)/$(PKG_DIR); \
autoconf; \
$(HOST_CONFIGURE);\
$(MAKE); \
$(MAKE) install
$(REMOVE)/$(PKG_DIR)
$(TOUCH)
# -----------------------------------------------------------------------------
HOST_PYTHON3_SETUPTOOLS_VERSION = 44.0.0
HOST_PYTHON3_SETUPTOOLS_DIR = setuptools-$(HOST_PYTHON3_SETUPTOOLS_VERSION)
HOST_PYTHON3_SETUPTOOLS_SOURCE = setuptools-$(HOST_PYTHON3_SETUPTOOLS_VERSION).zip

6
package/python3/patches/0001-Make-the-build-of-pyc-files-conditional.patch

@ -18,7 +18,7 @@ diff --git a/Makefile.pre.in b/Makefile.pre.in
index 77f91e72b1..0c809f3d8a 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1528,6 +1528,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c
@@ -1600,6 +1600,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
fi
@ -26,7 +26,7 @@ index 77f91e72b1..0c809f3d8a 100644
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-j0 -d $(LIBDEST) -f \
@@ -1555,6 +1556,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c
@@ -1627,6 +1628,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c
$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
-j0 -d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
@ -38,7 +38,7 @@ diff --git a/configure.ac b/configure.ac
index d60f05251a..1ee5a09588 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1112,6 +1112,12 @@ fi
@@ -1110,6 +1110,12 @@ fi
AC_MSG_CHECKING(LDLIBRARY)

2
package/python3/patches/0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch

@ -13,7 +13,7 @@ diff --git a/configure.ac b/configure.ac
index 1ee5a09588..c2445edc88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4175,7 +4175,7 @@ fi
@@ -4230,7 +4230,7 @@ fi
AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)

16
package/python3/patches/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch

@ -47,7 +47,7 @@ diff --git a/Makefile.pre.in b/Makefile.pre.in
index 0c809f3d8a..7c3dde8dd4 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -213,6 +213,8 @@ FILEMODE= 644
@@ -218,6 +218,8 @@ FILEMODE= 644
# configure script arguments
CONFIG_ARGS= @CONFIG_ARGS@
@ -56,7 +56,7 @@ index 0c809f3d8a..7c3dde8dd4 100644
# Subdirectories with code
SRCDIRS= @SRCDIRS@
@@ -629,6 +631,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
@@ -628,6 +630,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)' \
@ -64,7 +64,7 @@ index 0c809f3d8a..7c3dde8dd4 100644
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
@@ -1674,7 +1677,8 @@ libainstall: @DEF_MAKE_RULE@ python-config
@@ -1748,7 +1751,8 @@ libainstall: @DEF_MAKE_RULE@ python-config
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: sharedmods
@ -78,7 +78,7 @@ diff --git a/configure.ac b/configure.ac
index c2445edc88..73d66167de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3052,6 +3052,8 @@ LIBS="$withval $LIBS"
@@ -3091,6 +3091,8 @@ LIBS="$withval $LIBS"
PKG_PROG_PKG_CONFIG
@ -91,8 +91,8 @@ diff --git a/setup.py b/setup.py
index 770866bca7..b6c829b3a5 100644
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,10 @@ from distutils.spawn import find_executable
TEST_EXTENSIONS = True
@@ -58,7 +58,10 @@ with warnings.catch_warnings():
TEST_EXTENSIONS = (sysconfig.get_config_var('TEST_MODULES') == 'yes')
# This global variable is used to hold the list of modules to be disabled.
-DISABLED_MODULE_LIST = []
@ -101,8 +101,8 @@ index 770866bca7..b6c829b3a5 100644
+except KeyError:
+ DISABLED_MODULE_LIST = list()
def get_platform():
# --list-module-names option used by Tools/scripts/generate_module_names.py
LIST_MODULE_NAMES = False
--
2.25.1

52
package/python3/patches/0004-Adjust-library-header-paths-for-cross-compilation.patch

@ -15,13 +15,15 @@ values, and get correct header/library paths when cross-compiling
third-party Python modules.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
Refresh for 3.10.0
---
Lib/distutils/command/build_ext.py | 5 ++++-
Lib/distutils/sysconfig.py | 15 +++++++++++----
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 1a9bd1200f..3cf7d6746e 100644
index 1a9bd12..3cf7d67 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -234,7 +234,10 @@ class build_ext(Command):
@ -36,32 +38,32 @@ index 1a9bd1200f..3cf7d6746e 100644
else:
# building python standard extensions
self.library_dirs.append('.')
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 37feae5df7..e9c3a27856 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -17,10 +17,17 @@ import sys
from .errors import DistutilsPlatformError
# These are needed in a couple of spots, so just compute them once.
-PREFIX = os.path.normpath(sys.prefix)
-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-BASE_PREFIX = os.path.normpath(sys.base_prefix)
-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 95b48f6..9fb1956 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -123,10 +123,17 @@ _SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include',
_PY_VERSION = sys.version.split()[0]
_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]}'
-_PREFIX = os.path.normpath(sys.prefix)
-_BASE_PREFIX = os.path.normpath(sys.base_prefix)
-_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
+if "_python_sysroot" in os.environ:
+ _sysroot=os.environ.get('_python_sysroot')
+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
+ BASE_PREFIX = PREFIX
+ BASE_EXEC_PREFIX = EXEC_PREFIX
+ _PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
+ _EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
+ _BASE_PREFIX = _PREFIX
+ _BASE_EXEC_PREFIX = _EXEC_PREFIX
+else:
+ PREFIX = os.path.normpath(sys.prefix)
+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+ BASE_PREFIX = os.path.normpath(sys.base_prefix)
+ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
+ _PREFIX = os.path.normpath(sys.prefix)
+ _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+ _BASE_PREFIX = os.path.normpath(sys.base_prefix)
+ _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
_CONFIG_VARS = None
_USER_BASE = None
# Path to the base directory of the project. On Windows the binary may
# live in project/PCbuild/win32 or project/PCbuild/amd64.
--
2.25.1
2.30.2

4
package/python3/patches/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch

@ -9,10 +9,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/setup.py b/setup.py
index b6c829b3a5..ec3ba60607 100644
index 66d372a..e632b6f 100644
--- a/setup.py
+++ b/setup.py
@@ -1056,12 +1056,9 @@ class PyBuildExt(build_ext):
@@ -1147,12 +1147,9 @@ class PyBuildExt(build_ext):
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
readline_libs.append(curses_library)

2
package/python3/patches/0006-Don-t-add-multiarch-paths.patch

@ -20,7 +20,7 @@ diff --git a/setup.py b/setup.py
index ec3ba60607..e27620035c 100644
--- a/setup.py
+++ b/setup.py
@@ -749,10 +749,10 @@ class PyBuildExt(build_ext):
@@ -830,10 +830,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')

2
package/python3/patches/0007-Abort-on-failed-module-build.patch

@ -17,7 +17,7 @@ diff --git a/setup.py b/setup.py
index e27620035c..d3f0e663f2 100644
--- a/setup.py
+++ b/setup.py
@@ -539,6 +539,7 @@ class PyBuildExt(build_ext):
@@ -561,6 +561,7 @@ class PyBuildExt(build_ext):
print("Failed to build these modules:")
print_three_column(failed)
print()

6
package/python3/patches/0012-Add-importlib-fix-for-PEP-3147-issue.patch → package/python3/patches/0011-Add-importlib-fix-for-PEP-3147-issue.patch

@ -28,7 +28,7 @@ diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_ext
index 25a3f8c0e0..2cb9a9aa52 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -313,8 +313,6 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
@@ -392,8 +392,6 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
a True value is the same as setting 'optimization' to the empty string
while a False value is equivalent to setting 'optimization' to '1'.
@ -37,7 +37,7 @@ index 25a3f8c0e0..2cb9a9aa52 100644
"""
if debug_override is not None:
_warnings.warn('the debug_override parameter is deprecated; use '
@@ -326,10 +324,7 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
@@ -405,10 +403,7 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
path = _os.fspath(path)
head, tail = _path_split(path)
base, sep, rest = tail.rpartition('.')
@ -49,7 +49,7 @@ index 25a3f8c0e0..2cb9a9aa52 100644
if optimization is None:
if sys.flags.optimize == 0:
optimization = ''
@@ -366,46 +361,17 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
@@ -445,46 +440,17 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
head.lstrip(path_separators),
filename,
)

39
package/python3/patches/0011-Override-system-locale-and-set-to-default-when-addin.patch

@ -1,39 +0,0 @@
From e4ae670e3489544a49dabd1618c32fe73504a7ba Mon Sep 17 00:00:00 2001
From: Samuel Cabrero <samuelcabrero@gmail.com>
Date: Wed, 23 Dec 2015 11:45:48 +0100
Subject: [PATCH] Override system locale and set to default when adding gcc
paths
Forces the use of the default locale in the function
add_gcc_paths, which is called when cross compiling to add the
include and library paths. This is necessary because otherwise
the gcc output is localized and the output parsing fails, which
results in no paths added and detect_modules not able to find
any system library (eg. libz, libssl, etc.)
[Thomas: patch taken from https://bugs.python.org/issue23767.]
Signed-off-by: Samuel Cabrero <samuelcabrero@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[james.hilliard1@gmail.com: adapt to python 3.9]
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index d3f0e663f2..926c16f58f 100644
--- a/setup.py
+++ b/setup.py
@@ -695,7 +695,7 @@ class PyBuildExt(build_ext):
tmpfile = os.path.join(self.build_temp, 'ccpaths')
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
- ret = run_command('%s -E -v - </dev/null 2>%s 1>/dev/null' % (cc, tmpfile))
+ ret = run_command('LC_ALL=C %s -E -v - </dev/null 2>%s 1>/dev/null' % (cc, tmpfile))
is_gcc = False
is_clang = False
in_incdirs = False
--
2.25.1

49
package/python3/patches/0014-Add-an-option-to-disable-pydoc.patch → package/python3/patches/0012-Add-an-option-to-disable-pydoc.patch

@ -10,17 +10,19 @@ 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 | 8 +++++++-
Makefile.pre.in | 7 ++++++-
configure.ac | 6 ++++++
setup.py | 9 +++++++--
3 files changed, 20 insertions(+), 3 deletions(-)
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 204f293d53..63e3df0470 100644
index c0d5511..32b3df7 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1357,7 +1357,9 @@ bininstall: altbininstall
@@ -1391,7 +1391,9 @@ bininstall: altbininstall
-rm -f $(DESTDIR)$(BINDIR)/idle3
(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
@ -30,31 +32,30 @@ index 204f293d53..63e3df0470 100644
-rm -f $(DESTDIR)$(BINDIR)/2to3
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
@@ -1403,7 +1405,7 @@ LIBSUBDIRS= tkinter site-packages \
@@ -1442,7 +1444,6 @@ LIBSUBDIRS= asyncio \
lib2to3 lib2to3/fixes lib2to3/pgen2 \
logging \
multiprocessing multiprocessing/dummy \
unittest \
venv venv/scripts venv/scripts/common venv/scripts/posix \
- curses pydoc_data \
+ curses \
zoneinfo
TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
@@ -1486,6 +1488,10 @@ ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
- pydoc_data \
site-packages \
sqlite3 \
tkinter \
@@ -1530,6 +1531,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: build_all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
diff --git a/configure.ac b/configure.ac
index 92e28d02ee..174ed85a7c 100644
index 083a12d..9079531 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3329,6 +3329,12 @@ if test "$posix_threads" = "yes"; then
@@ -3373,6 +3373,12 @@ if test "$posix_threads" = "yes"; then
AC_CHECK_FUNCS(pthread_getcpuclockid)
fi
@ -64,14 +65,14 @@ index 92e28d02ee..174ed85a7c 100644
+ AS_HELP_STRING([--disable-pydoc], [disable pydoc]),
+ [ PYDOC="${enableval}" ], [ PYDOC=yes ])
+
AC_SUBST(TEST_MODULES)
AC_ARG_ENABLE(test-modules,
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
diff --git a/setup.py b/setup.py
index 926c16f58f..1fc5fac90c 100644
index d00d389..d23f148 100644
--- a/setup.py
+++ b/setup.py
@@ -2586,6 +2586,12 @@ def main():
@@ -2721,6 +2721,12 @@ def main():
# turn off warnings when deprecated modules are imported
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
@ -84,7 +85,7 @@ index 926c16f58f..1fc5fac90c 100644
setup(# PyPI Metadata (PEP 301)
name = "Python",
version = sys.version.split()[0],
@@ -2610,8 +2616,7 @@ def main():
@@ -2746,8 +2752,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
@ -95,5 +96,5 @@ index 926c16f58f..1fc5fac90c 100644
# --install-platlib
--
2.25.1
2.30.2

117
package/python3/patches/0013-Add-an-option-to-disable-installation-of-test-module.patch

@ -1,117 +0,0 @@
From 0337342d413d13f437fd089de91faee70a8bf3f9 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 22 Feb 2017 17:01:18 -0800
Subject: [PATCH] Add an option to disable installation of test modules
The Python standard distribution comes with many test modules, that
are not necessarly useful on embedded targets.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
[james.hilliard1@gmail.com: adapt to python 3.9]
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Makefile.pre.in | 56 ++++++++++++++++++++++++++++++++-----------------
configure.ac | 5 +++++
2 files changed, 42 insertions(+), 19 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 7c3dde8dd4..204f293d53 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1385,8 +1385,29 @@ maninstall: altmaninstall
# Install the library
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
-LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
- tkinter/test/test_ttk site-packages test \
+
+LIBSUBDIRS= tkinter site-packages \
+ asyncio \
+ collections concurrent concurrent/futures encodings \
+ email email/mime \
+ ensurepip ensurepip/_bundled \
+ html json http dbm xmlrpc \
+ sqlite3 \
+ logging csv wsgiref urllib \
+ lib2to3 lib2to3/fixes lib2to3/pgen2 \
+ ctypes ctypes/macholib \
+ idlelib idlelib/Icons \
+ distutils distutils/command $(XMLLIBSUBDIRS) \
+ importlib \
+ turtledemo \
+ multiprocessing multiprocessing/dummy \
+ unittest \
+ venv venv/scripts venv/scripts/common venv/scripts/posix \
+ curses pydoc_data \
+ zoneinfo
+
+TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
+ tkinter/test/test_ttk test \
test/audiodata \
test/capath test/data \
test/cjkencodings test/decimaltestdata \
@@ -1446,28 +1467,25 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
test/test_importlib/zipdata02 \
test/test_zoneinfo test/test_zoneinfo/data \
test/ziptestdata \
- asyncio \
test/test_asyncio \
- collections concurrent concurrent/futures encodings \
- email email/mime test/test_email test/test_email/data \
- ensurepip ensurepip/_bundled \
- html json test/test_json http dbm xmlrpc \
- sqlite3 sqlite3/test \
- logging csv wsgiref urllib \
- lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
+ test/test_email test/test_email/data \
+ test/test_json \
+ sqlite3/test \
+ lib2to3/tests \
lib2to3/tests/data lib2to3/tests/data/fixers \
lib2to3/tests/data/fixers/myfixes \
- ctypes ctypes/test ctypes/macholib \
- idlelib idlelib/Icons idlelib/idle_test \
- distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
+ ctypes/test \
+ idlelib/idle_test \
+ distutils/tests \
test/test_peg_generator \
+ test/test_importlib test/test_importlib/builtin \
test/test_tools test/test_warnings test/test_warnings/data \
- turtledemo \
- multiprocessing multiprocessing/dummy \
- unittest unittest/test unittest/test/testmock \
- venv venv/scripts venv/scripts/common venv/scripts/posix \
- curses pydoc_data \
- zoneinfo
+ unittest/test unittest/test/testmock
+
+ifeq (@TEST_MODULES@,yes)
+LIBSUBDIRS += $(TESTSUBDIRS)
+endif
+
libinstall: build_all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
diff --git a/configure.ac b/configure.ac
index 73d66167de..92e28d02ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3329,6 +3329,11 @@ if test "$posix_threads" = "yes"; then
AC_CHECK_FUNCS(pthread_getcpuclockid)
fi
+AC_SUBST(TEST_MODULES)
+
+AC_ARG_ENABLE(test-modules,
+ AS_HELP_STRING([--disable-test-modules], [disable test modules]),
+ [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
--
2.25.1

83
package/python3/patches/0015-Add-an-option-to-disable-lib2to3.patch → package/python3/patches/0013-Add-an-option-to-disable-lib2to3.patch

@ -10,17 +10,19 @@ 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 | 16 ++++++++++++----
configure.ac | 6 ++++++
setup.py | 5 +++--
3 files changed, 21 insertions(+), 6 deletions(-)
Makefile.pre.in | 17 ++++++++++++-----
configure.ac | 5 +++++
setup.py | 6 +++---
3 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 63e3df0470..8b7de12999 100644
index 28cf88e..63fa9fb 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1361,7 +1361,9 @@ ifeq (@PYDOC@,yes)
@@ -1395,7 +1395,9 @@ ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
endif
-rm -f $(DESTDIR)$(BINDIR)/2to3
@ -30,27 +32,28 @@ index 63e3df0470..8b7de12999 100644
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \
@@ -1396,7 +1398,6 @@ LIBSUBDIRS= tkinter site-packages \
html json http dbm xmlrpc \
sqlite3 \
logging csv wsgiref urllib \
- lib2to3 lib2to3/fixes lib2to3/pgen2 \
ctypes ctypes/macholib \
@@ -1441,7 +1443,6 @@ LIBSUBDIRS= asyncio \
idlelib idlelib/Icons \
distutils distutils/command $(XMLLIBSUBDIRS) \
@@ -1473,9 +1474,6 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
test/test_email test/test_email/data \
test/test_json \
sqlite3/test \
importlib importlib/metadata \
json \
- lib2to3 lib2to3/fixes lib2to3/pgen2 \
logging \
multiprocessing multiprocessing/dummy \
site-packages \
@@ -1458,10 +1459,6 @@ LIBSUBDIRS= asyncio \
TESTSUBDIRS= ctypes/test \
distutils/tests \
idlelib/idle_test \
- lib2to3/tests \
- lib2to3/tests/data lib2to3/tests/data/fixers \
- lib2to3/tests/data \
- lib2to3/tests/data/fixers \
- lib2to3/tests/data/fixers/myfixes \
ctypes/test \
idlelib/idle_test \
distutils/tests \
@@ -1484,6 +1482,14 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
test/test_tools test/test_warnings test/test_warnings/data \
unittest/test unittest/test/testmock
sqlite3/test \
test test/audiodata \
test/capath test/cjkencodings \
@@ -1535,6 +1532,14 @@ ifeq (@PYDOC@,yes)
LIBSUBDIRS += pydoc_data
endif
+ifeq (@LIB2TO3@,yes)
+LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
@ -60,10 +63,10 @@ index 63e3df0470..8b7de12999 100644
+ lib2to3/tests/data/fixers/myfixes
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
@@ -1584,10 +1590,12 @@ ifeq (@PYC_BUILD@,yes)
TEST_MODULES=@TEST_MODULES@
libinstall: build_all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
@@ -1637,10 +1642,12 @@ ifeq (@PYC_BUILD@,yes)
-j0 -d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
endif
@ -77,27 +80,26 @@ index 63e3df0470..8b7de12999 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 174ed85a7c..f1f5e9a7b0 100644
index 9079531..34c2ba9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3341,6 +3341,12 @@ AC_ARG_ENABLE(test-modules,
AS_HELP_STRING([--disable-test-modules], [disable test modules]),
[ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
@@ -6014,6 +6014,11 @@ else
fi
AC_SUBST(TEST_MODULES)
+AC_SUBST(LIB2TO3)
+
+AC_ARG_ENABLE(lib2to3,
+ AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
+ [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
+
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
# generate output files
AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)
diff --git a/setup.py b/setup.py
index 1fc5fac90c..4063d7ffa5 100644
index d23f148..663fd44 100644
--- a/setup.py
+++ b/setup.py
@@ -2587,10 +2587,11 @@ def main():
@@ -2722,11 +2722,11 @@ def main():
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
@ -106,11 +108,12 @@ index 1fc5fac90c..4063d7ffa5 100644
+ 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.25.1
2.30.2

46
package/python3/patches/0016-Add-option-to-disable-the-sqlite3-module.patch → package/python3/patches/0014-Add-option-to-disable-the-sqlite3-module.patch

@ -7,32 +7,34 @@ 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 | 9 +++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 8b7de12999..d826d8ac4b 100644
index 5847029..5628860 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1396,7 +1396,6 @@ LIBSUBDIRS= tkinter site-packages \
email email/mime \
ensurepip ensurepip/_bundled \
html json http dbm xmlrpc \
@@ -1446,7 +1446,6 @@ LIBSUBDIRS= asyncio \
logging \
multiprocessing multiprocessing/dummy \
site-packages \
- sqlite3 \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
@@ -1473,7 +1472,6 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
test/test_asyncio \
test/test_email test/test_email/data \
test/test_json \
- sqlite3/test \
ctypes/test \
idlelib/idle_test \
tkinter \
turtledemo \
unittest \
@@ -1459,7 +1458,6 @@ LIBSUBDIRS= asyncio \
TESTSUBDIRS= ctypes/test \
distutils/tests \
@@ -1490,6 +1488,11 @@ TESTSUBDIRS += lib2to3/tests \
idlelib/idle_test \
- sqlite3/test \
test test/audiodata \
test/capath test/cjkencodings \
test/data test/decimaltestdata \
@@ -1540,6 +1538,11 @@ TESTSUBDIRS += lib2to3/tests \
lib2to3/tests/data/fixers/myfixes
endif
@ -41,14 +43,14 @@ index 8b7de12999..d826d8ac4b 100644
+TESTSUBDIRS += sqlite3/test
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
TEST_MODULES=@TEST_MODULES@
libinstall: build_all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
diff --git a/configure.ac b/configure.ac
index f1f5e9a7b0..8b5c65974c 100644
index 34c2ba9..dfee472 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3329,6 +3329,15 @@ if test "$posix_threads" = "yes"; then
@@ -3373,6 +3373,15 @@ if test "$posix_threads" = "yes"; then
AC_CHECK_FUNCS(pthread_getcpuclockid)
fi
@ -65,5 +67,5 @@ index f1f5e9a7b0..8b5c65974c 100644
AC_ARG_ENABLE(pydoc,
--
2.25.1
2.30.2

61
package/python3/patches/0017-Add-an-option-to-disable-the-tk-module.patch → package/python3/patches/0015-Add-an-option-to-disable-the-tk-module.patch

@ -7,52 +7,53 @@ 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 | 11 ++++++++---
Makefile.pre.in | 10 +++++++---
configure.ac | 9 +++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index d826d8ac4b..dc84384680 100644
index 5628860..c968113 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1390,7 +1390,7 @@ maninstall: altmaninstall
# Install the library
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
-LIBSUBDIRS= tkinter site-packages \
+LIBSUBDIRS= site-packages \
asyncio \
collections concurrent concurrent/futures encodings \
email email/mime \
@@ -1408,8 +1408,7 @@ LIBSUBDIRS= tkinter site-packages \
curses \
zoneinfo
-TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
- tkinter/test/test_ttk test \
+TESTSUBDIRS= test \
test/audiodata \
test/capath test/data \
test/cjkencodings test/decimaltestdata \
@@ -1480,6 +1479,12 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
test/test_tools test/test_warnings test/test_warnings/data \
@@ -1446,7 +1446,6 @@ LIBSUBDIRS= asyncio \
logging \
multiprocessing multiprocessing/dummy \
site-packages \
- tkinter \
turtledemo \
unittest \
urllib \
@@ -1522,8 +1521,6 @@ TESTSUBDIRS= ctypes/test \
test/tracedmodules \
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)
@@ -1543,6 +1540,13 @@ LIBSUBDIRS += sqlite3
TESTSUBDIRS += sqlite3/test
endif
+ifeq (@TK@,yes)
+LIBSUBDIRS += tkinter
+TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
+ tkinter/test/test_ttk
+endif
+
ifeq (@LIB2TO3@,yes)
LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
TESTSUBDIRS += lib2to3/tests \
+
TEST_MODULES=@TEST_MODULES@
libinstall: build_all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
diff --git a/configure.ac b/configure.ac
index 8b5c65974c..4c72dae960 100644
index dfee472..dc76dff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3338,6 +3338,15 @@ if test "$SQLITE3" = "no" ; then
@@ -3382,6 +3382,15 @@ if test "$SQLITE3" = "no" ; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
@ -69,5 +70,5 @@ index 8b5c65974c..4c72dae960 100644
AC_ARG_ENABLE(pydoc,
--
2.25.1
2.30.2

37
package/python3/patches/0018-Add-an-option-to-disable-the-curses-module.patch → package/python3/patches/0016-Add-an-option-to-disable-the-curses-module.patch

@ -7,39 +7,40 @@ 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 | 5 ++++-
Makefile.pre.in | 4 +++-
configure.ac | 9 +++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index dc84384680..2a82f3308f 100644
index c968113..f89f155 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1405,7 +1405,6 @@ LIBSUBDIRS= site-packages \
multiprocessing multiprocessing/dummy \
unittest \
venv venv/scripts venv/scripts/common venv/scripts/posix \
@@ -1432,7 +1432,6 @@ LIBSUBDIRS= asyncio \
concurrent concurrent/futures \
csv \
ctypes ctypes/macholib \
- curses \
zoneinfo
TESTSUBDIRS= test \
@@ -1485,6 +1484,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
dbm \
distutils distutils/command \
email email/mime \
@@ -1546,6 +1545,9 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
tkinter/test/test_ttk
endif
+ifeq (@CURSES@,yes)
+LIBSUBDIRS += curses
+endif
+
ifeq (@LIB2TO3@,yes)
LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
TESTSUBDIRS += lib2to3/tests \
TEST_MODULES=@TEST_MODULES@
libinstall: build_all $(srcdir)/Modules/xxmodule.c
diff --git a/configure.ac b/configure.ac
index 4c72dae960..acd98381a3 100644
index dc76dff..4f1cda5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3347,6 +3347,15 @@ if test "$TK" = "no"; then
@@ -3391,6 +3391,15 @@ if test "$TK" = "no"; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
fi
@ -56,5 +57,5 @@ index 4c72dae960..acd98381a3 100644
AC_ARG_ENABLE(pydoc,
--
2.25.1
2.30.2

43
package/python3/patches/0019-Add-an-option-to-disable-expat.patch → package/python3/patches/0017-Add-an-option-to-disable-expat.patch

@ -13,26 +13,27 @@ 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 | 6 +++++-
Makefile.pre.in | 5 ++++-
configure.ac | 18 +++++++++++++-----
setup.py | 2 +-
3 files changed, 19 insertions(+), 7 deletions(-)
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 2a82f3308f..e678c8817e 100644
index f89f155..08c5e8a 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1399,7 +1399,7 @@ LIBSUBDIRS= site-packages \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
- distutils distutils/command $(XMLLIBSUBDIRS) \
+ distutils distutils/command \
importlib \
turtledemo \
multiprocessing multiprocessing/dummy \
@@ -1488,6 +1488,10 @@ ifeq (@CURSES@,yes)
@@ -1450,7 +1450,6 @@ LIBSUBDIRS= asyncio \
urllib \
venv venv/scripts venv/scripts/common venv/scripts/posix \
wsgiref \
- $(XMLLIBSUBDIRS) \
xmlrpc \
zoneinfo
TESTSUBDIRS= ctypes/test \
@@ -1549,6 +1548,10 @@ ifeq (@CURSES@,yes)
LIBSUBDIRS += curses
endif
@ -40,14 +41,14 @@ index 2a82f3308f..e678c8817e 100644
+LIBSUBDIRS += $(XMLLIBSUBDIRS)
+endif
+
ifeq (@LIB2TO3@,yes)
LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
TESTSUBDIRS += lib2to3/tests \
TEST_MODULES=@TEST_MODULES@
libinstall: build_all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
diff --git a/configure.ac b/configure.ac
index acd98381a3..9ef0ecd42f 100644
index 4f1cda5..e99a174 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3055,13 +3055,21 @@ PKG_PROG_PKG_CONFIG
@@ -3094,13 +3094,21 @@ PKG_PROG_PKG_CONFIG
AC_SUBST(DISABLED_EXTENSIONS)
# Check for use of the system expat library
@ -75,10 +76,10 @@ index acd98381a3..9ef0ecd42f 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 4063d7ffa5..211a160f29 100644
index 663fd44..e30ed52 100644
--- a/setup.py
+++ b/setup.py
@@ -1681,7 +1681,7 @@ class PyBuildExt(build_ext):
@@ -1764,7 +1764,7 @@ class PyBuildExt(build_ext):
#
# More information on Expat can be found at www.libexpat.org.
#
@ -88,5 +89,5 @@ index 4063d7ffa5..211a160f29 100644
define_macros = []
extra_compile_args = []
--
2.25.1
2.30.2

2
package/python3/patches/0020-Add-an-option-to-disable-CJK-codecs.patch → package/python3/patches/0018-Add-an-option-to-disable-CJK-codecs.patch

@ -12,7 +12,7 @@ diff --git a/configure.ac b/configure.ac
index 9ef0ecd42f..18e6fd70a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3346,6 +3346,12 @@ if test "$SQLITE3" = "no" ; then
@@ -3390,6 +3390,12 @@ if test "$SQLITE3" = "no" ; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi

2
package/python3/patches/0021-Add-an-option-to-disable-NIS.patch → package/python3/patches/0019-Add-an-option-to-disable-NIS.patch

@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac
index 18e6fd70a0..46d2a8131e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3352,6 +3352,12 @@ AC_ARG_ENABLE(codecs-cjk,
@@ -3396,6 +3396,12 @@ AC_ARG_ENABLE(codecs-cjk,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022"
fi])

2
package/python3/patches/0022-Add-an-option-to-disable-unicodedata.patch → package/python3/patches/0020-Add-an-option-to-disable-unicodedata.patch

@ -12,7 +12,7 @@ diff --git a/configure.ac b/configure.ac
index 46d2a8131e..5844e3b73f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3358,6 +3358,12 @@ AC_ARG_ENABLE(nis,
@@ -3402,6 +3402,12 @@ AC_ARG_ENABLE(nis,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])

51
package/python3/patches/0023-Add-an-option-to-disable-IDLE.patch → package/python3/patches/0021-Add-an-option-to-disable-IDLE.patch

@ -9,17 +9,19 @@ much sense to have it into our build.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
[ Andrey Smirnov: ported to Python 3.6 ]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
[ 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 | 4 +++-
3 files changed, 15 insertions(+), 2 deletions(-)
setup.py | 5 ++++-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index e678c8817e..1148bd8708 100644
index 08c5e8a..461c5e3 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1355,7 +1355,9 @@ bininstall: altbininstall
@@ -1389,7 +1389,9 @@ bininstall: altbininstall
-rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.pc)
-rm -f $(DESTDIR)$(BINDIR)/idle3
@ -29,15 +31,15 @@ index e678c8817e..1148bd8708 100644
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
@@ -1398,7 +1400,6 @@ LIBSUBDIRS= site-packages \
html json http dbm xmlrpc \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
@@ -1439,7 +1441,6 @@ LIBSUBDIRS= asyncio \
ensurepip ensurepip/_bundled \
html \
http \
- idlelib idlelib/Icons \
distutils distutils/command \
importlib \
turtledemo \
@@ -1492,6 +1493,10 @@ ifeq (@EXPAT@,yes)
importlib importlib/metadata \
json \
logging \
@@ -1552,6 +1553,10 @@ ifeq (@EXPAT@,yes)
LIBSUBDIRS += $(XMLLIBSUBDIRS)
endif
@ -45,14 +47,14 @@ index e678c8817e..1148bd8708 100644
+LIBSUBDIRS += idlelib idlelib/Icons
+endif
+
ifeq (@LIB2TO3@,yes)
LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
TESTSUBDIRS += lib2to3/tests \
TEST_MODULES=@TEST_MODULES@
libinstall: build_all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
diff --git a/configure.ac b/configure.ac
index 5844e3b73f..7bd4623ccd 100644
index e99a174..baaa743 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3400,6 +3400,12 @@ AC_ARG_ENABLE(lib2to3,
@@ -6073,6 +6073,12 @@ AC_ARG_ENABLE(lib2to3,
AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
[ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
@ -62,14 +64,14 @@ index 5844e3b73f..7bd4623ccd 100644
+ AS_HELP_STRING([--disable-idle3], [disable idle3 IDE]),
+ [ IDLE="${enableval}" ], [ IDLE=yes ])
+
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
# generate output files
AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
diff --git a/setup.py b/setup.py
index 211a160f29..c4ee989ba3 100644
index e30ed52..4dff249 100644
--- a/setup.py
+++ b/setup.py
@@ -2587,11 +2587,13 @@ def main():
@@ -2722,11 +2722,14 @@ def main():
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
@ -81,9 +83,10 @@ index 211a160f29..c4ee989ba3 100644
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.25.1
2.30.2

6
package/python3/patches/0024-Add-an-option-to-disable-decimal.patch → package/python3/patches/0022-Add-an-option-to-disable-decimal.patch

@ -22,7 +22,7 @@ diff --git a/configure.ac b/configure.ac
index 7bd4623ccd..e513ef6a20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3106,13 +3106,20 @@ fi
@@ -3145,13 +3145,20 @@ fi
AC_SUBST(LIBFFI_INCLUDEDIR)
# Check for use of the system libmpdec library
@ -52,14 +52,14 @@ diff --git a/setup.py b/setup.py
index c4ee989ba3..3d0c74bb7f 100644
--- a/setup.py
+++ b/setup.py
@@ -2221,7 +2221,7 @@ class PyBuildExt(build_ext):
@@ -2321,7 +2321,7 @@ class PyBuildExt(build_ext):
# Stefan Krah's _decimal module
extra_compile_args = []
undef_macros = []
- if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
+ if '--with-libmpdec=system' in sysconfig.get_config_var("CONFIG_ARGS"):
include_dirs = []
libraries = [':libmpdec.so.2']
libraries = ['mpdec']
sources = ['_decimal/_decimal.c']
--
2.25.1

2
package/python3/patches/0025-Add-an-option-to-disable-the-ossaudiodev-module.patch → package/python3/patches/0023-Add-an-option-to-disable-the-ossaudiodev-module.patch

@ -12,7 +12,7 @@ diff --git a/configure.ac b/configure.ac
index e513ef6a20..c07505e89e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3136,6 +3136,12 @@ fi
@@ -3175,6 +3175,12 @@ fi
AC_MSG_RESULT($with_decimal_contextvar)

6
package/python3/patches/0026-Add-an-option-to-disable-openssl-support.patch → package/python3/patches/0024-Add-an-option-to-disable-openssl-support.patch

@ -9,10 +9,10 @@ Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index c07505e89e..612e32faf5 100644
index 08c148c..a81a24c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3377,6 +3377,12 @@ AC_ARG_ENABLE(unicodedata,
@@ -3421,6 +3421,12 @@ AC_ARG_ENABLE(unicodedata,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata"
fi])
@ -26,5 +26,5 @@ index c07505e89e..612e32faf5 100644
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.25.1
2.30.2

6
package/python3/patches/0027-Add-an-option-to-disable-the-readline-module.patch → package/python3/patches/0025-Add-an-option-to-disable-the-readline-module.patch

@ -9,10 +9,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index 612e32faf5..2a6aaeff60 100644
index a81a24c..41a21ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3383,6 +3383,12 @@ AC_ARG_ENABLE(openssl,
@@ -3427,6 +3427,12 @@ AC_ARG_ENABLE(openssl,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl _ssl _hashlib"
fi])
@ -26,5 +26,5 @@ index 612e32faf5..2a6aaeff60 100644
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.25.1
2.30.2

6
package/python3/patches/0028-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch → package/python3/patches/0026-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch

@ -9,10 +9,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1 file changed, 18 insertions(+)
diff --git a/configure.ac b/configure.ac
index 2a6aaeff60..21479bbd7d 100644
index 41a21ff..fa81bc7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3389,6 +3389,24 @@ AC_ARG_ENABLE(readline,
@@ -3433,6 +3433,24 @@ AC_ARG_ENABLE(readline,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} readline"
fi])
@ -38,5 +38,5 @@ index 2a6aaeff60..21479bbd7d 100644
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.25.1
2.30.2

4
package/python3/patches/0029-python-config.sh-don-t-reassign-prefix.patch → package/python3/patches/0027-python-config.sh-don-t-reassign-prefix.patch

@ -27,7 +27,7 @@ Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
index a1bc3cd5f7..164d2d3603 100644
index a1bc3cd..164d2d3 100644
--- a/Misc/python-config.sh.in
+++ b/Misc/python-config.sh.in
@@ -31,7 +31,7 @@ prefix_real=$(installed_prefix "$0")
@ -49,5 +49,5 @@ index a1bc3cd5f7..164d2d3603 100644
SO="@EXT_SUFFIX@"
PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
--
2.25.1
2.30.2

19
package/python3/patches/0030-Fix-cross-compiling-the-uuid-module.patch → package/python3/patches/0028-Fix-cross-compiling-the-uuid-module.patch

@ -23,16 +23,21 @@ diff --git a/setup.py b/setup.py
index 3d0c74bb7f..c7be85f352 100644
--- a/setup.py
+++ b/setup.py
@@ -1779,7 +1779,8 @@ class PyBuildExt(build_ext):
@@ -1866,10 +1866,10 @@ class PyBuildExt(build_ext):
def detect_uuid(self):
# Build the _uuid module if possible
- uuid_incs = find_file("uuid.h", self.inc_dirs, ["/usr/include/uuid"])
+ uuid_incs = find_file("uuid.h", self.inc_dirs,
+ [os.path.join(inc_dir, 'uuid') for inc_dir in self.inc_dirs])
if uuid_incs is not None:
if self.compiler.find_library_file(self.lib_dirs, 'uuid'):
uuid_libs = ['uuid']
- uuid_h = sysconfig.get_config_var("HAVE_UUID_H")
- uuid_uuid_h = sysconfig.get_config_var("HAVE_UUID_UUID_H")
- if uuid_h or uuid_uuid_h:
- if sysconfig.get_config_var("HAVE_LIBUUID"):
+ uuid_h = find_file("uuid.h", self.inc_dirs,
+ [os.path.join(inc_dir, 'uuid') for inc_dir in self.inc_dirs])
+ if uuid_h is not None:
+ if self.compiler.find_library_file(self.lib_dirs, 'uuid'):
uuid_libs = ["uuid"]
else:
uuid_libs = []
--
2.25.1

6
package/python3/patches/0031-Add-an-option-to-disable-uuid-module.patch → package/python3/patches/0029-Add-an-option-to-disable-uuid-module.patch

@ -9,10 +9,10 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
1 file changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index 21479bbd7d..615c16aced 100644
index fa81bc7..4e733f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3425,6 +3425,15 @@ if test "$CURSES" = "no"; then
@@ -3469,6 +3469,15 @@ if test "$CURSES" = "no"; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
fi
@ -29,5 +29,5 @@ index 21479bbd7d..615c16aced 100644
AC_ARG_ENABLE(pydoc,
--
2.25.1
2.30.2

0
package/python3/patches/0032-fix-building-on-older-distributions.patch → package/python3/patches/0030-fix-building-on-older-distributions.patch

35
package/python3/patches/0033-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch → package/python3/patches/0031-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch

@ -1,4 +1,4 @@
From edc0757c56090364e0a95aabfa9f645a16a27569 Mon Sep 17 00:00:00 2001
From d009b0142f77881dd75ff760fec728dbc8581a03 Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Fri, 2 Aug 2019 15:53:16 +0200
Subject: [PATCH] configure.ac: fixup $CC --print-multiarch output for
@ -24,25 +24,28 @@ workaround, rewrite the --print-multiarch output to match older GCC versions
to keep the configure script happy.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[Peter: updated for 3.10.2]
---
configure.ac | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
configure.ac | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 615c16aced..241298e6cf 100644
index 913051c276..aba03f3779 100644
--- a/configure.ac
+++ b/configure.ac
@@ -718,7 +718,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])
@@ -876,7 +876,11 @@ AC_MSG_CHECKING([for multiarch])
AS_CASE([$ac_sys_system],
[Darwin*], [MULTIARCH=""],
[FreeBSD*], [MULTIARCH=""],
- [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_RESULT([$MULTIARCH])
--
2.25.1
2.20.1

30
package/python3/patches/0032-Add-an-option-to-disable-the-berkeleydb-module.patch

@ -0,0 +1,30 @@
From cf4d7fd9f7cb6c1ced32ee323b2b5755640051b7 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 4e733f6..1e52f30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3480,6 +3480,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.30.2

0
package/python3/patches/0034-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch → package/python3/patches/0033-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch

72
package/python3/python3.mk

@ -0,0 +1,72 @@
################################################################################
#
# python3
#
################################################################################
PYTHON3_VERSION = 3.10.4
PYTHON3_DIR = Python-$(PYTHON3_VERSION)
PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz
PYTHON3_SITE = https://www.python.org/ftp/python/$(PYTHON3_VERSION)
# ------------------------------------------------------------------------------
HOST_PYTHON3_VERSION = $(PYTHON3_VERSION)
HOST_PYTHON3_DIR = $(PYTHON3_DIR)
HOST_PYTHON3_SOURCE = $(PYTHON3_SOURCE)
HOST_PYTHON3_SITE = $(PYTHON3_SITE)
HOST_PYTHON3_BINARY = $(HOST_DIR)/bin/python3
HOST_PYTHON3_LIB_DIR = lib/python$(basename $(HOST_PYTHON3_VERSION))
HOST_PYTHON3_INCLUDE_DIR = include/python$(basename $(HOST_PYTHON3_VERSION))
HOST_PYTHON3_DEPENDENCIES = host-expat host-zlib host-libffi
#HOST_PYTHON3_AUTORECONF = YES
# HOST_PYTHON3_AUTORECONF won't work
define HOST_PYTHON3_AUTOCONF
$(CHDIR)/$($(PKG)_DIR); \
autoconf
endef
HOST_PYTHON3_POST_PATCH_HOOKS += HOST_PYTHON3_AUTOCONF
# Make sure that LD_LIBRARY_PATH overrides -rpath.
# This is needed because libpython may be installed at the same time that
# python is called.
# 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
#HOST_PYTHON3_CONF_ENV = \
# OPT="$(HOST_CFLAGS)"
HOST_PYTHON3_CONF_OPTS += \
--without-ensurepip \
--without-cxx-main \
--disable-sqlite3 \
--disable-tk \
--with-expat=system \
--disable-curses \
--disable-codecs-cjk \
--disable-nis \
--enable-unicodedata \
--disable-test-modules \
--disable-idle3 \
--disable-ossaudiodev
HOST_PYTHON3_CONF_OPTS += --disable-uuid
HOST_PYTHON3_CONF_OPTS += --disable-bzip2
HOST_PYTHON3_CONF_OPTS += --disable-openssl
define HOST_PYTHON3_INSTALL_SYMLINK
ln -fs python3 $(HOST_DIR)/bin/python
ln -fs python3-config $(HOST_DIR)/bin/python-config
endef
HOST_PYTHON3_HOST_FINALIZE_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK
host-python3: | $(HOST_DIR)
$(call host-autotools-package)
Loading…
Cancel
Save