aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-libcloud/APKBUILD
blob: de4817842037cb94591fb40988270bd9b8cb0ef2 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-libcloud
pkgver=1.1.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="APACHE2"
depends=""
makedepends="py-setuptools python-dev python3-dev"
install=""
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/py-/}-$pkgver"

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

package() {
	cd "$builddir"
	python setup.py install --root=$pkgdir/ --optimize=1 || return 1
	python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1
}

_py() {
	local python=$1
	pkgdesc="$pkgdesc - $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"
	local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))')

	mkdir -p "$subpkgdir"${dir}
	mv "$pkgdir"${dir}/* "$subpkgdir"${dir}
}

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

_py3() {
	_py python3
}

md5sums="ad425197b95e51ecde8c7e3a4b7a9b1e  py-libcloud-1.1.0.tar.gz"
sha256sums="cf1aef68ab951a9686af6395262d4d89e51f5fe21bff0a370b452289b14d9b1f  py-libcloud-1.1.0.tar.gz"
sha512sums="fa413ffa0ebc644990d9b55102bb95a45d5f8f45744d6645aa7b4a3f071f5d2cc5ca8f9b00e176efd1dfe70f29aaa3b2d6d24d919fc207536728e93ef9f66a60  py-libcloud-1.1.0.tar.gz"