# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-telegram-bot _pkgname=${pkgname/py/python} pkgver=11.1.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="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"