From 4b7c45c756dccfd3b5ece36fe572042353d1c2f0 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Tue, 7 Mar 2017 22:30:56 +0100
Subject: [PATCH] Do not install the idle editor

IDLE is the Python IDE built with the tkinter GUI toolkit. Since it's
highly unlikely to ever be useful in an embedded Linux system
generated by Buildroot, this patch simply disables the installation of
idle and the related Python modules. It saves 800 KB-900 KB of
installed .pyc files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile.pre.in | 2 --
 setup.py        | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/Makefile.pre.in b/Makefile.pre.in
index 2582574..3cfc590 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1045,7 +1045,6 @@ LIBSUBDIRS=	site-packages \
 		json \
 		logging csv importlib wsgiref \
 		ctypes ctypes/macholib \
-		idlelib idlelib/Icons \
 		distutils distutils/command \
 		multiprocessing multiprocessing/dummy \
 		unittest \
@@ -1060,7 +1059,6 @@ TESTSUBDIRS = test test/audiodata test/capath test/data \
 	email/test email/test/data \
 	json/tests \
 	ctypes/test \
-	idlelib/idle_test \
 	distutils/tests \
 	unittest/test
 
diff --git a/setup.py b/setup.py
index c68f6b4..8045a9b 100644
--- a/setup.py
+++ b/setup.py
@@ -2234,7 +2234,7 @@ def main():
     import warnings
     warnings.filterwarnings("ignore",category=DeprecationWarning)
 
-    scripts = ['Tools/scripts/idle', 'Lib/smtpd.py']
+    scripts = ['Lib/smtpd.py']
     if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
         scripts += [ 'Tools/scripts/pydoc' ]
     if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"):
-- 
2.7.4