summaryrefslogtreecommitdiff
path: root/community/py3-cairosvg/APKBUILD
blob: 04d4873db635221bfe256d02c9c61966a740b9df (plain)
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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py3-cairosvg
_pyname=CairoSVG
pkgver=2.5.2
pkgrel=3
pkgdesc="Cairo-based SVG renderer for python"
url="https://cairosvg.org"
arch="noarch"
license="LGPL-3.0-or-later"
depends="
	python3 py3-tinycss2 py3-cssselect2 py3-defusedxml py3-cairocffi
	py3-webencodings
"
checkdepends="
	py3-pillow
	py3-pytest
	py3-pytest-cov
	py3-pytest-flake8
	py3-pytest-isort
	py3-pytest-runner
	"
makedepends="python3-dev py3-setuptools cairo-dev py3-pytest-runner"
_pypiprefix="${_pyname%${_pyname#?}}"
source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/CairoSVG-$pkgver
replaces="py-cairosvg" # Backwards compat
provides="py-cairosvg=$pkgver-r$pkgrel" # Backwards compat
# current version of pytest-flake8 breaks with flake8 so they can't run
options="!check"

prepare() {
	mkdir test_non_regression/cairosvg_reference/
	cp -a $(ls -1 . | grep -v test_non_regression) test_non_regression/cairosvg_reference/
}

build() {
	python3 setup.py build
}

check() {
	python3 setup.py pytest -v
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
070fbb549614401a7d8290497b0eb7702330ee264c5f625cd1e7aac4aea7d71ee7d2d8899297212e1a3c11c93903b191c0c699336d9000796318b11f4e075576  CairoSVG-2.5.2.tar.gz
"