aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-jedi/APKBUILD
blob: 3cc434186742efa5b0e40c1f8873dee2818e56dc (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-jedi
pkgver=0.10.0
pkgrel=0
pkgdesc="Awesome autocompletion and static analysis library for python."
url="https://github.com/davidhalter/jedi"
arch="noarch"
license="MIT"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$pkgname-$pkgver.tar.gz::https://github.com/davidhalter/${pkgname/py-/}/archive/v$pkgver.tar.gz"
builddir="$srcdir/${pkgname/py-/}-$pkgver"


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

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

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

_py3() {
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$depends $python"  ## remove if arch isn't noarch
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="64ff10cf041a107ca709802b41d9ae27b31fc7fa6cff0efdde4c78d01351efdc1333f1a02e2b8004453574199a4651043e7c3fea7149bfe5e3f0e93c23c38320  py-jedi-0.10.0.tar.gz"