package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / python3 / 100-optional-test-modules.patch
blob765e9370d51bde877f4e61fe0182abceb23ceb14
1 Add an option to disable installation of test modules
3 The Python standard distribution comes with many test modules, that
4 are not necessarly useful on embedded targets.
6 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
9 ---
10 Makefile.pre.in | 50 ++++++++++++++++++++++++++++++++------------------
11 configure.ac | 6 ++++++
12 2 files changed, 38 insertions(+), 18 deletions(-)
14 Index: b/Makefile.pre.in
15 ===================================================================
16 --- a/Makefile.pre.in
17 +++ b/Makefile.pre.in
18 @@ -1136,8 +1136,30 @@
19 EXTRAPLATDIR= @EXTRAPLATDIR@
20 MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR)
21 XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
22 -LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
23 - tkinter/test/test_ttk site-packages test \
24 +LIBSUBDIRS= tkinter \
25 + site-packages \
26 + asyncio \
27 + collections concurrent concurrent/futures encodings \
28 + email email/mime \
29 + ensurepip ensurepip/_bundled \
30 + html json http dbm xmlrpc \
31 + sqlite3 \
32 + logging csv wsgiref urllib \
33 + lib2to3 lib2to3/fixes lib2to3/pgen2 \
34 + ctypes ctypes/macholib \
35 + idlelib idlelib/Icons \
36 + distutils distutils/command $(XMLLIBSUBDIRS) \
37 + importlib \
38 + turtledemo \
39 + multiprocessing multiprocessing/dummy \
40 + unittest \
41 + venv venv/scripts venv/scripts/posix \
42 + curses pydoc_data $(MACHDEPS)
44 +TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
45 + test test/test_asyncio \
46 + test/test_email test/test_email/data \
47 + test/test_json \
48 test/audiodata \
49 test/capath test/data \
50 test/cjkencodings test/decimaltestdata test/xmltestdata \
51 @@ -1164,28 +1186,22 @@
52 test/test_importlib/namespace_pkgs/project3/parent/child \
53 test/test_importlib/namespace_pkgs/module_and_namespace_package \
54 test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
55 - asyncio \
56 - test/test_asyncio \
57 - collections concurrent concurrent/futures encodings \
58 - email email/mime test/test_email test/test_email/data \
59 - ensurepip ensurepip/_bundled \
60 - html json test/test_json http dbm xmlrpc \
61 - sqlite3 sqlite3/test \
62 - logging csv wsgiref urllib \
63 - lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
64 + sqlite3/test \
65 + lib2to3/tests \
66 lib2to3/tests/data lib2to3/tests/data/fixers \
67 lib2to3/tests/data/fixers/myfixes \
68 - ctypes ctypes/test ctypes/macholib \
69 - idlelib idlelib/Icons idlelib/idle_test \
70 - distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
71 - importlib test/test_importlib test/test_importlib/builtin \
72 + ctypes/test \
73 + idlelib/idle_test \
74 + distutils/tests \
75 + test/test_importlib test/test_importlib/builtin \
76 test/test_importlib/extension test/test_importlib/frozen \
77 test/test_importlib/import_ test/test_importlib/source \
78 - turtledemo \
79 - multiprocessing multiprocessing/dummy \
80 - unittest unittest/test unittest/test/testmock \
81 - venv venv/scripts venv/scripts/posix \
82 - curses pydoc_data $(MACHDEPS)
83 + unittest/test unittest/test/testmock
85 +ifeq (@TEST_MODULES@,yes)
86 +LIBSUBDIRS += $(TESTSUBDIRS)
87 +endif
89 libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
90 @for i in $(SCRIPTDIR) $(LIBDEST); \
91 do \
92 Index: b/configure.ac
93 ===================================================================
94 --- a/configure.ac
95 +++ b/configure.ac
96 @@ -2676,6 +2676,12 @@
100 +AC_SUBST(TEST_MODULES)
102 +AC_ARG_ENABLE(test-modules,
103 + AS_HELP_STRING([--disable-test-modules], [disable test modules]),
104 + [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
106 # Check for enable-ipv6
107 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
108 AC_MSG_CHECKING([if --enable-ipv6 is specified])