openocd: avoid documentation rebuild to fix build issues
[buildroot-gz.git] / package / python / 104-optional-tk.patch
blob18024d3a1ea630008d6877fe0d36c615461e6166
1 Add an option to disable the tk module
3 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
6 ---
7 Makefile.pre.in | 14 ++++++++++----
8 configure.in | 9 +++++++++
9 2 files changed, 19 insertions(+), 4 deletions(-)
11 Index: b/Makefile.pre.in
12 ===================================================================
13 --- a/Makefile.pre.in
14 +++ b/Makefile.pre.in
15 @@ -960,7 +960,7 @@
16 plat-mac/lib-scriptpackages/SystemEvents \
17 plat-mac/lib-scriptpackages/Terminal
18 PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
19 -LIBSUBDIRS= lib-tk site-packages \
20 +LIBSUBDIRS= site-packages \
21 encodings compiler hotshot \
22 email email/mime \
23 ensurepip ensurepip/_bundled \
24 @@ -974,8 +974,7 @@
25 lib-old \
26 curses $(MACHDEPS)
28 -TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
29 - lib-tk/test/test_ttk test test/audiodata test/capath test/data \
30 +TESTSUBDIRS = test test/audiodata test/capath test/data \
31 test/cjkencodings test/decimaltestdata test/xmltestdata \
32 test/imghdrdata \
33 test/subprocessdata \
34 @@ -1009,6 +1008,12 @@
35 TESTSUBDIRS += sqlite3/test
36 endif
38 +ifeq (@TK@,yes)
39 +LIBSUBDIRS += lib-tk
40 +TESTSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
41 + lib-tk/test/test_ttk
42 +endif
44 libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
45 @for i in $(SCRIPTDIR) $(LIBDEST); \
46 do \
47 Index: b/configure.ac
48 ===================================================================
49 --- a/configure.ac
50 +++ b/configure.ac
51 @@ -2642,6 +2642,15 @@
52 DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
55 +AC_SUBST(TK)
56 +AC_ARG_ENABLE(tk,
57 + AS_HELP_STRING([--disable-tk], [disable tk]),
58 + [ TK="${enableval}" ], [ TK=yes ])
60 +if test "$TK" = "no"; then
61 + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
62 +fi
64 AC_SUBST(PYDOC)
66 AC_ARG_ENABLE(pydoc,