Browse Source

python3: remove __pycache__ folders pip & setuptools

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 <ardeleanalex@gmail.com>
lilik-openwrt-22.03
Alexandru Ardelean 7 years ago
parent
commit
a4691a289c
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      lang/python/python3/files/python3-package-pip.mk
  2. +1
    -0
      lang/python/python3/files/python3-package-setuptools.mk

+ 1
- 0
lang/python/python3/files/python3-package-pip.mk View 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, \


+ 1
- 0
lang/python/python3/files/python3-package-setuptools.mk View 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, \


Loading…
Cancel
Save