[arch-commits] Commit in python-telegram-bot/repos (2 files)
Evangelos Foutras
foutrelis at gemini.archlinux.org
Thu Dec 9 06:12:23 UTC 2021
Date: Thursday, December 9, 2021 @ 06:12:22
Author: foutrelis
Revision: 1065819
archrelease: copy trunk to community-staging-any
Added:
python-telegram-bot/repos/community-staging-any/
python-telegram-bot/repos/community-staging-any/PKGBUILD
(from rev 1065818, python-telegram-bot/trunk/PKGBUILD)
----------+
PKGBUILD | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
Copied: python-telegram-bot/repos/community-staging-any/PKGBUILD (from rev 1065818, python-telegram-bot/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2021-12-09 06:12:22 UTC (rev 1065819)
@@ -0,0 +1,64 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=python-telegram-bot
+pkgver=13.8.1
+_commit=c53dc7dae4c254e15a5a3a72b9da552e72708c9c
+pkgrel=1
+pkgdesc="A pure Python interface for the Telegram Bot AP"
+url="https://github.com/python-telegram-bot/python-telegram-bot"
+license=('LGPL')
+arch=('any')
+depends=('python-apscheduler' 'python-cryptography' 'python-tornado'
+ 'python-ujson' 'python-urllib3' 'python-pytz' 'python-cachetools')
+makedepends=('python-setuptools')
+checkdepends=('python-beautifulsoup4' 'python-flaky' 'python-pytest-timeout')
+source=("https://github.com/python-telegram-bot/python-telegram-bot/archive/$_commit/$pkgname-$pkgver.tar.gz")
+sha512sums=('1f66bf6dd335205f04932bcba91c9d09841c56a9c9de2888a774bba6a8e09dc08693ddba8b31c015d71fdab840c86139020c20d6210077dbe2d2f992dd53f5bf')
+
+prepare() {
+ cd python-telegram-bot-$_commit
+
+ rm -r telegram/vendor
+
+ # Use system cert store
+ 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
+
+ # Fixes for new pytest
+ sed -i '/pytest.mark.nocoverage/d' tests/test_meta.py
+ sed -i '/ message=/d' tests/test_constants.py
+
+ # Fixes for testing with system urllib3
+ sed -i 's/from telegram.vendor.ptb_urllib3 import urllib3/import urllib3/' tests/test_official.py
+ sed -i 's/from telegram.vendor.ptb_urllib3.urllib3/from urllib3/' tests/test_bot.py
+ sed -e '/telegram.utils.deprecate.TelegramDeprecationWarning/i \ ignore:python-telegram-bot is using upstream urllib3. This is allowed but not supported by python-telegram-bot maintainers.:UserWarning' \
+ -i setup.cfg
+
+ # Spacing difference
+ sed -i 's/"switch_inline_query": ""/"switch_inline_query":""/;s/"switch_inline_query_current_chat": ""/"switch_inline_query_current_chat":""/' tests/test_inlinekeyboardmarkup.py
+}
+
+build() {
+ cd python-telegram-bot-$_commit
+ python setup.py build --with-upstream-urllib3
+}
+
+check() {
+ cd python-telegram-bot-$_commit
+ # test_run_monthly: fails on upstream ci too
+ # test_get_updates_bailout_err: seems to be a test error TODO
+ # test_deprecation_warnings_start_webhook: fails due to DeprecationWarning
+ # test_clean_deprecation_warning_polling: fails due to DeprecationWarning
+ python -m pytest \
+ --deselect tests/test_jobqueue.py::TestJobQueue::test_run_monthly \
+ --deselect tests/test_updater.py::TestUpdater::test_get_updates_bailout_err \
+ --deselect tests/test_updater.py::TestUpdater::test_deprecation_warnings_start_webhook \
+ --deselect tests/test_updater.py::TestUpdater::test_clean_deprecation_warning_polling
+}
+
+package() {
+ cd python-telegram-bot-$_commit
+ python setup.py install --root="$pkgdir" --optimize=1 --with-upstream-urllib3
+}
More information about the arch-commits
mailing list