2017-03-23 16:21:12 +01:00
|
|
|
From 4fc4260e66f8b004f14feb332c57a2d8fdd305de Mon Sep 17 00:00:00 2001
|
2016-01-04 19:23:28 +01:00
|
|
|
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
2017-03-23 16:21:12 +01:00
|
|
|
Date: Wed, 22 Feb 2017 17:23:42 -0800
|
2016-01-04 19:23:28 +01:00
|
|
|
Subject: [PATCH] Add an option to disable the tk module
|
2013-05-29 10:36:57 +02:00
|
|
|
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
|
|
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
2017-03-23 16:21:12 +01:00
|
|
|
[ Andrey Smirnov: ported to Python 3.6 ]
|
|
|
|
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
|
2013-05-29 10:36:57 +02:00
|
|
|
---
|
2016-01-04 19:23:28 +01:00
|
|
|
Makefile.pre.in | 11 ++++++++---
|
|
|
|
configure.ac | 9 +++++++++
|
|
|
|
2 files changed, 17 insertions(+), 3 deletions(-)
|
2013-05-29 10:36:57 +02:00
|
|
|
|
2016-01-04 19:23:28 +01:00
|
|
|
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
2017-03-23 16:21:12 +01:00
|
|
|
index 3907f92..93ef34d 100644
|
2014-02-18 21:40:01 +01:00
|
|
|
--- a/Makefile.pre.in
|
|
|
|
+++ b/Makefile.pre.in
|
2017-03-08 00:00:29 +01:00
|
|
|
@@ -1196,7 +1196,7 @@ maninstall: altmaninstall
|
2017-03-23 16:21:12 +01:00
|
|
|
# Install the library
|
2013-05-29 10:36:57 +02:00
|
|
|
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
|
2017-03-23 16:21:12 +01:00
|
|
|
|
|
|
|
-LIBSUBDIRS= tkinter site-packages \
|
|
|
|
+LIBSUBDIRS= site-packages \
|
2014-02-18 21:40:01 +01:00
|
|
|
asyncio \
|
2013-05-29 10:36:57 +02:00
|
|
|
collections concurrent concurrent/futures encodings \
|
2017-03-23 16:21:12 +01:00
|
|
|
email email/mime \
|
|
|
|
@@ -1213,8 +1213,7 @@ LIBSUBDIRS= tkinter site-packages \
|
|
|
|
venv venv/scripts venv/scripts/common venv/scripts/posix \
|
|
|
|
curses
|
2013-05-29 10:36:57 +02:00
|
|
|
|
2017-03-23 16:21:12 +01:00
|
|
|
-TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
|
|
|
|
- tkinter/test/test_ttk test \
|
|
|
|
+TESTSUBDIRS= test \
|
2014-02-18 21:40:01 +01:00
|
|
|
test/audiodata \
|
2017-03-23 16:21:12 +01:00
|
|
|
test/capath test/data \
|
|
|
|
test/cjkencodings test/decimaltestdata test/xmltestdata \
|
|
|
|
@@ -1260,6 +1259,12 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
|
|
|
|
test/test_tools test/test_warnings test/test_warnings/data \
|
|
|
|
unittest/test unittest/test/testmock
|
2013-05-29 10:36:57 +02:00
|
|
|
|
|
|
|
+ifeq (@TK@,yes)
|
|
|
|
+LIBSUBDIRS += tkinter
|
2014-02-18 21:40:01 +01:00
|
|
|
+TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
|
|
|
|
+ tkinter/test/test_ttk
|
2013-05-29 10:36:57 +02:00
|
|
|
+endif
|
|
|
|
+
|
2017-03-23 16:21:12 +01:00
|
|
|
ifeq (@LIB2TO3@,yes)
|
|
|
|
LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
|
|
|
|
TESTSUBDIRS += lib2to3/tests \
|
2016-01-04 19:23:28 +01:00
|
|
|
diff --git a/configure.ac b/configure.ac
|
2017-03-23 16:21:12 +01:00
|
|
|
index a30c45d..52887c9 100644
|
2014-02-18 21:40:01 +01:00
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2017-03-23 16:21:12 +01:00
|
|
|
@@ -3090,6 +3090,15 @@ if test "$SQLITE3" = "no" ; then
|
2013-05-29 10:36:57 +02:00
|
|
|
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
|
|
|
|
fi
|
|
|
|
|
|
|
|
+AC_SUBST(TK)
|
|
|
|
+AC_ARG_ENABLE(tk,
|
|
|
|
+ AS_HELP_STRING([--disable-tk], [disable tk]),
|
|
|
|
+ [ TK="${enableval}" ], [ TK=yes ])
|
|
|
|
+
|
|
|
|
+if test "$TK" = "no"; then
|
|
|
|
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
AC_SUBST(PYDOC)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(pydoc,
|
2016-01-04 19:23:28 +01:00
|
|
|
--
|
2017-03-23 16:21:12 +01:00
|
|
|
2.9.3
|
2016-01-04 19:23:28 +01:00
|
|
|
|