aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-cssselect/APKBUILD
blob: eb43a7510e3769c16f58a9493000624f46b1f988 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-cssselect
_pkgname=cssselect
pkgver=0.9.2
pkgrel=1
pkgdesc="A Python library that parses CSS3 Selectors and translates them to XPath 1.0"
url="http://pypi.python.org/pypi/cssselect"
arch="noarch"
license="BSD"
depends=""
makedepends="python2-dev python3-dev py-setuptools"
install=""
subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

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

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


_py() {
	local python=$1
	pkgdesc="$pkgdesc - $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python" 	
	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

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

_py3() {
	_py python3
}
md5sums="4c5931d8456dfe72fa4662f9c0509bfa  cssselect-0.9.2.tar.gz"
sha256sums="713b5b99ef08022257b3409c7ae1b18b2c6536b3f155e6237c5cfba0f67ae6f5  cssselect-0.9.2.tar.gz"
sha512sums="313965d3a0ad37b24d72d6faf861c04e7af7e4ff06f58450a23585c45bd9f247e565a4b7d594c008d40625601c2b8e76919801b3d77cfd62c7edc20cf366c1f9  cssselect-0.9.2.tar.gz"