aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-telegram-bot/APKBUILD
blob: d84e9f3ebed021dad8897ed2aaad4c0761e79e20 (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-telegram-bot
_pkgname=${pkgname/py/python}
pkgver=11.1.0
pkgrel=1
pkgdesc="A Python wrapper around the Telegram Bot API"
url="https://github.com/python-telegram-bot/python-telegram-bot"
arch="noarch"
license="LGPL-3.0-or-later"
depends="py-certifi"
#checkdepends="pytest py-cffi py-cryptography py-future py-pathlib2"
options="!check" # few requirements-dev.txt packages missing in alpine
makedepends="python2-dev python3-dev py2-setuptools"
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="py2-futures ${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="2f9f13dfd784a48e05537a3038057ca4f03d075132af2bd3cc8a67e4f6bd1a8c361afd4f508529a5031938b005a2b1442085c84b353e58d39a99292c6d037730  py-telegram-bot-11.1.0.zip"