package/python: do not install MS Windows installers on the target
authorTitouan Christophe <titouan.christophe@railnova.eu>
Sat, 12 Sep 2020 11:56:22 +0000 (13:56 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 13 Sep 2020 14:20:52 +0000 (16:20 +0200)
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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/python/python.mk

index 1a3a60bbac7205933b529ac60c45a23b5260edde..10718f43589035226426394554afa7350792d483 100644 (file)
@@ -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 ; \