Files
MINGW-packages/mingw-w64-libxml2/libxml2-64.install
T
2014-01-29 19:14:51 +04:00

34 lines
700 B
Plaintext

PYTHON_SITELIB=/mingw64/lib/python2.7/site-packages
PYTHON_LIB=/mingw64/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}..."
mingw64/bin/python2 ${PYTHON_LIB}/compileall.py -f -q -d ${pyd} ${D}${pyd}
mingw64/bin/python2 -OO ${PYTHON_LIB}/compileall.py -f -q -d ${pyd} ${D}${pyd}
done
}
post_install() {
if test ! -f mingw64/etc/xml/catalog; then
bin/mkdir -p mingw64/etc/xml
mingw64/bin/xmlcatalog --noout --create mingw64/etc/xml/catalog
fi
python_optimize
rm -f ${PYTHON_SITELIB}/*.a
}
post_upgrade() {
post_install
}