[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Mon Dec 24 19:32:46 UTC 2018


    Date: Monday, December 24, 2018 @ 19:32:42
  Author: felixonmars
Revision: 417852

addpkg: python-telegram-bot 11.1.0-1

Added:
  python-telegram-bot/
  python-telegram-bot/repos/
  python-telegram-bot/trunk/
  python-telegram-bot/trunk/PKGBUILD

----------+
 PKGBUILD |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

Added: python-telegram-bot/trunk/PKGBUILD
===================================================================
--- python-telegram-bot/trunk/PKGBUILD	                        (rev 0)
+++ python-telegram-bot/trunk/PKGBUILD	2018-12-24 19:32:42 UTC (rev 417852)
@@ -0,0 +1,46 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=python-telegram-bot
+pkgver=11.1.0
+pkgrel=1
+pkgdesc="A pure Python interface for the Telegram Bot AP"
+url="https://github.com/python-telegram-bot/python-telegram-bot"
+license=('GPL')
+arch=('any')
+depends=('python-cryptography' 'python-future' 'python-tornado' 'python-urllib3')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'python-beautifulsoup4' 'python-flaky')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/python-telegram-bot/python-telegram-bot/archive/v$pkgver.tar.gz"
+        https://github.com/python-telegram-bot/python-telegram-bot/commit/9d99660ba95b103b3e1dc80414a5ce2fd805260b.patch)
+sha512sums=('89069ac8f5b5255f69fb88c36f2af11ad96b6835bda1e3bd9367ee552b0464d574fb4d3fc32b2f14cf2fc94af1772df002e37d8137ed0f649a53bbb2c0ba6051'
+            'd3acc49c24a6c747923b04c617ee322256acb3d7c22e188908563b7957c8756381757a007817cbaf6a7e0c5a13d28de66086774b9f2a8a5d278d0c6cf74b197a')
+
+prepare() {
+  cd python-telegram-bot-$pkgver
+  # https://github.com/python-telegram-bot/python-telegram-bot/pull/1262
+  patch -p1 -i ../9d99660ba95b103b3e1dc80414a5ce2fd805260b.patch
+
+  sed -i '/certifi/d' telegram/__main__.py requirements.txt
+  sed -e '/import certifi/d' \
+      -e 's|certifi.where()|"/etc/ssl/certs/ca-certificates.crt"|' \
+      -i telegram/utils/request.py tests/test_official.py
+  sed -e 's/import telegram.vendor.ptb_urllib3.urllib3/import urllib3/' \
+      -e 's/from telegram.vendor.ptb_urllib3.urllib3/from urllib3/' \
+      -e 's/from telegram.vendor.ptb_urllib3 import urllib3/import urllib3/' \
+      -i telegram/utils/request.py tests/test_official.py
+}
+
+build() {
+  cd python-telegram-bot-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd python-telegram-bot-$pkgver
+  pytest
+}
+
+package() {
+  cd python-telegram-bot-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+}


More information about the arch-commits mailing list