python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / python / 0016-Add-an-option-to-disable-installation-of-test-module.patch
bloba147655af8d4132c0ea7d8fe73e4a83fb295fc6c
1 From 0eac7789c0dd4aebe9e69d3c73d0c95e96922ea3 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Tue, 7 Mar 2017 22:27:16 +0100
4 Subject: [PATCH] Add an option to disable installation of test modules
6 The Python standard distribution comes with many test modules, that
7 are not necessarly useful on embedded targets.
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
11 ---
12 Makefile.pre.in | 48 ++++++++++++++++++++++++++++++++----------------
13 configure.ac | 6 ++++++
14 2 files changed, 38 insertions(+), 16 deletions(-)
16 diff --git a/Makefile.pre.in b/Makefile.pre.in
17 index dedcf61..280cc4e 100644
18 --- a/Makefile.pre.in
19 +++ b/Makefile.pre.in
20 @@ -1038,27 +1038,43 @@ PLATMACDIRS= plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \
21 plat-mac/lib-scriptpackages/SystemEvents \
22 plat-mac/lib-scriptpackages/Terminal
23 PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
24 -LIBSUBDIRS= lib-tk lib-tk/test lib-tk/test/test_tkinter \
25 - lib-tk/test/test_ttk site-packages test test/audiodata test/capath \
26 - test/data test/cjkencodings test/decimaltestdata test/xmltestdata \
27 - test/imghdrdata \
28 - test/subprocessdata \
29 - test/tracedmodules \
30 +LIBSUBDIRS= lib-tk site-packages \
31 encodings compiler hotshot \
32 - email email/mime email/test email/test/data \
33 + email email/mime \
34 ensurepip ensurepip/_bundled \
35 - json json/tests \
36 - sqlite3 sqlite3/test \
37 - logging bsddb bsddb/test csv importlib wsgiref \
38 - lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
39 - lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
40 - ctypes ctypes/test ctypes/macholib \
41 - idlelib idlelib/Icons idlelib/idle_test \
42 - distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
43 + json \
44 + sqlite3 \
45 + logging bsddb csv importlib wsgiref \
46 + lib2to3 lib2to3/fixes lib2to3/pgen2 \
47 + ctypes ctypes/macholib \
48 + idlelib idlelib/Icons \
49 + distutils distutils/command $(XMLLIBSUBDIRS) \
50 multiprocessing multiprocessing/dummy \
51 - unittest unittest/test \
52 + unittest \
53 lib-old \
54 curses pydoc_data $(MACHDEPS)
56 +TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
57 + lib-tk/test/test_ttk test test/audiodata test/capath test/data \
58 + test/cjkencodings test/decimaltestdata test/xmltestdata \
59 + test/imghdrdata \
60 + test/subprocessdata \
61 + test/tracedmodules \
62 + email/test email/test/data \
63 + json/tests \
64 + sqlite3/test \
65 + bsddb/test \
66 + lib2to3/tests \
67 + lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
68 + ctypes/test \
69 + idlelib/idle_test \
70 + distutils/tests \
71 + unittest/test
73 +ifeq (@TEST_MODULES@,yes)
74 +LIBSUBDIRS += $(TESTSUBDIRS)
75 +endif
77 libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
78 @for i in $(SCRIPTDIR) $(LIBDEST); \
79 do \
80 diff --git a/configure.ac b/configure.ac
81 index 183a903..a1a35f6 100644
82 --- a/configure.ac
83 +++ b/configure.ac
84 @@ -2806,6 +2806,12 @@ if test "$posix_threads" = "yes"; then
88 +AC_SUBST(TEST_MODULES)
90 +AC_ARG_ENABLE(test-modules,
91 + AS_HELP_STRING([--disable-test-modules], [disable test modules]),
92 + [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
94 # Check for enable-ipv6
95 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
96 AC_MSG_CHECKING([if --enable-ipv6 is specified])
97 --
98 2.7.4