mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Python3: rework buildroot 3.10.8 patches to 3.11.0
This commit is contained in:
parent
35e016114e
commit
095214d7d2
@ -13,15 +13,15 @@ diff --git a/configure.ac b/configure.ac
|
||||
index 1ee5a09588..c2445edc88 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4230,7 +4230,7 @@ fi
|
||||
@@ -5086,7 +5086,7 @@ fi
|
||||
dnl if ac_cv_func_getaddrinfo
|
||||
])
|
||||
|
||||
AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
|
||||
|
||||
-if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
|
||||
+if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes
|
||||
-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
|
||||
if test $ipv6 = yes
|
||||
then
|
||||
AS_VAR_IF([ipv6], [yes], [
|
||||
AC_MSG_ERROR([m4_normalize([
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
@ -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
|
||||
@@ -218,6 +218,8 @@ FILEMODE= 644
|
||||
@@ -239,6 +239,8 @@ FILEMODE= 644
|
||||
# configure script arguments
|
||||
CONFIG_ARGS= @CONFIG_ARGS@
|
||||
|
||||
@ -56,18 +56,18 @@ index 0c809f3d8a..7c3dde8dd4 100644
|
||||
|
||||
# Subdirectories with code
|
||||
SRCDIRS= @SRCDIRS@
|
||||
@@ -628,6 +630,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
|
||||
@@ -739,6 +741,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
|
||||
*) quiet="";; \
|
||||
esac; \
|
||||
echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
||||
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
|
||||
+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
|
||||
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \
|
||||
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
||||
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
|
||||
@@ -1748,7 +1751,8 @@ libainstall: @DEF_MAKE_RULE@ python-config
|
||||
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)'
|
||||
|
||||
@@ -2228,7 +2231,8 @@ libainstall: @DEF_MAKE_RULE@ python-config
|
||||
# Install the dynamically loadable modules
|
||||
# This goes into $(exec_prefix)
|
||||
sharedinstall: sharedmods
|
||||
sharedinstall: all
|
||||
- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
|
||||
+ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
|
||||
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
|
||||
|
@ -23,9 +23,9 @@ index 66d372a..e632b6f 100644
|
||||
readline_libs.append('termcap')
|
||||
self.add(Extension('readline', ['readline.c'],
|
||||
- library_dirs=['/usr/lib/termcap'],
|
||||
extra_link_args=readline_extra_link_args,
|
||||
libraries=readline_libs))
|
||||
else:
|
||||
self.missing.append('readline')
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
@ -33,12 +33,12 @@ index c0d5511..32b3df7 100644
|
||||
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
|
||||
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
|
||||
@@ -1442,7 +1444,6 @@ LIBSUBDIRS= asyncio \
|
||||
lib2to3 lib2to3/fixes lib2to3/pgen2 \
|
||||
json \
|
||||
logging \
|
||||
multiprocessing multiprocessing/dummy \
|
||||
- pydoc_data \
|
||||
re \
|
||||
site-packages \
|
||||
sqlite3 \
|
||||
tkinter \
|
||||
@@ -1530,6 +1531,10 @@ TESTSUBDIRS= ctypes/test \
|
||||
tkinter/test/test_ttk \
|
||||
|
@ -34,12 +34,12 @@ index 28cf88e..63fa9fb 100644
|
||||
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \
|
||||
@@ -1441,7 +1443,6 @@ LIBSUBDIRS= asyncio \
|
||||
idlelib idlelib/Icons \
|
||||
importlib importlib/metadata \
|
||||
importlib importlib/resources importlib/metadata \
|
||||
json \
|
||||
- lib2to3 lib2to3/fixes lib2to3/pgen2 \
|
||||
logging \
|
||||
multiprocessing multiprocessing/dummy \
|
||||
site-packages \
|
||||
re \
|
||||
@@ -1458,10 +1459,6 @@ LIBSUBDIRS= asyncio \
|
||||
TESTSUBDIRS= ctypes/test \
|
||||
distutils/tests \
|
||||
@ -48,9 +48,9 @@ index 28cf88e..63fa9fb 100644
|
||||
- lib2to3/tests/data \
|
||||
- lib2to3/tests/data/fixers \
|
||||
- lib2to3/tests/data/fixers/myfixes \
|
||||
sqlite3/test \
|
||||
test test/audiodata \
|
||||
test/capath test/cjkencodings \
|
||||
test/data test/decimaltestdata \
|
||||
@@ -1535,6 +1532,14 @@ ifeq (@PYDOC@,yes)
|
||||
LIBSUBDIRS += pydoc_data
|
||||
endif
|
||||
|
@ -18,7 +18,7 @@ diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 5847029..5628860 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1446,7 +1446,6 @@ LIBSUBDIRS= asyncio \
|
||||
@@ -1920,7 +1920,6 @@ LIBSUBDIRS= asyncio \
|
||||
logging \
|
||||
multiprocessing multiprocessing/dummy \
|
||||
site-packages \
|
||||
@ -26,15 +26,7 @@ index 5847029..5628860 100644
|
||||
tkinter \
|
||||
turtledemo \
|
||||
unittest \
|
||||
@@ -1459,7 +1458,6 @@ LIBSUBDIRS= asyncio \
|
||||
TESTSUBDIRS= ctypes/test \
|
||||
distutils/tests \
|
||||
idlelib/idle_test \
|
||||
- sqlite3/test \
|
||||
test test/audiodata \
|
||||
test/capath test/cjkencodings \
|
||||
test/data test/decimaltestdata \
|
||||
@@ -1540,6 +1538,11 @@ TESTSUBDIRS += lib2to3/tests \
|
||||
@@ -2021,6 +2020,11 @@ TESTSUBDIRS += lib2to3/tests \
|
||||
lib2to3/tests/data/fixers/myfixes
|
||||
endif
|
||||
|
||||
|
@ -19,13 +19,13 @@ index 5628860..c968113 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1446,7 +1446,6 @@ LIBSUBDIRS= asyncio \
|
||||
logging \
|
||||
multiprocessing multiprocessing/dummy \
|
||||
re \
|
||||
site-packages \
|
||||
- tkinter \
|
||||
tomllib \
|
||||
turtledemo \
|
||||
unittest \
|
||||
urllib \
|
||||
@@ -1522,8 +1521,6 @@ TESTSUBDIRS= ctypes/test \
|
||||
test/tracedmodules \
|
||||
test/xmltestdata test/xmltestdata/c14n-20 \
|
||||
|
@ -75,19 +75,5 @@ index 4f1cda5..e99a174 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 663fd44..e30ed52 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1764,7 +1764,7 @@ class PyBuildExt(build_ext):
|
||||
#
|
||||
# More information on Expat can be found at www.libexpat.org.
|
||||
#
|
||||
- if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"):
|
||||
+ if '--with-expat=system' in sysconfig.get_config_var("CONFIG_ARGS"):
|
||||
expat_inc = []
|
||||
define_macros = []
|
||||
extra_compile_args = []
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
@ -36,7 +36,7 @@ index 08c5e8a..461c5e3 100644
|
||||
html \
|
||||
http \
|
||||
- idlelib idlelib/Icons \
|
||||
importlib importlib/metadata \
|
||||
importlib importlib/resources importlib/metadata \
|
||||
json \
|
||||
logging \
|
||||
@@ -1552,6 +1553,10 @@ ifeq (@EXPAT@,yes)
|
||||
|
@ -22,7 +22,7 @@ diff --git a/configure.ac b/configure.ac
|
||||
index 7bd4623ccd..e513ef6a20 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3145,13 +3145,20 @@ fi
|
||||
@@ -3145,12 +3145,19 @@ fi
|
||||
AC_SUBST(LIBFFI_INCLUDEDIR)
|
||||
|
||||
# Check for use of the system libmpdec library
|
||||
@ -35,7 +35,6 @@ index 7bd4623ccd..e513ef6a20 100644
|
||||
[],
|
||||
- [with_system_libmpdec="no"])
|
||||
+ [with_libmpdec="builtin"])
|
||||
|
||||
-AC_MSG_RESULT($with_system_libmpdec)
|
||||
+AC_MSG_RESULT($with_libmpdec)
|
||||
+if test "$with_libmpdec" != "none"; then
|
||||
@ -46,21 +45,8 @@ index 7bd4623ccd..e513ef6a20 100644
|
||||
+fi
|
||||
+AC_SUBST(MPDEC)
|
||||
|
||||
# Check whether _decimal should use a coroutine-local or thread-local context
|
||||
AC_MSG_CHECKING(for --with-decimal-contextvar)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index c4ee989ba3..3d0c74bb7f 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -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 = ['mpdec']
|
||||
sources = ['_decimal/_decimal.c']
|
||||
AS_VAR_IF([with_system_libmpdec], [yes], [
|
||||
LIBMPDEC_CFLAGS=${LIBMPDEC_CFLAGS-""}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
@ -22,9 +22,9 @@ index e513ef6a20..c07505e89e 100644
|
||||
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ossaudiodev"
|
||||
+ fi])
|
||||
+
|
||||
# Check for support for loadable sqlite extensions
|
||||
AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
|
||||
AC_ARG_ENABLE(loadable-sqlite-extensions,
|
||||
# Check for libmpdec machine flavor
|
||||
AC_MSG_CHECKING(for decimal libmpdec machine)
|
||||
AS_CASE([$ac_sys_system],
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
From d7b90b157eddefbd0ed59e35c90b083c0c03b644 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Duskett <aduskett@gmail.com>
|
||||
Date: Fri, 20 Jul 2018 10:17:39 -0400
|
||||
Subject: [PATCH] Fix cross compiling the uuid module
|
||||
|
||||
Python 3.7 has a new _uuid module, however, the include directory
|
||||
search path for uuid.h is hardcoded to /usr/include/uuid, which should
|
||||
not be used when cross-compiling.
|
||||
|
||||
To fix this, use the same solution as the one used by the NIS
|
||||
detection: append "uuid" to each of the include directories in
|
||||
"inc_dirs", instead of hardcoding /usr/include/uuid.
|
||||
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
[Thomas: drop STAGING_DIR based solution, use a solution similar to
|
||||
the one used for the NIS detection.]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
setup.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 3d0c74bb7f..c7be85f352 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1866,10 +1866,10 @@ class PyBuildExt(build_ext):
|
||||
|
||||
def detect_uuid(self):
|
||||
# Build the _uuid module if possible
|
||||
- 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
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 94c62f96ca61f1a28124c837d7ec5ed0b9ae8786 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Duskett <aduskett@gmail.com>
|
||||
Date: Thu, 16 Aug 2018 14:52:37 -0700
|
||||
Subject: [PATCH] fix building on older distributions
|
||||
|
||||
Python > 3.6.3 calls os.replace in the update_file.py script, during the
|
||||
regen-importlib phase of the build process.
|
||||
|
||||
According to Doc/whatsnew/3.3.rst line 1631, os.replace acts in the same
|
||||
way as os.rename, however, it is now cross-platform compatible for Windows.
|
||||
|
||||
Because BuildRoot is guaranteed only to be built in POSIX environment, it is
|
||||
safe to change os.replace back to os.rename.
|
||||
|
||||
This change fixes building on older systems such as CentOS7, that only come
|
||||
with python 2.
|
||||
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
---
|
||||
Tools/scripts/update_file.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Tools/scripts/update_file.py b/Tools/scripts/update_file.py
|
||||
index 224585c69b..ef458c0c63 100644
|
||||
--- a/Tools/scripts/update_file.py
|
||||
+++ b/Tools/scripts/update_file.py
|
||||
@@ -16,7 +16,7 @@ def main(old_path, new_path):
|
||||
with open(new_path, 'rb') as f:
|
||||
new_contents = f.read()
|
||||
if old_contents != new_contents:
|
||||
- os.replace(new_path, old_path)
|
||||
+ os.rename(new_path, old_path)
|
||||
else:
|
||||
os.unlink(new_path)
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user