open-plc-utils: new package
[buildroot-gz.git] / package / python / 100-optional-test-modules.patch
blob1180b29060e9a44c9eb88d329e957ba87015c12e
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 | 40 +++++++++++++++++++++++++++-------------
11 configure.in | 6 ++++++
12 2 files changed, 33 insertions(+), 13 deletions(-)
14 Index: b/Makefile.pre.in
15 ===================================================================
16 --- a/Makefile.pre.in
17 +++ b/Makefile.pre.in
18 @@ -960,27 +960,43 @@
19 plat-mac/lib-scriptpackages/SystemEvents \
20 plat-mac/lib-scriptpackages/Terminal
21 PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
22 -LIBSUBDIRS= lib-tk lib-tk/test lib-tk/test/test_tkinter \
23 - lib-tk/test/test_ttk site-packages test test/audiodata test/capath \
24 - test/data test/cjkencodings test/decimaltestdata test/xmltestdata \
25 - test/imghdrdata \
26 - test/subprocessdata \
27 - test/tracedmodules \
28 +LIBSUBDIRS= lib-tk site-packages \
29 encodings compiler hotshot \
30 - email email/mime email/test email/test/data \
31 + email email/mime \
32 ensurepip ensurepip/_bundled \
33 - json json/tests \
34 - sqlite3 sqlite3/test \
35 - logging bsddb bsddb/test csv importlib wsgiref \
36 - lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
37 - lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
38 - ctypes ctypes/test ctypes/macholib \
39 - idlelib idlelib/Icons idlelib/idle_test \
40 - distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
41 + json \
42 + sqlite3 \
43 + logging bsddb csv importlib wsgiref \
44 + lib2to3 lib2to3/fixes lib2to3/pgen2 \
45 + ctypes ctypes/macholib \
46 + idlelib idlelib/Icons \
47 + distutils distutils/command $(XMLLIBSUBDIRS) \
48 multiprocessing multiprocessing/dummy \
49 - unittest unittest/test \
50 + unittest \
51 lib-old \
52 curses pydoc_data $(MACHDEPS)
54 +TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
55 + lib-tk/test/test_ttk test test/audiodata test/capath test/data \
56 + test/cjkencodings test/decimaltestdata test/xmltestdata \
57 + test/imghdrdata \
58 + test/subprocessdata \
59 + test/tracedmodules \
60 + email/test email/test/data \
61 + json/tests \
62 + sqlite3/test \
63 + bsddb/test \
64 + lib2to3/tests \
65 + lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
66 + ctypes/test \
67 + idlelib/idle_test \
68 + distutils/tests \
69 + unittest/test
71 +ifeq (@TEST_MODULES@,yes)
72 +LIBSUBDIRS += $(TESTSUBDIRS)
73 +endif
75 libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
76 @for i in $(SCRIPTDIR) $(LIBDEST); \
77 do \
78 Index: b/configure.ac
79 ===================================================================
80 --- a/configure.ac
81 +++ b/configure.ac
82 @@ -2628,6 +2628,12 @@
86 +AC_SUBST(TEST_MODULES)
88 +AC_ARG_ENABLE(test-modules,
89 + AS_HELP_STRING([--disable-test-modules], [disable test modules]),
90 + [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
92 # Check for enable-ipv6
93 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
94 AC_MSG_CHECKING([if --enable-ipv6 is specified])