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>
10 Makefile.pre.in | 50 ++++++++++++++++++++++++++++++++------------------
11 configure.ac | 6 ++++++
12 2 files changed, 38 insertions(+), 18 deletions(-)
14 Index: b/Makefile.pre.in
15 ===================================================================
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 \
27 + collections concurrent concurrent/futures encodings \
29 + ensurepip ensurepip/_bundled \
30 + html json http dbm xmlrpc \
32 + logging csv wsgiref urllib \
33 + lib2to3 lib2to3/fixes lib2to3/pgen2 \
34 + ctypes ctypes/macholib \
35 + idlelib idlelib/Icons \
36 + distutils distutils/command $(XMLLIBSUBDIRS) \
39 + multiprocessing multiprocessing/dummy \
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 \
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 \
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 \
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 \
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 \
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)
89 libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
90 @for i in $(SCRIPTDIR) $(LIBDEST); \
93 ===================================================================
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])