tazwok rev 183

Add py_compiled_files_remove function into tazwok. This is to save size on python based packages. .pyc and .pyo files are not need for python scripts to run i hope.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Dec 01 23:31:34 2010 +0000 (2010-12-01)
parents 130993d0c2f4
children df32c6864595
files tazwok
line diff
     1.1 --- a/tazwok	Mon Nov 22 15:47:00 2010 +0100
     1.2 +++ b/tazwok	Wed Dec 01 23:31:34 2010 +0000
     1.3 @@ -467,6 +467,15 @@
     1.4  	status
     1.5  }
     1.6  
     1.7 +# Remove .pyc and .pyo files from packages
     1.8 +py_compiled_files_remove()
     1.9 +{
    1.10 +	echo -n "Removing all .pyc and .pyo files from package ..."
    1.11 +	find $fs -type f -name "*.pyc" -delete 2>/dev/null
    1.12 +	find $fs -type f -name "*.pyo" -delete 2>/dev/null
    1.13 +	status
    1.14 +}
    1.15 +
    1.16  # Check FSH in a slitaz package (Path: /:/usr)
    1.17  check_fsh()
    1.18  {
    1.19 @@ -556,6 +565,7 @@
    1.20  			copy_generic_files
    1.21  		fi
    1.22  		strip_package
    1.23 +		py_compiled_files_remove
    1.24  	else
    1.25  		echo "No package rules to gen $PACKAGE..."
    1.26  		exit 1