mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Switch to Libreelec Python
This commit is contained in:
@@ -1,147 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="Python3"
|
||||
# When changing PKG_VERSION remember to sync PKG_PYTHON_VERSION!
|
||||
PKG_VERSION="3.11.7"
|
||||
PKG_SHA256="18e1aa7e66ff3a58423d59ed22815a6954e53342122c45df20c96877c062b9b7"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="https://www.python.org/"
|
||||
PKG_URL="https://www.python.org/ftp/python/${PKG_VERSION}/${PKG_NAME::-1}-${PKG_VERSION}.tar.xz"
|
||||
PKG_DEPENDS_HOST="zlib:host bzip2:host libffi:host util-linux:host autoconf-archive:host"
|
||||
PKG_DEPENDS_TARGET="toolchain Python3:host sqlite expat zlib bzip2 xz openssl libffi readline ncurses util-linux"
|
||||
PKG_LONGDESC="Python3 is an interpreted object-oriented programming language."
|
||||
PKG_TOOLCHAIN="autotools"
|
||||
|
||||
PKG_PYTHON_VERSION="python3.11"
|
||||
|
||||
PKG_PY_DISABLED_MODULES="_tkinter nis gdbm bsddb ossaudiodev"
|
||||
|
||||
PKG_CONFIGURE_OPTS_HOST="ac_cv_prog_HAS_HG=/bin/false
|
||||
ac_cv_prog_SVNVERSION=/bin/false
|
||||
--disable-pyc-build
|
||||
--disable-ossaudiodev
|
||||
--disable-sqlite3
|
||||
--disable-codecs-cjk
|
||||
--disable-nis
|
||||
--enable-unicodedata
|
||||
--enable-openssl
|
||||
--disable-readline
|
||||
--disable-bzip2
|
||||
--enable-zlib
|
||||
--enable-xz
|
||||
--disable-tk
|
||||
--disable-curses
|
||||
--disable-pydoc
|
||||
--disable-test-modules
|
||||
--enable-lib2to3
|
||||
--disable-idle3
|
||||
--without-cxx-main
|
||||
--with-expat=builtin
|
||||
--with-libmpdec=none
|
||||
--with-doc-strings
|
||||
--with-system-ffi
|
||||
--without-pymalloc
|
||||
--with-ensurepip=no
|
||||
"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="ac_cv_prog_HAS_HG=/bin/false
|
||||
ac_cv_prog_SVNVERSION=/bin/false
|
||||
ac_cv_file__dev_ptmx=no
|
||||
ac_cv_file__dev_ptc=no
|
||||
ac_cv_have_long_long_format=yes
|
||||
ac_cv_working_tzset=yes
|
||||
ac_cv_func_lchflags_works=no
|
||||
ac_cv_func_chflags_works=no
|
||||
ac_cv_func_printf_zd=yes
|
||||
ac_cv_buggy_getaddrinfo=no
|
||||
ac_cv_header_bluetooth_bluetooth_h=no
|
||||
ac_cv_header_bluetooth_h=no
|
||||
--disable-pyc-build
|
||||
--disable-ossaudiodev
|
||||
--enable-sqlite3
|
||||
--disable-codecs-cjk
|
||||
--disable-nis
|
||||
--enable-unicodedata
|
||||
--enable-openssl
|
||||
--enable-readline
|
||||
--enable-bzip2
|
||||
--enable-zlib
|
||||
--enable-xz
|
||||
--disable-tk
|
||||
--enable-curses
|
||||
--disable-pydoc
|
||||
--disable-test-modules
|
||||
--enable-lib2to3
|
||||
--disable-idle3
|
||||
--without-cxx-main
|
||||
--with-expat=system
|
||||
--with-libmpdec=none
|
||||
--with-doc-strings
|
||||
--with-system-ffi
|
||||
--without-pymalloc
|
||||
--without-ensurepip
|
||||
--enable-ipv6
|
||||
--disable-static
|
||||
--enable-shared
|
||||
--with-build-python=${TOOLCHAIN}/bin/python
|
||||
"
|
||||
|
||||
pre_configure_host() {
|
||||
export PYTHON_MODULES_INCLUDE="${HOST_INCDIR}"
|
||||
export PYTHON_MODULES_LIB="${HOST_LIBDIR}"
|
||||
export DISABLED_EXTENSIONS="readline _curses _curses_panel ${PKG_PY_DISABLED_MODULES}"
|
||||
# control patch Python3-0300-generate-legacy-pyc-bytecode
|
||||
# this needs to be set when building host based py file
|
||||
# do not set this for py compiles being done for target use
|
||||
export DONT_BUILD_LEGACY_PYC=1
|
||||
}
|
||||
|
||||
post_make_host() {
|
||||
# python distutils per default adds -L${LIBDIR} when linking binary extensions
|
||||
sed -e "s|^ 'LIBDIR':.*| 'LIBDIR': '/usr/lib',|g" -i $(find ${PKG_BUILD}/.${HOST_NAME} -not -path '*/__pycache__/*' -name '_sysconfigdata__*.py')
|
||||
}
|
||||
|
||||
post_makeinstall_host() {
|
||||
ln -sf ${PKG_PYTHON_VERSION} ${TOOLCHAIN}/bin/python
|
||||
|
||||
rm -f ${TOOLCHAIN}/bin/smtpd.py*
|
||||
rm -f ${TOOLCHAIN}/bin/pyvenv
|
||||
rm -f ${TOOLCHAIN}/bin/pydoc*
|
||||
|
||||
rm -fr ${PKG_BUILD}/.${HOST_NAME}/build/temp.*
|
||||
|
||||
cp ${PKG_BUILD}/Tools/scripts/reindent.py ${TOOLCHAIN}/lib/${PKG_PYTHON_VERSION}
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
export PYTHON_MODULES_INCLUDE="${TARGET_INCDIR}"
|
||||
export PYTHON_MODULES_LIB="${TARGET_LIBDIR}"
|
||||
export DISABLED_EXTENSIONS="${PKG_PY_DISABLED_MODULES}"
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
ln -sf ${PKG_PYTHON_VERSION} ${INSTALL}/usr/bin/python
|
||||
|
||||
rm -fr ${PKG_BUILD}/.${TARGET_NAME}/build/temp.*
|
||||
|
||||
PKG_INSTALL_PATH_LIB=${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}
|
||||
|
||||
for dir in config compiler sysconfigdata lib-dynload/sysconfigdata lib2to3/tests test; do
|
||||
rm -rf ${PKG_INSTALL_PATH_LIB}/${dir}
|
||||
done
|
||||
|
||||
rm -rf ${PKG_INSTALL_PATH_LIB}/distutils/command/*.exe
|
||||
|
||||
rm -rf ${INSTALL}/usr/bin/pyvenv
|
||||
rm -rf ${INSTALL}/usr/bin/python*-config
|
||||
rm -rf ${INSTALL}/usr/bin/smtpd.py ${INSTALL}/usr/bin/smtpd.py.*
|
||||
|
||||
find ${INSTALL} -name '*.o' -delete
|
||||
|
||||
python_compile ${PKG_INSTALL_PATH_LIB}
|
||||
|
||||
# strip
|
||||
chmod u+w ${INSTALL}/usr/lib/libpython*.so.*
|
||||
debug_strip ${INSTALL}/usr
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
From 51ed7f93cc0333efa8fccd9b88db713c48993df9 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Wed, 22 Feb 2017 16:21:31 -0800
|
||||
Subject: [PATCH] Make the build of pyc files conditional
|
||||
|
||||
This commit adds a new configure option --disable-pyc-build to disable
|
||||
the compilation of pyc.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
[ Andrey Smrinov: ported to Python 3.6 ]
|
||||
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
|
||||
---
|
||||
Makefile.pre.in | 2 ++
|
||||
configure.ac | 6 ++++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 8fbcd7ac17..2957c8e5a1 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -2078,6 +2078,7 @@ libinstall: all $(srcdir)/Modules/xxmodule.c
|
||||
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
|
||||
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
|
||||
fi
|
||||
+ifeq (@PYC_BUILD@,yes)
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
-j0 -d $(LIBDEST) -f \
|
||||
@@ -2105,6 +2106,7 @@ libinstall: 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
|
||||
+endif
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ab5e1de6fa..0cf89ed641 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1441,6 +1441,12 @@ fi
|
||||
|
||||
AC_MSG_CHECKING(LDLIBRARY)
|
||||
|
||||
+AC_SUBST(PYC_BUILD)
|
||||
+
|
||||
+AC_ARG_ENABLE(pyc-build,
|
||||
+ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]),
|
||||
+ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ])
|
||||
+
|
||||
# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
|
||||
# library that we build, but we do not want to link against it (we
|
||||
# will find it with a -framework option). For this reason there is an
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From b180ab302e2a82be239af334382436628b81381e Mon Sep 17 00:00:00 2001
|
||||
From: Vanya Sergeev <vsergeev@gmail.com>
|
||||
Date: Wed, 23 Dec 2015 11:30:33 +0100
|
||||
Subject: [PATCH] Disable buggy_getaddrinfo configure test when cross-compiling
|
||||
with IPv6 support
|
||||
|
||||
Signed-off-by: Vanya Sergeev <vsergeev@gmail.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0cf89ed641..830885fcb3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -5086,7 +5086,7 @@ fi]))
|
||||
dnl if ac_cv_func_getaddrinfo
|
||||
])
|
||||
|
||||
-if test "$ac_cv_func_getaddrinfo" = no -o "$ac_cv_buggy_getaddrinfo" = yes
|
||||
+if test "$ac_cv_func_getaddrinfo" = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes
|
||||
then
|
||||
AS_VAR_IF([ipv6], [yes], [
|
||||
AC_MSG_ERROR([m4_normalize([
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
From 132b9dca3bb4d4682f7e318648ce11e1abb31b62 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Wed, 23 Dec 2015 11:33:14 +0100
|
||||
Subject: [PATCH] Adjust library/header paths for cross-compilation
|
||||
|
||||
When cross-compiling third-party extensions, the get_python_inc() or
|
||||
get_python_lib() can be called, to return the path to headers or
|
||||
libraries. However, they use the sys.prefix of the host Python, which
|
||||
returns incorrect paths when cross-compiling (paths pointing to host
|
||||
headers and libraries).
|
||||
|
||||
In order to fix this, we introduce the _python_sysroot, _python_prefix
|
||||
and _python_exec_prefix variables, that allow to override these
|
||||
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/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
|
||||
index ebe3711827..6328ec41af 100644
|
||||
--- a/Lib/sysconfig.py
|
||||
+++ b/Lib/sysconfig.py
|
||||
@@ -168,10 +168,17 @@ def joinuser(*args):
|
||||
_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
|
||||
+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)
|
||||
_CONFIG_VARS = None
|
||||
_USER_BASE = None
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From 90f3075b629d90d942da1d22ef7563f7149f4f6c Mon Sep 17 00:00:00 2001
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Wed, 23 Dec 2015 11:44:02 +0100
|
||||
Subject: [PATCH] Serial ioctl() workaround
|
||||
|
||||
The ioctls.h of some architectures (notably xtensa) references structs from
|
||||
linux/serial.h. Make sure to include this header as well.
|
||||
|
||||
Also, undef TIOCTTYGSTRUCT that require reference to internal kernel tty_struct,
|
||||
but isn't actually referenced in modern kernels.
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
Modules/termios.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Modules/termios.c b/Modules/termios.c
|
||||
index 354e5ca18d..c08957c500 100644
|
||||
--- a/Modules/termios.c
|
||||
+++ b/Modules/termios.c
|
||||
@@ -15,7 +15,9 @@
|
||||
#endif
|
||||
|
||||
#include <termios.h>
|
||||
+#include <linux/serial.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#undef TIOCTTYGSTRUCT
|
||||
|
||||
/* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
|
||||
* MDTR, MRI, and MRTS (apparently used internally by some things
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
From 55ef5552e4ee60266e3299f253bec3b13785e585 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Korsgaard <peter@korsgaard.com>
|
||||
Date: Thu, 20 Nov 2014 13:24:59 +0100
|
||||
Subject: [PATCH] Misc/python-config.sh.in: ensure sed invocations only match
|
||||
beginning of strings
|
||||
|
||||
The build/real prefix handling using sed breaks if build != real and the
|
||||
standard include / lib directories are used ($prefix/include and $prefix/lib).
|
||||
|
||||
E.G.
|
||||
|
||||
prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include".
|
||||
|
||||
If this gets installed with make DESTDIR="/foo" install, then we end up with
|
||||
prefix_real = prefix = "/foo/usr" as expected, but
|
||||
includedir="/foo/foo/usr/include" and libdir="/foo/foo/usr/lib" because of
|
||||
the double sed invocation (prefix is already expanded). Work around it by
|
||||
ensuring we only match the beginning of the string.
|
||||
|
||||
Submitted upstream: http://bugs.python.org/issue22907
|
||||
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
Misc/python-config.sh.in | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
|
||||
index 2602fe24c0..a1bc3cd5f7 100644
|
||||
--- a/Misc/python-config.sh.in
|
||||
+++ b/Misc/python-config.sh.in
|
||||
@@ -24,18 +24,19 @@ installed_prefix ()
|
||||
echo $RESULT
|
||||
}
|
||||
|
||||
+prefix_build="@prefix@"
|
||||
prefix_real=$(installed_prefix "$0")
|
||||
|
||||
# Use sed to fix paths from their built-to locations to their installed-to
|
||||
# locations. Keep prefix & exec_prefix using their original values in case
|
||||
# they are referenced in other configure variables, to prevent double
|
||||
# substitution, issue #22140.
|
||||
-prefix="@prefix@"
|
||||
-exec_prefix="@exec_prefix@"
|
||||
+prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#")
|
||||
+exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#")
|
||||
exec_prefix_real=${prefix_real}
|
||||
-includedir=$(echo "@includedir@" | sed "s#$prefix#$prefix_real#")
|
||||
-libdir=$(echo "@libdir@" | sed "s#$prefix#$prefix_real#")
|
||||
-CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix#$prefix_real#")
|
||||
+includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#")
|
||||
+libdir=$(echo "@libdir@" | sed "s#^$prefix_build#$prefix_real#")
|
||||
+CFLAGS=$(echo "@CFLAGS@" | sed "s#^$prefix_build#$prefix_real#")
|
||||
VERSION="@VERSION@"
|
||||
LIBM="@LIBM@"
|
||||
LIBC="@LIBC@"
|
||||
@@ -49,7 +50,7 @@ OPT="@OPT@"
|
||||
PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
|
||||
LDVERSION="@LDVERSION@"
|
||||
LIBDEST=${prefix_real}/lib/python${VERSION}
|
||||
-LIBPL=$(echo "@LIBPL@" | sed "s#$prefix#$prefix_real#")
|
||||
+LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#")
|
||||
SO="@EXT_SUFFIX@"
|
||||
PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
|
||||
INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
From 0e4f0a525ea0a68f6d4c5349c301da2e9b0c8ac9 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Wed, 22 Feb 2017 17:15:31 -0800
|
||||
Subject: [PATCH] Add an option to disable lib2to3
|
||||
|
||||
lib2to3 is a library to convert Python 2.x code to Python 3.x. As
|
||||
such, it is probably not very useful on embedded system targets.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
||||
[ Andrey Smirnov: ported to Python 3.6 ]
|
||||
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
|
||||
[ Adam Duskett: ported to Python 3.10.0 ]
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
---
|
||||
Makefile.pre.in | 17 ++++++++++++-----
|
||||
configure.ac | 6 ++++++
|
||||
setup.py | 6 +++---
|
||||
3 files changed, 21 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 403380e181..f5d0573067 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1868,7 +1868,9 @@ ifeq (@PYDOC@,yes)
|
||||
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
|
||||
endif
|
||||
-rm -f $(DESTDIR)$(BINDIR)/2to3
|
||||
+ifeq (@LIB2TO3@,yes)
|
||||
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
|
||||
+endif
|
||||
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)) \
|
||||
@@ -1914,7 +1916,6 @@ LIBSUBDIRS= asyncio \
|
||||
idlelib idlelib/Icons \
|
||||
importlib importlib/resources importlib/metadata \
|
||||
json \
|
||||
- lib2to3 lib2to3/fixes lib2to3/pgen2 \
|
||||
logging \
|
||||
multiprocessing multiprocessing/dummy \
|
||||
re \
|
||||
@@ -1934,10 +1935,6 @@ LIBSUBDIRS= asyncio \
|
||||
TESTSUBDIRS= ctypes/test \
|
||||
distutils/tests \
|
||||
idlelib/idle_test \
|
||||
- lib2to3/tests \
|
||||
- lib2to3/tests/data \
|
||||
- lib2to3/tests/data/fixers \
|
||||
- lib2to3/tests/data/fixers/myfixes \
|
||||
test \
|
||||
test/audiodata \
|
||||
test/capath \
|
||||
@@ -2013,6 +2010,14 @@ ifeq (@PYDOC@,yes)
|
||||
LIBSUBDIRS += pydoc_data
|
||||
endif
|
||||
|
||||
+ifeq (@LIB2TO3@,yes)
|
||||
+LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
|
||||
+TESTSUBDIRS += lib2to3/tests \
|
||||
+ lib2to3/tests/data \
|
||||
+ lib2to3/tests/data/fixers \
|
||||
+ lib2to3/tests/data/fixers/myfixes
|
||||
+endif
|
||||
+
|
||||
TEST_MODULES=@TEST_MODULES@
|
||||
libinstall: all $(srcdir)/Modules/xxmodule.c
|
||||
@for i in $(SCRIPTDIR) $(LIBDEST); \
|
||||
@@ -2115,10 +2120,12 @@ ifeq (@PYC_BUILD@,yes)
|
||||
-j0 -d $(LIBDEST)/site-packages -f \
|
||||
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
endif
|
||||
+ifeq (@LIB2TO3@,yes)
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
|
||||
+endif
|
||||
|
||||
# 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 f68ea72321..d8e10cf2b2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -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()
|
||||
AC_SUBST([MODULE_BLOCK])
|
||||
|
||||
+AC_SUBST(LIB2TO3)
|
||||
+
|
||||
+AC_ARG_ENABLE(lib2to3,
|
||||
+ AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
|
||||
+ [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
|
||||
+
|
||||
# generate output files
|
||||
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 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.34.1
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
From ef8c030e01b1be8be582e90c31298a5863094858 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Wed, 22 Feb 2017 17:20:45 -0800
|
||||
Subject: [PATCH] Add option to disable the sqlite3 module
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
||||
[ Andrey Smirnov: ported to Python 3.6 ]
|
||||
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
|
||||
[ Adam Duskett: ported to Python 3.10.0 ]
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
---
|
||||
Makefile.pre.in | 5 ++++-
|
||||
configure.ac | 9 +++++++++
|
||||
2 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index f5d0573067..9f4cdf14cf 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1920,7 +1920,6 @@ LIBSUBDIRS= asyncio \
|
||||
multiprocessing multiprocessing/dummy \
|
||||
re \
|
||||
site-packages \
|
||||
- sqlite3 \
|
||||
tkinter \
|
||||
tomllib \
|
||||
turtledemo \
|
||||
@@ -2018,6 +2017,10 @@ TESTSUBDIRS += lib2to3/tests \
|
||||
lib2to3/tests/data/fixers/myfixes
|
||||
endif
|
||||
|
||||
+ifeq (@SQLITE3@,yes)
|
||||
+LIBSUBDIRS += sqlite3
|
||||
+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 d8e10cf2b2..4cc0951ab9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4171,6 +4171,15 @@ AS_VAR_IF([posix_threads], [stub], [
|
||||
AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support])
|
||||
])
|
||||
|
||||
+AC_SUBST(SQLITE3)
|
||||
+AC_ARG_ENABLE(sqlite3,
|
||||
+ AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]),
|
||||
+ [ SQLITE3="${enableval}" ], [ SQLITE3=yes ])
|
||||
+
|
||||
+if test "$SQLITE3" = "no" ; then
|
||||
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
|
||||
+fi
|
||||
+
|
||||
AC_SUBST(PYDOC)
|
||||
|
||||
AC_ARG_ENABLE(pydoc,
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
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>
|
||||
---
|
||||
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 \
|
||||
@@ -2001,9 +2000,6 @@ TESTSUBDIRS= ctypes/test \
|
||||
test/xmltestdata \
|
||||
test/xmltestdata/c14n-20 \
|
||||
test/ziptestdata \
|
||||
- tkinter/test \
|
||||
- tkinter/test/test_tkinter \
|
||||
- tkinter/test/test_ttk \
|
||||
unittest/test \
|
||||
unittest/test/testmock
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
From 03e28cdd46dac1b7e4e9c8bbd2ea44b09e514205 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Wed, 22 Feb 2017 17:31:51 -0800
|
||||
Subject: [PATCH] Add an option to disable the curses module
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
||||
[ Andrey Smirnov: ported to Python 3.6 ]
|
||||
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
|
||||
[ Adam Duskett: ported to Python 3.10.0 ]
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
---
|
||||
Makefile.pre.in | 4 +++-
|
||||
configure.ac | 9 +++++++++
|
||||
2 files changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 4f83911200..8e879b35c6 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1905,7 +1905,6 @@ LIBSUBDIRS= asyncio \
|
||||
concurrent concurrent/futures \
|
||||
csv \
|
||||
ctypes ctypes/macholib \
|
||||
- curses \
|
||||
dbm \
|
||||
distutils distutils/command \
|
||||
email email/mime \
|
||||
@@ -2024,6 +2023,9 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
|
||||
tkinter/test/test_ttk
|
||||
endif
|
||||
|
||||
+ifeq (@CURSES@,yes)
|
||||
+LIBSUBDIRS += curses
|
||||
+endif
|
||||
|
||||
TEST_MODULES=@TEST_MODULES@
|
||||
libinstall: all $(srcdir)/Modules/xxmodule.c
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f4ce506801..0ae9863cd6 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4189,6 +4189,15 @@ if test "$TK" = "no"; then
|
||||
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
|
||||
fi
|
||||
|
||||
+AC_SUBST(CURSES)
|
||||
+AC_ARG_ENABLE(curses,
|
||||
+ AS_HELP_STRING([--disable-curses], [disable curses]),
|
||||
+ [ CURSES="${enableval}" ], [ CURSES=yes ])
|
||||
+
|
||||
+if test "$CURSES" = "no"; then
|
||||
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
|
||||
+fi
|
||||
+
|
||||
AC_SUBST(PYDOC)
|
||||
|
||||
AC_ARG_ENABLE(pydoc,
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
From c9a2ea3edacf57746517600ccc11c254a9fd6c48 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Wed, 22 Feb 2017 17:40:45 -0800
|
||||
Subject: [PATCH] Add an option to disable expat
|
||||
|
||||
This patch replaces the existing --with-system-expat option with a
|
||||
--with-expat={system,builtin,none} option, which allows to tell Python
|
||||
whether we want to use the system expat (already installed), the expat
|
||||
builtin the Python sources, or no expat at all (which disables the
|
||||
installation of XML modules).
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
||||
[ Andrey Smirnov: ported to Python 3.6 ]
|
||||
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
|
||||
[ Adam Duskett: ported to Python 3.10.0 ]
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
---
|
||||
Makefile.pre.in | 5 ++++-
|
||||
configure.ac | 20 ++++++++++++++------
|
||||
2 files changed, 18 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 8e879b35c6..80d617cf7f 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1925,7 +1925,6 @@ LIBSUBDIRS= asyncio \
|
||||
urllib \
|
||||
venv venv/scripts venv/scripts/common venv/scripts/posix \
|
||||
wsgiref \
|
||||
- $(XMLLIBSUBDIRS) \
|
||||
xmlrpc \
|
||||
zoneinfo \
|
||||
__phello__
|
||||
@@ -2027,6 +2026,10 @@ ifeq (@CURSES@,yes)
|
||||
LIBSUBDIRS += curses
|
||||
endif
|
||||
|
||||
+ifeq (@EXPAT@,yes)
|
||||
+LIBSUBDIRS += $(XMLLIBSUBDIRS)
|
||||
+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 0ae9863cd6..201cad0bfc 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3565,15 +3565,23 @@ LIBS="$withval $LIBS"
|
||||
AC_SUBST(DISABLED_EXTENSIONS)
|
||||
|
||||
# Check for use of the system expat library
|
||||
-AC_MSG_CHECKING(for --with-system-expat)
|
||||
-AC_ARG_WITH(system_expat,
|
||||
- AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library, see Doc/library/pyexpat.rst (default is no)]),
|
||||
+AC_MSG_CHECKING(for --with-expat)
|
||||
+AC_ARG_WITH(expat,
|
||||
+ AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]),
|
||||
[],
|
||||
- [with_system_expat="no"])
|
||||
+ [with_expat="builtin"])
|
||||
|
||||
-AC_MSG_RESULT($with_system_expat)
|
||||
+AC_MSG_RESULT($with_expat)
|
||||
|
||||
-AS_VAR_IF([with_system_expat], [yes], [
|
||||
+if test "$with_expat" != "none"; then
|
||||
+ EXPAT=yes
|
||||
+else
|
||||
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} pyexpat"
|
||||
+ EXPAT=no
|
||||
+fi
|
||||
+AC_SUBST(EXPAT)
|
||||
+
|
||||
+AS_VAR_IF([with_expat], [system], [
|
||||
LIBEXPAT_CFLAGS=${LIBEXPAT_CFLAGS-""}
|
||||
LIBEXPAT_LDFLAGS=${LIBEXPAT_LDFLAGS-"-lexpat"}
|
||||
LIBEXPAT_INTERNAL=
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user