1 From 2766bcdd8f9b7395ce32a6d8480ef0a2186f2098 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime.ripard@free-electrons.com>
3 Date: Wed, 23 Dec 2015 11:50:42 +0100
4 Subject: [PATCH] Add an option to disable IDLE
6 IDLE is an IDE embedded into python, written using Tk, so it doesn't make
7 much sense to have it into our build.
9 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 Makefile.pre.in | 7 ++++++-
12 configure.ac | 6 ++++++
14 3 files changed, 15 insertions(+), 2 deletions(-)
16 diff --git a/Makefile.pre.in b/Makefile.pre.in
17 index bdfee19..2466615 100644
20 @@ -1132,7 +1132,9 @@ bininstall: altbininstall
21 -rm -f $(DESTDIR)$(LIBPC)/python3.pc
22 (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)
23 -rm -f $(DESTDIR)$(BINDIR)/idle3
25 (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
27 -rm -f $(DESTDIR)$(BINDIR)/pydoc3
29 (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
30 @@ -1179,7 +1181,6 @@ LIBSUBDIRS= \
31 html json http dbm xmlrpc \
32 logging csv wsgiref urllib \
33 ctypes ctypes/macholib \
34 - idlelib idlelib/Icons \
35 distutils distutils/command \
38 @@ -1261,6 +1262,10 @@ ifeq (@EXPAT@,yes)
39 LIBSUBDIRS += $(XMLLIBSUBDIRS)
43 +LIBSUBDIRS += idlelib idlelib/Icons
46 ifeq (@TEST_MODULES@,yes)
47 LIBSUBDIRS += $(TESTSUBDIRS)
49 diff --git a/configure.ac b/configure.ac
50 index a7ddb2b..6b59792 100644
53 @@ -2965,6 +2965,12 @@ AC_ARG_ENABLE(lib2to3,
54 AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
55 [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
60 + AS_HELP_STRING([--disable-idle3], [disable idle3 IDE]),
61 + [ IDLE="${enableval}" ], [ IDLE=yes ])
63 # Check for enable-ipv6
64 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
65 AC_MSG_CHECKING([if --enable-ipv6 is specified])
66 diff --git a/setup.py b/setup.py
67 index ecddb6a..7fe68e8 100644
70 @@ -2221,11 +2221,13 @@ def main():
72 warnings.filterwarnings("ignore",category=DeprecationWarning)
74 - scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py']
75 + scripts = ['Lib/smtpd.py']
76 if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
77 scripts += [ 'Tools/scripts/pydoc3' ]
78 if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"):
79 scripts += [ 'Tools/scripts/2to3' ]
80 + if not '--disable-idle3' in sysconfig.get_config_var("CONFIG_ARGS"):
81 + scripts += [ 'Tools/scripts/idle3' ]
83 setup(# PyPI Metadata (PEP 301)