aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-attrs/APKBUILD
blob: 235d62c804eefeeae7d40fedaff44dbd8005d9f2 (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
# Contributor: Jean-Louis Fuchs <ganwell@fangorn.ch>
# Maintainer: Jean-Louis Fuchs <ganwell@fangorn.ch>
pkgname=py-attrs
pkgver=18.2.0
pkgrel=0
pkgdesc="Python classes without boilerplate"
url="http://www.attrs.org"
arch="noarch"
license="MIT"
makedepends="python3-dev python2-dev py2-setuptools"
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="py-attrs-$pkgver.tar.gz::https://github.com/python-attrs/attrs/archive/$pkgver.tar.gz
	check.py
	"
builddir="$srcdir/attrs-$pkgver"

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

check() {
	PYTHONPATH="$builddir/src" python2 "$srcdir"/check.py
	PYTHONPATH="$builddir/src" python3 "$srcdir"/check.py
}

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

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

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

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

_py3() {
	_py python3
}

sha512sums="01bcd8d492f0b7e64ae42e311b0e443d2b365d98021d8c15f8003da084f48cd20456c12defd734d3386979bb69ac2bebafa1d14692c6dad69b084929992b2c2d  py-attrs-18.2.0.tar.gz
36bcb4ec145f29e79fc019dc39672f13dc94e1c07225968af51f19e17b2aede0b23dafdff265f1e77a251e53af9802bcf1db5068900ee0a03e1bfc1051c01ef9  check.py"