Remove *.pyc and *.pyo from NDK packages
See b.android.com/172348
Change-Id: I8f5f195c9ff47709c06b7df80bb9762f44d157c8
diff --git a/build/tools/package-release.sh b/build/tools/package-release.sh
index d0d8c3f..c5065f6 100755
--- a/build/tools/package-release.sh
+++ b/build/tools/package-release.sh
@@ -565,6 +565,12 @@
# Remove include-fixed/linux/a.out.h. See b.android.com/73728
find "$DSTDIR/toolchains" "$DSTDIR64/toolchains" -name a.out.h | grep include-fixed/ | xargs rm
+ # Remove python *.pyc and *.pyo files
+ find $DSTDIR/prebuilt/*/lib/python* -name "*.pyc" -exec rm -rf {} \;
+ find $DSTDIR/prebuilt/*/lib/python* -name "*.pyo" -exec rm -rf {} \;
+ find $DSTDIR64/prebuilt/*/lib/python* -name "*.pyc" -exec rm -rf {} \;
+ find $DSTDIR64/prebuilt/*/lib/python* -name "*.pyo" -exec rm -rf {} \;
+
# Create an archive for the final package. Extension depends on the
# host system.
ARCHIVE=$BIN_RELEASE