2017-09-19 00:34:41 +02:00
|
|
|
From f96a00d42e714171f1d90501ed73594fddee570f 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-09-19 00:34:41 +02:00
|
|
|
index a1ce0712cd..dc1e917cc3 100644
|
2014-02-18 21:40:01 +01:00
|
|
|
--- a/Makefile.pre.in
|
|
|
|
+++ b/Makefile.pre.in
|
2018-02-05 07:08:42 +01:00
|
|
|
@@ -1199,7 +1199,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 \
|
2018-02-05 07:08:42 +01:00
|
|
|
@@ -1216,8 +1216,7 @@ LIBSUBDIRS= tkinter site-packages \
|
2017-03-23 16:21:12 +01:00
|
|
|
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 \
|
2018-02-05 07:08:42 +01:00
|
|
|
@@ -1263,6 +1262,12 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
|
2017-03-23 16:21:12 +01:00
|
|
|
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-09-19 00:34:41 +02:00
|
|
|
index d7582cfea4..6a56a5b0c1 100644
|
2014-02-18 21:40:01 +01:00
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2017-09-19 00:34:41 +02:00
|
|
|
@@ -3121,6 +3121,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-09-19 00:34:41 +02:00
|
|
|
2.13.5
|
2016-01-04 19:23:28 +01:00
|
|
|
|