python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / python3 / 0027-Add-an-option-to-disable-IDLE.patch
blobe8eaea99beaa5467cf088bb1673a2624b101ad21
1 From 6187913d2d84a8f0df85781e32a23eb053365134 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 fcb1ac4..0c26bcf 100644
18 --- a/Makefile.pre.in
19 +++ b/Makefile.pre.in
20 @@ -1158,7 +1158,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 @@ -1205,7 +1207,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 @@ -1287,6 +1288,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 b1a1f39..d1be997 100644
51 --- a/configure.ac
52 +++ b/configure.ac
53 @@ -3047,6 +3047,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 53a471c..b443987 100644
68 --- a/setup.py
69 +++ b/setup.py
70 @@ -2254,11 +2254,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.7.4