libxml2: remove install script using python2

This commit is contained in:
Christoph Reiter 2021-04-22 10:02:21 +02:00
parent 44cb690fc9
commit e0f9c2d820
2 changed files with 1 additions and 26 deletions

View File

@ -3,7 +3,7 @@
pkgbase=libxml2
pkgname=('libxml2' 'libxml2-devel' 'libxml2-python')
pkgver=2.9.10
pkgrel=7
pkgrel=8
pkgdesc="XML parsing library, version 2"
arch=(i686 x86_64)
license=('MIT')
@ -153,7 +153,6 @@ package_libxml2-python(){
depends=('libxml2')
groups=('python-modules')
options=('staticlibs')
install=libxml2-python.install
PYTHON_SITELIB="$(python -c 'import site, sys; sys.stdout.write(site.getsitepackages()[0])')"
mkdir -p ${pkgdir}/${PYTHON_SITELIB}

View File

@ -1,24 +0,0 @@
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 ${pyd} ]
then
echo "Error: directory ${pyd} does not exist"
fi
echo "Compiling ${pyd}..."
usr/bin/python2 ${PYTHON_LIB}/compileall.py -f -q -d ${pyd} ${pyd}
usr/bin/python2 -OO ${PYTHON_LIB}/compileall.py -f -q -d ${pyd} ${pyd}
done
}
post_install() {
python_optimize
rm -f ${PYTHON_SITELIB}/*.a
}