testing/py-weasyprint: add py3, update to 0.42.3

This commit is contained in:
Drew DeVault 2018-11-20 18:01:05 -05:00 committed by Leonardo Arena
parent 8c3bc20105
commit 3129d0a08a

View File

@ -2,40 +2,56 @@
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=py-weasyprint
_pkgname=WeasyPrint
pkgver=0.19.2
pkgver=0.42.3
pkgrel=0
pkgdesc="cairo-based HTML renderer for python"
url="http://weasyprint.org"
arch="noarch"
license="LGPL"
depends="python2 pango cairo py-cairocffi py-cairosvg py-cssselect py-tinycss py-pyphen py-lxml"
depends_dev=""
makedepends="python2-dev py-setuptools"
install=""
subpackages=""
depends="pango cairo py-cairocffi py-cairosvg py-cssselect py-tinycss py-pyphen py-lxml"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
makedepends="python2-dev python3-dev py-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
cp -r "$builddir" "$builddir"-py3
}
build() {
cd "$_builddir"
python2 setup.py build || return 1
cd "$builddir"
python2 setup.py build
cd "$builddir"-py3
python3 setup.py build
}
check() {
cd "$builddir"
python2 setup.py check
cd "$builddir"-py3
python3 setup.py check
}
package() {
cd "$_builddir"
python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
mkdir -p "$pkgdir"
}
md5sums="75f1de2cf4677c53c5bff1adb23033ec WeasyPrint-0.19.2.tar.gz"
sha256sums="63fa62b40a5bd3a1f14887950f6f40d73fff752507cd41f0040606b3d5399ba4 WeasyPrint-0.19.2.tar.gz"
sha512sums="c491ec6788b164857265f11391148d761a737a47045288258f5584b277d58075e49384a9c0fa93ab849adbc1672684518039e2cc7bcf76b684dbab196f666166 WeasyPrint-0.19.2.tar.gz"
_py2() {
cd "$builddir"
_py python2
}
_py3() {
cd "$builddir"-py3
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="d6007934c301904308bd4821626d6a7bb504268c5c71a31f7486faebb3dd649fad18774737cab39eb13a0916635bb58eba2c8432c72cc5a461cea2a5d874b1ee WeasyPrint-0.42.3.tar.gz"