Skip to content

Commit 52a3cc1

Browse files
committed
Downsizing python packages
1 parent 1345e28 commit 52a3cc1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pip_install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/bash
22
DIR="python/lib/python$PYTHON_VERSION/site-packages"
33
pip3 install "$@" --target "$DIR"
4+
find "$DIR" -name "*.so" | xargs strip -s
5+
find "$DIR" -wholename "**/*.py[c|o]" | xargs rm -rf
6+
find "$DIR" -wholename "**/__pycache__*" | xargs rm -rf
7+
find "$DIR" -wholename "**/*.dist-info*" | xargs rm -rf
48
zip -r /libraries.zip python

0 commit comments

Comments
 (0)