diff mbox series

[2/2] package/python: do not install MS Windows installers on the target

Message ID 20200912115622.134543-2-titouan.christophe@railnova.eu
State Accepted
Headers show
Series [1/2] package/python3: do not install MS Windows installers on the target | expand

Commit Message

Titouan Christophe Sept. 12, 2020, 11:56 a.m. UTC
Buildroot generates Linux systems, so there is no need to have
MS Windows executables in there.

This reduces the target filesystem size by about 600kB:
$ du -hcs usr/lib/python2.7/distutils/command/wininst-*.exe
60K usr/lib/python2.7/distutils/command/wininst-6.0.exe
64K usr/lib/python2.7/distutils/command/wininst-7.1.exe
60K usr/lib/python2.7/distutils/command/wininst-8.0.exe
192K    usr/lib/python2.7/distutils/command/wininst-9.0.exe
220K    usr/lib/python2.7/distutils/command/wininst-9.0-amd64.exe
596K    total

Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
---
 package/python/python.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Peter Korsgaard Sept. 15, 2020, 6:10 p.m. UTC | #1
>>>>> "Titouan" == Titouan Christophe <titouan.christophe@railnova.eu> writes:

 > Buildroot generates Linux systems, so there is no need to have
 > MS Windows executables in there.

 > This reduces the target filesystem size by about 600kB:
 > $ du -hcs usr/lib/python2.7/distutils/command/wininst-*.exe
 > 60K usr/lib/python2.7/distutils/command/wininst-6.0.exe
 > 64K usr/lib/python2.7/distutils/command/wininst-7.1.exe
 > 60K usr/lib/python2.7/distutils/command/wininst-8.0.exe
 > 192K    usr/lib/python2.7/distutils/command/wininst-9.0.exe
 > 220K    usr/lib/python2.7/distutils/command/wininst-9.0-amd64.exe
 > 596K    total

 > Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>

Committed to 2020.02.x, 2020.05.x and 2020.08.x, thanks.
diff mbox series

Patch

diff --git a/package/python/python.mk b/package/python/python.mk
index ccaaadd012..a08732cb22 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -199,6 +199,7 @@  define PYTHON_REMOVE_USELESS_FILES
 	rm -f $(TARGET_DIR)/usr/bin/python2-config
 	rm -f $(TARGET_DIR)/usr/bin/python-config
 	rm -f $(TARGET_DIR)/usr/bin/smtpd.py
+	rm -f $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/distutils/command/wininst*.exe
 	for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/config/ \
 		-type f -not -name pyconfig.h -a -not -name Makefile` ; do \
 		rm -f $$i ; \