5ff01eb31f
Signed-off-by: Adam Duskett <Aduskett@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
90 lines
2.9 KiB
Diff
90 lines
2.9 KiB
Diff
From c3ad1d6fc8f1fa56ee0522389227454710bf7877 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime.ripard@free-electrons.com>
|
|
Date: Wed, 22 Feb 2017 17:45:14 -0800
|
|
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>
|
|
[ Andrey Smirnov: ported to Python 3.6 ]
|
|
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.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 f49abf8395..bc777e6504 100644
|
|
--- a/Makefile.pre.in
|
|
+++ b/Makefile.pre.in
|
|
@@ -1287,7 +1287,9 @@ bininstall: altbininstall
|
|
-rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc
|
|
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.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)
|
|
@@ -1330,7 +1332,6 @@ LIBSUBDIRS= site-packages \
|
|
html json http dbm xmlrpc \
|
|
logging csv wsgiref urllib \
|
|
ctypes ctypes/macholib \
|
|
- idlelib idlelib/Icons \
|
|
distutils distutils/command \
|
|
importlib \
|
|
turtledemo \
|
|
@@ -1420,6 +1421,10 @@ ifeq (@EXPAT@,yes)
|
|
LIBSUBDIRS += $(XMLLIBSUBDIRS)
|
|
endif
|
|
|
|
+ifeq (@IDLE@,yes)
|
|
+LIBSUBDIRS += idlelib idlelib/Icons
|
|
+endif
|
|
+
|
|
ifeq (@LIB2TO3@,yes)
|
|
LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
|
|
TESTSUBDIRS += lib2to3/tests \
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 99bbc37b07..8c9706582e 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -3305,6 +3305,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 d2727c0da5..9f09b3d985 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -2402,11 +2402,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.20.1
|
|
|