aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-logbook/APKBUILD
blob: 61c9b6f8d6d5808c5ab2366404078800debaa0a0 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-logbook
pkgver=1.3.0
pkgrel=0
pkgdesc="Logging replacement for Python"
url="https://pypi.python.org/pypi/Logbook"
arch="noarch"
license="BSD-3-Clause"
depends=""
depends_dev=""
makedepends="python3 py-setuptools"
install=""
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/L/Logbook/Logbook-$pkgver.tar.gz"

builddir="$srcdir"/Logbook-$pkgver

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

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

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

_py3() {
	_py python3
}

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

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

sha512sums="a542430ee55906867f4149e925280d4ec296808d4f38cf00ea0e64f04a903a70de8caa0f2c682bd0441ce534e8a3d93222ff536c86d0e32e4d979303515263ea  Logbook-1.3.0.tar.gz"