python3: remove __pycache__ folders pip & setuptools
authorAlexandru Ardelean <redacted>
Fri, 19 May 2017 14:18:33 +0000 (17:18 +0300)
committerAlexandru Ardelean <redacted>
Fri, 19 May 2017 14:27:48 +0000 (17:27 +0300)
python3-pip & python3-setuptools have slightly
different installation mechanisms.

We need to remove the __pycache__ folders.
Seems they're generated.

This also reduces the size of the python3-pip &
python3-setuptools packages.

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python3/files/python3-package-pip.mk
lang/python/python3/files/python3-package-setuptools.mk

index 0bd54aac8133bdaf5a9e36fb765552642133731d..b20a10f7913d3b3185fed0b3cc5cad760ad085a0 100644 (file)
@@ -20,6 +20,7 @@ define Py3Package/python3-pip/install
        $(CP) \
                $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON3_VERSION)/site-packages/pip \
                $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/
+       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ | xargs rm -rf
 endef
 
 $(eval $(call Py3BasePackage,python3-pip, \
index 52d56e9ed6ae60e520e053527863a22379363008..9a646334f33773da04061d87c901dbc327d20a66 100644 (file)
@@ -23,6 +23,7 @@ define Py3Package/python3-setuptools/install
                $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \
                $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \
                $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
+       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ | xargs rm -rf
 endef
 
 $(eval $(call Py3BasePackage,python3-setuptools, \
git clone https://git.99rst.org/PROJECT