aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-tinycss/APKBUILD
blob: 29ca919e3f4f7978ba6d1b781c5bfa29e8735df0 (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
51
52
53
54
55
# Contributor: 
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: 
pkgname=py-tinycss
_pkgname=tinycss
pkgver=0.4
pkgrel=0
pkgdesc="tiny CSS parser for python"
url="https://pythonhosted.org/tinycss"
arch="all"
license="BSD"
makedepends="python2-dev python3-dev py-setuptools"
checkdepends="pytest-cov py-configparser py-futures"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
	disable-styling-checks.patch"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

check() {
	cd "$builddir"
	python2 setup.py test
	python3 setup.py test
}

package() {
	mkdir -p "$pkgdir"
}

_py2() {
	replaces="$pkgname"
	_py python2
}

_py3() {
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$depends $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

sha512sums="13a50332cddc28026fd7ecc007e14085976284e69de6ea93d1013502fd9791694092c010947b13dcd23f3a2df65f277f62410abd90d03eac16fa5af913673b0a  tinycss-0.4.tar.gz
8265e4c9e52fb8ae3f3041333aea46c3702e3657892a957db2117615d16b446bcadb96601fe0b8197d921997433b1a0e06a77a10ce74095687c59ed00f766def  disable-styling-checks.patch"