From b6481a9ce62d37ca25280755d4935a830e320e8a Mon Sep 17 00:00:00 2001 From: Kreato Date: Tue, 24 Dec 2024 04:09:17 +0300 Subject: [PATCH] python/python-pip: remove pycache/.pyc files --- python-pip/run | 2 ++ python/run | 2 ++ 2 files changed, 4 insertions(+) diff --git a/python-pip/run b/python-pip/run index 251fa5e5..9c36ee99 100644 --- a/python-pip/run +++ b/python-pip/run @@ -9,4 +9,6 @@ DESCRIPTION="Easily download, build, install, upgrade, and uninstall Python pack package() { pip install . --no-dependencies --ignore-installed --prefix=/usr --root="$ROOT" + find "$ROOT" -type d -name "__pycache__" -exec rm -rf {} + + find "$ROOT" -type f -name "*.pyc" -exec rm -f {} + } diff --git a/python/run b/python/run index 45608f6d..75754373 100644 --- a/python/run +++ b/python/run @@ -17,4 +17,6 @@ build() { package() { make DESTDIR="$ROOT" install || exit 1 ln -s "python3" "$ROOT/usr/bin/python" + find "$ROOT" -type f -name "*.pyc" -delete + find "$ROOT" -type d -name "__pycache__" -exec rm -rf {} + }