aboutsummaryrefslogtreecommitdiffstats
path: root/community/weasyprint/APKBUILD
blob: c78caf5a37785065b8e8f4d2de66e7070b9f57fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=weasyprint
_pyname=WeasyPrint
pkgver=52.5
pkgrel=0
pkgdesc="A visual rendering engine for HTML and CSS that can export to PDF"
url="https://weasyprint.org"
arch="noarch"
license="BSD-3-Clause"
depends="cairo
	pango
	py3-cairocffi
	py3-cairosvg
	py3-cssselect2
	py3-cffi
	py3-html5lib
	py3-lxml
	py3-pdfrw
	py3-pillow
	py3-pyphen
	py3-tinycss2
	"
checkdepends="
	py3-pytest
	py3-pytest-cov
	ttf-dejavu
	"
# py3-pytest-runner is needed even for build, not just check phase.
makedepends="py3-setuptools py3-pytest-runner"
replaces="py-weasyprint py3-weasyprint"  # for backward compatibility
provides="py-weasyprint=$pkgver-r$pkgrel py3-weasyprint=$pkgver-r$pkgrel"  # for backward compatibility
source="https://files.pythonhosted.org/packages/source/W/$_pyname/$_pyname-$pkgver.tar.gz
	disable-flake8-isort-for-pytest.patch
	dont-install-tests.patch
	"
builddir="$srcdir/$_pyname-$pkgver"

case "$CARCH" in
	# Many tests fail on these platforms
	mips64* | s390x) options="!check";;
esac

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="0ce86db000adef95fabfb335c069ad2a602ed98056219cedde905c550b04b10b0881d72fbdd38a48fae4e263825f5fbd8a70ce13932083afb8930eacc5817fb5  WeasyPrint-52.5.tar.gz
39cd6c96804977913e2f83a1f1b6f606c54ed68eeb7c3aa08dfecf33a725b840a6234f6635a2eea6dc4af61818222b6a08eb745f6b37c73c80c3923d7ebcd30a  disable-flake8-isort-for-pytest.patch
f3477df116105c993330359cff9076e75b385a8f88addb85b2a03977d5e2c709ac46355bff555a296a8cb674a1e22f377090a413491f41cb6d40c80ab17f72cc  dont-install-tests.patch"