Maxime Ripard | f1c092d | 2013-05-29 10:36:57 +0200 | [diff] [blame] | 1 | Add an option to disable IDLE |
| 2 | |
| 3 | IDLE is an IDE embedded into python, written using Tk, so it doesn't make |
| 4 | much sense to have it into our build. |
| 5 | |
| 6 | Signed-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 Petazzoni | 0d327c2 | 2014-02-18 21:40:01 +0100 | [diff] [blame] | 14 | Index: b/Makefile.pre.in |
Maxime Ripard | f1c092d | 2013-05-29 10:36:57 +0200 | [diff] [blame] | 15 | =================================================================== |
Thomas Petazzoni | 0d327c2 | 2014-02-18 21:40:01 +0100 | [diff] [blame] | 16 | --- a/Makefile.pre.in |
| 17 | +++ b/Makefile.pre.in |
Thomas Petazzoni | 144e21f | 2014-12-28 21:54:52 +0100 | [diff] [blame] | 18 | @@ -1100,7 +1100,9 @@ |
Maxime Ripard | f1c092d | 2013-05-29 10:36:57 +0200 | [diff] [blame] | 19 | -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 Petazzoni | 144e21f | 2014-12-28 21:54:52 +0100 | [diff] [blame] | 28 | @@ -1148,7 +1150,6 @@ |
Maxime Ripard | f1c092d | 2013-05-29 10:36:57 +0200 | [diff] [blame] | 29 | html json http dbm xmlrpc \ |
| 30 | logging csv wsgiref urllib \ |
Thomas Petazzoni | 0d327c2 | 2014-02-18 21:40:01 +0100 | [diff] [blame] | 31 | ctypes ctypes/macholib \ |
| 32 | - idlelib idlelib/Icons \ |
Maxime Ripard | f1c092d | 2013-05-29 10:36:57 +0200 | [diff] [blame] | 33 | distutils distutils/command \ |
| 34 | importlib \ |
| 35 | turtledemo \ |
Thomas Petazzoni | 144e21f | 2014-12-28 21:54:52 +0100 | [diff] [blame] | 36 | @@ -1225,6 +1226,10 @@ |
Maxime Ripard | f1c092d | 2013-05-29 10:36:57 +0200 | [diff] [blame] | 37 | LIBSUBDIRS += $(XMLLIBSUBDIRS) |
| 38 | endif |
| 39 | |
| 40 | +ifeq (@IDLE@,yes) |
| 41 | +LIBSUBDIRS += idlelib idlelib/Icons |
| 42 | +endif |
| 43 | + |
Thomas Petazzoni | 0d327c2 | 2014-02-18 21:40:01 +0100 | [diff] [blame] | 44 | ifeq (@TEST_MODULES@,yes) |
| 45 | LIBSUBDIRS += $(TESTSUBDIRS) |
| 46 | endif |
| 47 | Index: b/configure.ac |
Maxime Ripard | f1c092d | 2013-05-29 10:36:57 +0200 | [diff] [blame] | 48 | =================================================================== |
Thomas Petazzoni | 0d327c2 | 2014-02-18 21:40:01 +0100 | [diff] [blame] | 49 | --- a/configure.ac |
| 50 | +++ b/configure.ac |
Thomas Petazzoni | 144e21f | 2014-12-28 21:54:52 +0100 | [diff] [blame] | 51 | @@ -2743,6 +2743,12 @@ |
Maxime Ripard | f1c092d | 2013-05-29 10:36:57 +0200 | [diff] [blame] | 52 | 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 Petazzoni | 0d327c2 | 2014-02-18 21:40:01 +0100 | [diff] [blame] | 64 | Index: b/setup.py |
Maxime Ripard | f1c092d | 2013-05-29 10:36:57 +0200 | [diff] [blame] | 65 | =================================================================== |
Thomas Petazzoni | 0d327c2 | 2014-02-18 21:40:01 +0100 | [diff] [blame] | 66 | --- a/setup.py |
| 67 | +++ b/setup.py |
Thomas Petazzoni | 144e21f | 2014-12-28 21:54:52 +0100 | [diff] [blame] | 68 | @@ -2213,11 +2213,13 @@ |
Maxime Ripard | f1c092d | 2013-05-29 10:36:57 +0200 | [diff] [blame] | 69 | 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", |