aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-telegram-bot/APKBUILD
blob: 937f053e8bbc65f37695828fa1ba2c0e729f6d1a (plain) (blame)
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-telegram-bot
_pkgname=${pkgname/py/python}
pkgver=8.0.0
pkgrel=0
pkgdesc="A Python wrapper around the Telegram Bot API"
url="https://github.com/python-telegram-bot/python-telegram-bot"
arch="noarch"
license="LGPL3+"
depends="py-futures py-certifi"
depends_dev=""
makedepends="python2-dev python3-dev py2-setuptools"
install=""
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$pkgname-$pkgver.zip::https://github.com/$_pkgname/$_pkgname/archive/v$pkgver.zip"
builddir="$srcdir"/$_pkgname-$pkgver

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

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

_py2() {
	replaces="$pkgname"
	depends="${depends//py-/py2-}"
	_py python2
}

_py3() {
	depends="${depends//py-/py3-}"
	_py python3
}

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

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

sha512sums="179b0a84bbee2b55acf45cbe4225723369ff025d4474cb8aa922f6d94128cb96c2c630108213a824877b1580461de7f748476829e4274341b6ee1c670d2ae6c2  py-telegram-bot-8.0.0.zip"