1 From 05fbe2527b6f87edeef11f288c36bcbaa378ca02 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Tue, 7 Mar 2017 22:28:57 +0100
4 Subject: [PATCH] Add an option to disable the tk module
6 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
9 Makefile.pre.in | 11 ++++++++---
10 configure.ac | 9 +++++++++
11 2 files changed, 17 insertions(+), 3 deletions(-)
13 diff --git a/Makefile.pre.in b/Makefile.pre.in
14 index 974a052..f7f025f 100644
17 @@ -1038,7 +1038,7 @@ PLATMACDIRS= plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \
18 plat-mac/lib-scriptpackages/SystemEvents \
19 plat-mac/lib-scriptpackages/Terminal
20 PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
21 -LIBSUBDIRS= lib-tk site-packages \
22 +LIBSUBDIRS= site-packages \
23 encodings compiler hotshot \
25 ensurepip ensurepip/_bundled \
26 @@ -1052,8 +1052,7 @@ LIBSUBDIRS= lib-tk site-packages \
30 -TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
31 - lib-tk/test/test_ttk test test/audiodata test/capath test/data \
32 +TESTSUBDIRS = test test/audiodata test/capath test/data \
33 test/cjkencodings test/decimaltestdata test/xmltestdata \
36 @@ -1087,6 +1086,12 @@ LIBSUBDIRS += sqlite3
37 TESTSUBDIRS += sqlite3/test
42 +TESTSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
43 + lib-tk/test/test_ttk
46 libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
47 @for i in $(SCRIPTDIR) $(LIBDEST); \
49 diff --git a/configure.ac b/configure.ac
50 index e9e1897..d0f032c 100644
53 @@ -2814,6 +2814,15 @@ if test "$SQLITE3" = "no" ; then
54 DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
59 + AS_HELP_STRING([--disable-tk], [disable tk]),
60 + [ TK="${enableval}" ], [ TK=yes ])
62 +if test "$TK" = "no"; then
63 + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"