aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-telegram-bot/APKBUILD
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-07 09:51:26 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-08 10:47:48 -0300
commit7dda81fb04ff5542d0924851c9a1eb0cf25eb99e (patch)
tree4d26bc948d4758736b81889958a67f74aa093596 /testing/py3-telegram-bot/APKBUILD
parent510e73d696d8984978b7e718c5ec59edac54e1ee (diff)
downloadaports-7dda81fb04ff5542d0924851c9a1eb0cf25eb99e.tar.bz2
aports-7dda81fb04ff5542d0924851c9a1eb0cf25eb99e.tar.xz
testing/py3-telegram-bot: rename from py-telegram-bot
Diffstat (limited to 'testing/py3-telegram-bot/APKBUILD')
-rw-r--r--testing/py3-telegram-bot/APKBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/testing/py3-telegram-bot/APKBUILD b/testing/py3-telegram-bot/APKBUILD
new file mode 100644
index 0000000000..d84e9f3ebe
--- /dev/null
+++ b/testing/py3-telegram-bot/APKBUILD
@@ -0,0 +1,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"