vanhofen
3 years ago
35 changed files with 393 additions and 469 deletions
@ -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 |
|||
|
@ -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 |
|||
|
@ -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,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…
Reference in new issue