libxml2: Build python2 module. Split python module to separate package.

This commit is contained in:
Alexpux
2013-12-11 10:43:52 +04:00
parent 7fd3283783
commit 590e211989
2 changed files with 51 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
PYTHON_SITELIB=usr/lib/python2.7/site-packages
PYTHON_LIB=usr/lib/python2.7
python_optimize() {
local pyd
for pyd in "${@:-${PYTHON_SITELIB}}"
do
if [ ! -d ${D}${pyd} ]
then
echo "Error: directory ${pyd} does not exist"
fi
echo "Compiling ${pyd}..."
bin/python2 ${PYTHON_LIB}/compileall.py -f -q -d ${pyd} ${D}${pyd}
bin/python2 -OO ${PYTHON_LIB}/compileall.py -f -q -d ${pyd} ${D}${pyd}
done
}
post_install() {
python_optimize
rm -f ${PYTHON_SITELIB}/*.a
}