python-werkzeug: bump to version 0.11.15
[buildroot-gz.git] / package / python3 / 0027-Add-an-option-to-disable-IDLE.patch
blob73fc3959b3f534570f05276efba8dc24bdebc58e
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>
10 ---
11 Makefile.pre.in | 7 ++++++-
12 configure.ac | 6 ++++++
13 setup.py | 4 +++-
14 3 files changed, 15 insertions(+), 2 deletions(-)
16 diff --git a/Makefile.pre.in b/Makefile.pre.in
17 index bdfee19..2466615 100644
18 --- a/Makefile.pre.in
19 +++ b/Makefile.pre.in
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
24 +ifeq (@IDLE@,yes)
25 (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
26 +endif
27 -rm -f $(DESTDIR)$(BINDIR)/pydoc3
28 ifeq (@PYDOC@,yes)
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 \
36 importlib \
37 turtledemo \
38 @@ -1261,6 +1262,10 @@ ifeq (@EXPAT@,yes)
39 LIBSUBDIRS += $(XMLLIBSUBDIRS)
40 endif
42 +ifeq (@IDLE@,yes)
43 +LIBSUBDIRS += idlelib idlelib/Icons
44 +endif
46 ifeq (@TEST_MODULES@,yes)
47 LIBSUBDIRS += $(TESTSUBDIRS)
48 endif
49 diff --git a/configure.ac b/configure.ac
50 index a7ddb2b..6b59792 100644
51 --- a/configure.ac
52 +++ b/configure.ac
53 @@ -2965,6 +2965,12 @@ AC_ARG_ENABLE(lib2to3,
54 AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
55 [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
57 +AC_SUBST(IDLE)
59 +AC_ARG_ENABLE(idle3,
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
68 --- a/setup.py
69 +++ b/setup.py
70 @@ -2221,11 +2221,13 @@ def main():
71 import warnings
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)
84 name = "Python",
85 --
86 2.6.4