blob: 555f5ef8aa46c82101ce6e91045cf94dde6070a8 [file] [log] [blame]
Maxime Ripardf1c092d2013-05-29 10:36:57 +02001Add an option to disable IDLE
2
3IDLE is an IDE embedded into python, written using Tk, so it doesn't make
4much sense to have it into our build.
5
6Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7
8---
9 Makefile.pre.in | 8 +++++++-
10 configure.ac | 6 ++++++
11 setup.py | 4 +++-
12 3 files changed, 16 insertions(+), 2 deletions(-)
13
Thomas Petazzoni0d327c22014-02-18 21:40:01 +010014Index: b/Makefile.pre.in
Maxime Ripardf1c092d2013-05-29 10:36:57 +020015===================================================================
Thomas Petazzoni0d327c22014-02-18 21:40:01 +010016--- a/Makefile.pre.in
17+++ b/Makefile.pre.in
Thomas Petazzoni144e21f2014-12-28 21:54:52 +010018@@ -1100,7 +1100,9 @@
Maxime Ripardf1c092d2013-05-29 10:36:57 +020019 -rm -f $(DESTDIR)$(LIBPC)/python3.pc
20 (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)
21 -rm -f $(DESTDIR)$(BINDIR)/idle3
22+ifeq (@IDLE@,yes)
23 (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
24+endif
25 -rm -f $(DESTDIR)$(BINDIR)/pydoc3
26 ifeq (@PYDOC@,yes)
27 (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
Thomas Petazzoni144e21f2014-12-28 21:54:52 +010028@@ -1148,7 +1150,6 @@
Maxime Ripardf1c092d2013-05-29 10:36:57 +020029 html json http dbm xmlrpc \
30 logging csv wsgiref urllib \
Thomas Petazzoni0d327c22014-02-18 21:40:01 +010031 ctypes ctypes/macholib \
32- idlelib idlelib/Icons \
Maxime Ripardf1c092d2013-05-29 10:36:57 +020033 distutils distutils/command \
34 importlib \
35 turtledemo \
Thomas Petazzoni144e21f2014-12-28 21:54:52 +010036@@ -1225,6 +1226,10 @@
Maxime Ripardf1c092d2013-05-29 10:36:57 +020037 LIBSUBDIRS += $(XMLLIBSUBDIRS)
38 endif
39
40+ifeq (@IDLE@,yes)
41+LIBSUBDIRS += idlelib idlelib/Icons
42+endif
43+
Thomas Petazzoni0d327c22014-02-18 21:40:01 +010044 ifeq (@TEST_MODULES@,yes)
45 LIBSUBDIRS += $(TESTSUBDIRS)
46 endif
47Index: b/configure.ac
Maxime Ripardf1c092d2013-05-29 10:36:57 +020048===================================================================
Thomas Petazzoni0d327c22014-02-18 21:40:01 +010049--- a/configure.ac
50+++ b/configure.ac
Thomas Petazzoni144e21f2014-12-28 21:54:52 +010051@@ -2743,6 +2743,12 @@
Maxime Ripardf1c092d2013-05-29 10:36:57 +020052 AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
53 [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
54
55+AC_SUBST(IDLE)
56+
57+AC_ARG_ENABLE(idle3,
58+ AS_HELP_STRING([--disable-idle3], [disable idle3 IDE]),
59+ [ IDLE="${enableval}" ], [ IDLE=yes ])
60+
61 # Check for enable-ipv6
62 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
63 AC_MSG_CHECKING([if --enable-ipv6 is specified])
Thomas Petazzoni0d327c22014-02-18 21:40:01 +010064Index: b/setup.py
Maxime Ripardf1c092d2013-05-29 10:36:57 +020065===================================================================
Thomas Petazzoni0d327c22014-02-18 21:40:01 +010066--- a/setup.py
67+++ b/setup.py
Thomas Petazzoni144e21f2014-12-28 21:54:52 +010068@@ -2213,11 +2213,13 @@
Maxime Ripardf1c092d2013-05-29 10:36:57 +020069 import warnings
70 warnings.filterwarnings("ignore",category=DeprecationWarning)
71
72- scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py']
73+ scripts = ['Lib/smtpd.py']
74 if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
75 scripts += [ 'Tools/scripts/pydoc3' ]
76 if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"):
77 scripts += [ 'Tools/scripts/2to3' ]
78+ if not '--disable-idle3' in sysconfig.get_config_var("CONFIG_ARGS"):
79+ scripts += [ 'Tools/scripts/idle3' ]
80
81 setup(# PyPI Metadata (PEP 301)
82 name = "Python",