aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-pyparted/APKBUILD
blob: 4765d1f7ab9319ef5d4136923138bf58c50e121a (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-pyparted
_pkgname=pyparted
pkgver=3.11.2
pkgrel=1
pkgdesc="Python bindings for GNU parted (libparted)"
url="https://github.com/rhinstaller/pyparted"
arch="all"
license="GPL-2.0"
makedepends="python2-dev python3-dev py-setuptools parted-dev"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$pkgname-$pkgver.tar.gz::https://github.com/rhinstaller/${pkgname/py-/}/archive/v$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"
}

_py2() {
	_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="de6e7387e3eb9c9cb11e01f475d2749d2ce22ec2f11386df20cafcf83f7e431828f2db936f29c717e42694ff390a592598893633156a21aa7c8d5700a3c9ece9  py-pyparted-3.11.2.tar.gz"