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