aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-libcloud/APKBUILD
blob: 3bed271a75a9906e8da8cb790b9159449d0c76ab (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-libcloud
_pkgname=${pkgname/py-/}
pkgver=2.5.0
pkgrel=0
pkgdesc="Python library for interacting with many of the popular cloud service providers using a unified API."
url="http://libcloud.apache.org/"
arch="noarch"
license="Apache-2.0"
makedepends="py-setuptools python2-dev python3-dev"
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="$pkgname-$pkgver.tar.gz::https://github.com/apache/${pkgname/py-/}/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

check() {
	python2 setup.py check
	python3 setup.py check
}

build() {
	python2 setup.py build
	python3 setup.py build
}

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
}

sha512sums="bedb79d7b3688c07dc8c7d6376dd3abc6370cd4587f5fe879cdda6b18e3fd694569a577234cd6c6cf2e9533c3fda7a3dea6fdf6ada7784a6622bc928dabb83f6  py-libcloud-2.5.0.tar.gz"