From 3dac74c37cd6793ec08d52814dc509f0d913d1c3 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Mon, 5 Dec 2011 10:44:07 +0100 Subject: [PATCH] wip --- reduce_python.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 reduce_python.sh diff --git a/reduce_python.sh b/reduce_python.sh new file mode 100755 index 0000000..9470551 --- /dev/null +++ b/reduce_python.sh @@ -0,0 +1,20 @@ +#!/bin/zsh +set -o errexit +set -x + +echo "Starting reducing==========" + +# credit to: +# http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html +# http://latenitesoft.blogspot.com/2008/10/iphone-programming-tips-building-unix.html + +export IOS_VERSION="5.0" +PATH_SIMU=${PWD}/python_files/Python-2.7.1-IOS${IOS_VERSION}-simulator +PATH_DEV=${PWD}/python_files/Python-2.7.1-IOS${IOS_VERSION}-device +PATH_ALL=${PWD}/python_files/Python-2.7.1-IOS${IOS_VERSION} + +pushd $PATH_DEV/lib/python2.7 +find . -iname '*.pyc' | xargs rm +find . -iname '*.py' | xargs rm +rm -rd *test* +rm -rd lib-* wsgiref bsddb curses idlelib hotshot