2020-10-14 12:18:48 +02:00
|
|
|
From 0337342d413d13f437fd089de91faee70a8bf3f9 Mon Sep 17 00:00:00 2001
|
2016-01-04 19:23:28 +01:00
|
|
|
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
2017-03-23 16:21:12 +01:00
|
|
|
Date: Wed, 22 Feb 2017 17:01:18 -0800
|
2016-01-04 19:23:28 +01:00
|
|
|
Subject: [PATCH] Add an option to disable installation of test modules
|
2013-05-29 10:36:57 +02:00
|
|
|
|
|
|
|
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>
|
2017-03-23 16:21:12 +01:00
|
|
|
[ Andrey Smirnov: ported to Python 3.6 ]
|
|
|
|
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
|
2020-10-14 12:18:48 +02:00
|
|
|
[james.hilliard1@gmail.com: adapt to python 3.9]
|
|
|
|
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
|
2013-05-29 10:36:57 +02:00
|
|
|
---
|
2020-10-14 12:18:48 +02:00
|
|
|
Makefile.pre.in | 56 ++++++++++++++++++++++++++++++++-----------------
|
2017-03-23 16:21:12 +01:00
|
|
|
configure.ac | 5 +++++
|
2020-10-14 12:18:48 +02:00
|
|
|
2 files changed, 42 insertions(+), 19 deletions(-)
|
2013-05-29 10:36:57 +02:00
|
|
|
|
2016-01-04 19:23:28 +01:00
|
|
|
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
2020-10-14 12:18:48 +02:00
|
|
|
index 7c3dde8dd4..204f293d53 100644
|
2014-02-18 21:40:01 +01:00
|
|
|
--- a/Makefile.pre.in
|
|
|
|
+++ b/Makefile.pre.in
|
2020-10-14 12:18:48 +02:00
|
|
|
@@ -1385,8 +1385,29 @@ maninstall: altmaninstall
|
2017-03-23 16:21:12 +01:00
|
|
|
|
|
|
|
# Install the library
|
2013-05-29 10:36:57 +02:00
|
|
|
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 \
|
2017-03-23 16:21:12 +01:00
|
|
|
+
|
|
|
|
+LIBSUBDIRS= tkinter site-packages \
|
2014-02-18 21:40:01 +01:00
|
|
|
+ asyncio \
|
2013-05-29 10:36:57 +02:00
|
|
|
+ collections concurrent concurrent/futures encodings \
|
|
|
|
+ email email/mime \
|
2014-02-18 21:40:01 +01:00
|
|
|
+ ensurepip ensurepip/_bundled \
|
2013-05-29 10:36:57 +02:00
|
|
|
+ html json http dbm xmlrpc \
|
|
|
|
+ sqlite3 \
|
|
|
|
+ logging csv wsgiref urllib \
|
|
|
|
+ lib2to3 lib2to3/fixes lib2to3/pgen2 \
|
2014-02-18 21:40:01 +01:00
|
|
|
+ ctypes ctypes/macholib \
|
|
|
|
+ idlelib idlelib/Icons \
|
2013-05-29 10:36:57 +02:00
|
|
|
+ distutils distutils/command $(XMLLIBSUBDIRS) \
|
|
|
|
+ importlib \
|
|
|
|
+ turtledemo \
|
|
|
|
+ multiprocessing multiprocessing/dummy \
|
|
|
|
+ unittest \
|
2017-03-23 16:21:12 +01:00
|
|
|
+ venv venv/scripts venv/scripts/common venv/scripts/posix \
|
2020-10-14 12:18:48 +02:00
|
|
|
+ curses pydoc_data \
|
|
|
|
+ zoneinfo
|
2013-05-29 10:36:57 +02:00
|
|
|
+
|
2017-03-23 16:21:12 +01:00
|
|
|
+TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
|
|
|
|
+ tkinter/test/test_ttk test \
|
2014-02-18 21:40:01 +01:00
|
|
|
test/audiodata \
|
2013-05-29 10:36:57 +02:00
|
|
|
test/capath test/data \
|
2019-10-17 00:38:34 +02:00
|
|
|
test/cjkencodings test/decimaltestdata \
|
2020-10-14 12:18:48 +02:00
|
|
|
@@ -1446,28 +1467,25 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
|
python3: bump to 3.7.0
Other changes include:
- Refreshing all necessary patches for 3.7.0
- Add a hash for the license file.
- Python no longer has it's own internal libffi, as such, host-libffi
is now required to build host-python3, and is added as a
dependency.
- Drop PYTHON3_LIBTOOL_PATCH = NO, since there is no longer any
internal libffi copy that was causing the libtool patching process
to fail.
- A new core module "uuid" is now is added in the Config.in file, and
relies on util-linux's uuid library.
- Also, a new patch: 0030-Fix-cross-compiling-the-uuid-module.patch
is required to fix compiling the uuid module, because the include
directory search path for uuid.h is hardcoded to /usr/include/uuid,
which causes an "unsafe for cross-compilation" error during
compiling if the host pc has uuid headers installed.
- 0031-Add-an-option-to-disable-uuid-module.patch is added to allow
disabling the Python3 UUID module, so that when
BR2_PACKAGE_PYTHON3_UUID is disabled by the UUID library is
present, the uuid Python module is not built, as expected.
- 0032-fix-building-on-older-distributions.patch is added to change
os.replace by os.rename in the update_file.py script to fix
building on older Linux distributions that have older versions of
python that don't include os.replace.
os.rename acts in the same way as os.replace, but is cross-platform
compatible. Because Buildroot is guaranteed to be built in a POSIX
environment, it is safe to change replace to rename.
Tested on CentOS6 and Fedora28, All test results passed:
br-arm-full [1/6]: OK
br-arm-cortex-a9-glibc [2/6]: OK
br-arm-cortex-m4-full [3/6]: SKIPPED
br-x86-64-musl [4/6]: OK
br-arm-full-static [5/6]: SKIPPED
armv5-ctng-linux-gnueabi [6/6]: OK
6 builds, 2 skipped, 0 build failed, 0 legal-info failed
Signed-off-by: Adam Duskett <aduskett@gmail.com>
[Thomas:
- remove PYTHON3_LIBTOOL_PATCH = NO
- improve the solution in patch 0030-Fix-cross-compiling-the-uuid-module
- add patch 0031-Add-an-option-to-disable-uuid-module]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-20 18:10:21 +02:00
|
|
|
test/test_importlib/zipdata02 \
|
2020-10-14 12:18:48 +02:00
|
|
|
test/test_zoneinfo test/test_zoneinfo/data \
|
2019-10-17 00:38:34 +02:00
|
|
|
test/ziptestdata \
|
2014-02-18 21:40:01 +01:00
|
|
|
- asyncio \
|
2017-03-23 16:21:12 +01:00
|
|
|
test/test_asyncio \
|
2013-05-29 10:36:57 +02:00
|
|
|
- collections concurrent concurrent/futures encodings \
|
|
|
|
- email email/mime test/test_email test/test_email/data \
|
2014-02-18 21:40:01 +01:00
|
|
|
- ensurepip ensurepip/_bundled \
|
|
|
|
- html json test/test_json http dbm xmlrpc \
|
2013-05-29 10:36:57 +02:00
|
|
|
- sqlite3 sqlite3/test \
|
|
|
|
- logging csv wsgiref urllib \
|
|
|
|
- lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
|
2017-03-23 16:21:12 +01:00
|
|
|
+ test/test_email test/test_email/data \
|
|
|
|
+ test/test_json \
|
2014-07-08 12:42:39 +02:00
|
|
|
+ sqlite3/test \
|
2013-05-29 10:36:57 +02:00
|
|
|
+ lib2to3/tests \
|
|
|
|
lib2to3/tests/data lib2to3/tests/data/fixers \
|
|
|
|
lib2to3/tests/data/fixers/myfixes \
|
2014-02-18 21:40:01 +01:00
|
|
|
- ctypes ctypes/test ctypes/macholib \
|
|
|
|
- idlelib idlelib/Icons idlelib/idle_test \
|
2013-05-29 10:36:57 +02:00
|
|
|
- distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
|
2014-07-08 12:42:39 +02:00
|
|
|
+ ctypes/test \
|
|
|
|
+ idlelib/idle_test \
|
|
|
|
+ distutils/tests \
|
2020-10-14 12:18:48 +02:00
|
|
|
test/test_peg_generator \
|
2013-05-29 10:36:57 +02:00
|
|
|
+ test/test_importlib test/test_importlib/builtin \
|
2017-03-23 16:21:12 +01:00
|
|
|
test/test_tools test/test_warnings test/test_warnings/data \
|
2013-05-29 10:36:57 +02:00
|
|
|
- turtledemo \
|
|
|
|
- multiprocessing multiprocessing/dummy \
|
|
|
|
- unittest unittest/test unittest/test/testmock \
|
2017-03-23 16:21:12 +01:00
|
|
|
- venv venv/scripts venv/scripts/common venv/scripts/posix \
|
2020-10-14 12:18:48 +02:00
|
|
|
- curses pydoc_data \
|
|
|
|
- zoneinfo
|
2014-07-08 12:42:39 +02:00
|
|
|
+ unittest/test unittest/test/testmock
|
2014-02-18 21:40:01 +01:00
|
|
|
+
|
|
|
|
+ifeq (@TEST_MODULES@,yes)
|
|
|
|
+LIBSUBDIRS += $(TESTSUBDIRS)
|
2013-05-29 10:36:57 +02:00
|
|
|
+endif
|
|
|
|
+
|
2017-03-23 16:21:12 +01:00
|
|
|
libinstall: build_all $(srcdir)/Modules/xxmodule.c
|
2013-05-29 10:36:57 +02:00
|
|
|
@for i in $(SCRIPTDIR) $(LIBDEST); \
|
|
|
|
do \
|
2016-01-04 19:23:28 +01:00
|
|
|
diff --git a/configure.ac b/configure.ac
|
2020-10-14 12:18:48 +02:00
|
|
|
index 73d66167de..92e28d02ee 100644
|
2014-02-18 21:40:01 +01:00
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2020-10-14 12:18:48 +02:00
|
|
|
@@ -3329,6 +3329,11 @@ if test "$posix_threads" = "yes"; then
|
python3: bump to 3.7.0
Other changes include:
- Refreshing all necessary patches for 3.7.0
- Add a hash for the license file.
- Python no longer has it's own internal libffi, as such, host-libffi
is now required to build host-python3, and is added as a
dependency.
- Drop PYTHON3_LIBTOOL_PATCH = NO, since there is no longer any
internal libffi copy that was causing the libtool patching process
to fail.
- A new core module "uuid" is now is added in the Config.in file, and
relies on util-linux's uuid library.
- Also, a new patch: 0030-Fix-cross-compiling-the-uuid-module.patch
is required to fix compiling the uuid module, because the include
directory search path for uuid.h is hardcoded to /usr/include/uuid,
which causes an "unsafe for cross-compilation" error during
compiling if the host pc has uuid headers installed.
- 0031-Add-an-option-to-disable-uuid-module.patch is added to allow
disabling the Python3 UUID module, so that when
BR2_PACKAGE_PYTHON3_UUID is disabled by the UUID library is
present, the uuid Python module is not built, as expected.
- 0032-fix-building-on-older-distributions.patch is added to change
os.replace by os.rename in the update_file.py script to fix
building on older Linux distributions that have older versions of
python that don't include os.replace.
os.rename acts in the same way as os.replace, but is cross-platform
compatible. Because Buildroot is guaranteed to be built in a POSIX
environment, it is safe to change replace to rename.
Tested on CentOS6 and Fedora28, All test results passed:
br-arm-full [1/6]: OK
br-arm-cortex-a9-glibc [2/6]: OK
br-arm-cortex-m4-full [3/6]: SKIPPED
br-x86-64-musl [4/6]: OK
br-arm-full-static [5/6]: SKIPPED
armv5-ctng-linux-gnueabi [6/6]: OK
6 builds, 2 skipped, 0 build failed, 0 legal-info failed
Signed-off-by: Adam Duskett <aduskett@gmail.com>
[Thomas:
- remove PYTHON3_LIBTOOL_PATCH = NO
- improve the solution in patch 0030-Fix-cross-compiling-the-uuid-module
- add patch 0031-Add-an-option-to-disable-uuid-module]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-20 18:10:21 +02:00
|
|
|
AC_CHECK_FUNCS(pthread_getcpuclockid)
|
2013-05-29 10:36:57 +02:00
|
|
|
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 ])
|
2017-03-23 16:21:12 +01:00
|
|
|
|
2013-05-29 10:36:57 +02:00
|
|
|
# Check for enable-ipv6
|
|
|
|
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
|
2016-01-04 19:23:28 +01:00
|
|
|
--
|
2020-10-14 12:18:48 +02:00
|
|
|
2.25.1
|
2016-01-04 19:23:28 +01:00
|
|
|
|