diff options
author | evgfilim1 | 2022-05-11 18:57:51 +0500 |
---|---|---|
committer | evgfilim1 | 2022-05-11 18:58:07 +0500 |
commit | 2eb912efc13fa5ec3fd9096db5544ee842eac8a3 (patch) | |
tree | 7058309394268cab7567e27e7aecd5f82469376b | |
parent | 2fe897b551121c6a9080da387e7f949c6347d8b6 (diff) | |
download | aur-python-telegram-bot-git.tar.gz |
Update to version 1:20.0a0.r5
Add `check()` function to run tests before installing
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | CHANGES.rst | 320 | ||||
-rw-r--r-- | PKGBUILD | 48 |
3 files changed, 357 insertions, 29 deletions
@@ -1,27 +1,29 @@ pkgbase = python-telegram-bot-git pkgdesc = A Python wrapper around the Telegram Bot API - pkgver = 13.6.r3.52ce0392 + pkgver = 20.0a0.r5.23ed0880 pkgrel = 1 epoch = 1 url = https://github.com/python-telegram-bot/python-telegram-bot changelog = CHANGES.rst arch = any license = LGPL3 + checkdepends = python-cryptography + checkdepends = python-pytest>=7.1.2 + checkdepends = python-pytest-asyncio + checkdepends = python-flaky makedepends = git makedepends = python-setuptools - depends = python-certifi - depends = python-tornado>=5.1 - depends = python-apscheduler>=3.6.3 + depends = python-httpx>=0.22.0 + depends = python-tornado>=6.1 + depends = python-apscheduler depends = python-pytz>=2018.6 - depends = python-cachetools>=4.2.2 - optdepends = python-pysocks: SOCKS or HTTP proxy support + depends = python-cachetools>=5.0.0 + optdepends = python-socksio: SOCKS proxy support optdepends = python-ujson: Ultra fast JSON parsing optdepends = python-cryptography: Telegram Passport support provides = python-telegram-bot conflicts = python-telegram-bot source = python-telegram-bot::git+https://github.com/python-telegram-bot/python-telegram-bot.git - source = urllib3::git+https://github.com/python-telegram-bot/urllib3.git#branch=ptb - sha256sums = SKIP sha256sums = SKIP pkgname = python-telegram-bot-git diff --git a/CHANGES.rst b/CHANGES.rst index 51419928953d..7264ea7e3d50 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,322 @@ Changelog ========= +Version 20.0a0 +============== +*Released 2022-05-06* + +This is the technical changelog for version 20.0a0. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_. + +Major Changes: +-------------- + +- Refactor Initialization of Persistence Classes + (`#2604 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2604>`__) +- Drop Non-``CallbackContext`` API + (`#2617 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2617>`__) +- Remove ``__dict__`` from ``__slots__`` and drop Python 3.6 + (`#2619 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2619>`__, + `#2636 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2636>`__) +- Move and Rename ``TelegramDecryptionError`` to + ``telegram.error.PassportDecryptionError`` + (`#2621 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2621>`__) +- Make ``BasePersistence`` Methods Abstract + (`#2624 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2624>`__) +- Remove ``day_is_strict`` argument of ``JobQueue.run_monthly`` + (`#2634 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2634>`__ + by `iota-008 <https://github.com/iota-008>`__) +- Move ``Defaults`` to ``telegram.ext`` + (`#2648 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2648>`__) +- Remove Deprecated Functionality + (`#2644 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2644>`__, + `#2740 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2740>`__, + `#2745 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2745>`__) +- Overhaul of Filters + (`#2759 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2759>`__, + `#2922 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2922>`__) +- Switch to ``asyncio`` and Refactor PTBs Architecture + (`#2731 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2731>`__) +- Improve ``Job.__getattr__`` + (`#2832 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2832>`__) +- Remove ``telegram.ReplyMarkup`` + (`#2870 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2870>`__) +- Persistence of ``Bots``: Refactor Automatic Replacement and + Integration with ``TelegramObject`` + (`#2893 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2893>`__) + +New Features: +------------- + +- Introduce Builder Pattern + (`#2646 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2646>`__) +- Add ``Filters.update.edited`` + (`#2705 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2705>`__ + by `PhilippFr <https://github.com/PhilippFr>`__) +- Introduce ``Enums`` for ``telegram.constants`` + (`#2708 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2708>`__) +- Accept File Paths for ``private_key`` + (`#2724 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2724>`__) +- Associate ``Jobs`` with ``chat/user_id`` + (`#2731 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2731>`__) +- Convenience Functionality for ``ChatInviteLinks`` + (`#2782 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2782>`__) +- Add ``Dispatcher.add_handlers`` + (`#2823 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2823>`__) +- Improve Error Messages in ``CommandHandler.__init__`` + (`#2837 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2837>`__) +- ``Defaults.protect_content`` + (`#2840 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2840>`__) +- Add ``Dispatcher.migrate_chat_data`` + (`#2848 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2848>`__ + by `DonalDuck004 <https://github.com/DonalDuck004>`__) +- Add Method ``drop_chat/user_data`` to ``Dispatcher`` and Persistence + (`#2852 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2852>`__) +- Add methods ``ChatPermissions.{all, no}_permissions`` ([#2948] +- Full Support for API 6.0 + (`#2956 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2956>`__)(https://github.com/python-telegram-bot/python-telegram-bot/pull/2948)) +- Add Python 3.10 to Test Suite + (`#2968 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2968>`__) + +Bug Fixes & Minor Changes: +-------------------------- + +- Improve Type Hinting for ``CallbackContext`` + (`#2587 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2587>`__ + by `revolter <https://github.com/revolter>`__) +- Fix Signatures and Improve ``test_official`` + (`#2643 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2643>`__) +- Refine ``Dispatcher.dispatch_error`` + (`#2660 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2660>`__) +- Make ``InlineQuery.answer`` Raise ``ValueError`` + (`#2675 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2675>`__) +- Improve Signature Inspection for Bot Methods + (`#2686 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2686>`__) +- Introduce ``TelegramObject.set/get_bot`` + (`#2712 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2712>`__ + by `zpavloudis <https://github.com/zpavloudis>`__) +- Improve Subscription of ``TelegramObject`` + (`#2719 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2719>`__ + by `SimonDamberg <https://github.com/SimonDamberg>`__) +- Use Enums for Dynamic Types & Rename Two Attributes in ``ChatMember`` + (`#2817 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2817>`__) +- Return Plain Dicts from ``BasePersistence.get_*_data`` + (`#2873 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2873>`__) +- Fix a Bug in ``ChatMemberUpdated.difference`` + (`#2947 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2947>`__) +- Update Dependency Policy + (`#2958 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2958>`__) + +Internal Restructurings & Improvements: +--------------------------------------- + +- Add User Friendly Type Check For Init Of + ``{Inline, Reply}KeyboardMarkup`` + (`#2657 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2657>`__) +- Warnings Overhaul + (`#2662 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2662>`__) +- Clear Up Import Policy + (`#2671 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2671>`__) +- Mark Internal Modules As Private + (`#2687 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2687>`__ + by `kencx <https://github.com/kencx>`__) +- Handle Filepaths via the ``pathlib`` Module + (`#2688 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2688>`__ + by `eldbud <https://github.com/eldbud>`__) +- Refactor MRO of ``InputMedia*`` and Some File-Like Classes + (`#2717 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2717>`__ + by `eldbud <https://github.com/eldbud>`__) +- Update Exceptions for Immutable Attributes + (`#2749 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2749>`__) +- Refactor Warnings in ``ConversationHandler`` + (`#2755 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2755>`__, + `#2784 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2784>`__) +- Use ``__all__`` Consistently + (`#2805 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2805>`__) + +CI, Code Quality & Test Suite Improvements: +------------------------------------------- + +- Add Custom ``pytest`` Marker to Ease Development + (`#2628 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2628>`__) +- Pass Failing Jobs to Error Handlers + (`#2692 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2692>`__) +- Update Notification Workflows + (`#2695 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2695>`__) +- Use Error Messages for ``pylint`` Instead of Codes + (`#2700 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2700>`__ + by `Piraty <https://github.com/Piraty>`__) +- Make Tests Agnostic of the CWD + (`#2727 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2727>`__ + by `eldbud <https://github.com/eldbud>`__) +- Update Code Quality Dependencies + (`#2748 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2748>`__) +- Improve Code Quality + (`#2783 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2783>`__) +- Update ``pre-commit`` Settings & Improve a Test + (`#2796 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2796>`__) +- Improve Code Quality & Test Suite + (`#2843 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2843>`__) +- Fix failing animation tests + (`#2865 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2865>`__) +- Update and Expand Tests & pre-commit Settings and Improve Code + Quality + (`#2925 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2925>`__) +- Extend Code Formatting With Black + (`#2972 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2972>`__) +- Update Workflow Permissions + (`#2984 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2984>`__) +- Adapt Tests to Changed ``Bot.get_file`` Behavior + (`#2995 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2995>`__) + +Documentation Improvements: +--------------------------- + +- Doc Fixes + (`#2597 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2597>`__) +- Add Code Comment Guidelines to Contribution Guide + (`#2612 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2612>`__) +- Add Cross-References to External Libraries & Other Documentation + Improvements + (`#2693 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2693>`__, + `#2691 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2691>`__ + by `joesinghh <https://github.com/joesinghh>`__, + `#2739 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2739>`__ + by `eldbud <https://github.com/eldbud>`__) +- Use Furo Theme, Make Parameters Referenceable, Add Documentation + Building to CI, Improve Links to Source Code & Other Improvements + (`#2856 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2856>`__, + `#2798 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2798>`__, + `#2854 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2854>`__, + `#2841 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2841>`__) +- Documentation Fixes & Improvements + (`#2822 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2822>`__) +- Replace ``git.io`` Links + (`#2872 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2872>`__ + by `murugu-21 <https://github.com/murugu-21>`__) +- Overhaul Readmes, Update RTD Startpage & Other Improvements + (`#2969 <https://github.com/python-telegram-bot/python-telegram-bot/pull/2969>`__) + +Version 13.11 +============= +*Released 2022-02-02* + +This is the technical changelog for version 13.11. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_. + +**Major Changes:** + +- Full Support for Bot API 5.7 (`#2881`_) + +.. _`#2881`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2881 + +Version 13.10 +============= +*Released 2022-01-03* + +This is the technical changelog for version 13.10. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_. + +**Major Changes:** + +- Full Support for API 5.6 (`#2835`_) + +**Minor Changes & Doc fixes:** + +- Update Copyright to 2022 (`#2836`_) +- Update Documentation of ``BotCommand`` (`#2820`_) + +.. _`#2835`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2835 +.. _`#2836`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2836 +.. _`#2820`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2820 + +Version 13.9 +============ +*Released 2021-12-11* + +This is the technical changelog for version 13.9. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_. + +**Major Changes:** + +- Full Support for Api 5.5 (`#2809`_) + +**Minor Changes** + +- Adjust Automated Locking of Inactive Issues (`#2775`_) + +.. _`#2809`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2809 +.. _`#2775`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2775 + +Version 13.8.1 +============== +*Released 2021-11-08* + +This is the technical changelog for version 13.8.1. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_. + +**Doc fixes:** + +- Add ``ChatJoinRequest(Handler)`` to Docs (`#2771`_) + +.. _`#2771`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2771 + +Version 13.8 +============ +*Released 2021-11-08* + +This is the technical changelog for version 13.8. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_. + +**Major Changes:** + +- Full support for API 5.4 (`#2767`_) + +**Minor changes, CI improvements, Doc fixes and Type hinting:** + +- Create Issue Template Forms (`#2689`_) +- Fix ``camelCase`` Functions in ``ExtBot`` (`#2659`_) +- Fix Empty Captions not Being Passed by ``Bot.copy_message`` (`#2651`_) +- Fix Setting Thumbs When Uploading A Single File (`#2583`_) +- Fix Bug in ``BasePersistence.insert``/``replace_bot`` for Objects with ``__dict__`` not in ``__slots__`` (`#2603`_) + +.. _`#2767`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2767 +.. _`#2689`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2689 +.. _`#2659`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2659 +.. _`#2651`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2651 +.. _`#2583`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2583 +.. _`#2603`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2603 + +Version 13.7 +============ +*Released 2021-07-01* + +This is the technical changelog for version 13.7. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_. + +**Major Changes:** + +- Full support for Bot API 5.3 (`#2572`_) + +**Bug Fixes:** + +- Fix Bug in ``BasePersistence.insert/replace_bot`` for Objects with ``__dict__`` in their slots (`#2561`_) +- Remove Incorrect Warning About ``Defaults`` and ``ExtBot`` (`#2553`_) + +**Minor changes, CI improvements, Doc fixes and Type hinting:** + +- Type Hinting Fixes (`#2552`_) +- Doc Fixes (`#2551`_) +- Improve Deprecation Warning for ``__slots__`` (`#2574`_) +- Stabilize CI (`#2575`_) +- Fix Coverage Configuration (`#2571`_) +- Better Exception-Handling for ``BasePersistence.replace/insert_bot`` (`#2564`_) +- Remove Deprecated ``pass_args`` from Deeplinking Example (`#2550`_) + +.. _`#2572`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2572 +.. _`#2561`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2561 +.. _`#2553`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2553 +.. _`#2552`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2552 +.. _`#2551`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2551 +.. _`#2574`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2574 +.. _`#2575`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2575 +.. _`#2571`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2571 +.. _`#2564`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2564 +.. _`#2550`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2550 + Version 13.6 ============ *Released 2021-06-06* @@ -774,7 +1090,7 @@ Expect minor releases soon (mainly complete Bot API 4.4 support) - Error Handler now handles all types of exceptions (`#1485`_) - Return UTC from from_timestamp() (`#1485`_) -**See the wiki page at https://git.io/fxJuV for a detailed guide on how to migrate from version 11 to version 12.** +**See the wiki page at https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition-guide-to-Version-12.0 for a detailed guide on how to migrate from version 11 to version 12.** Context based callbacks (`#1100`_) ---------------------------------- @@ -979,7 +1295,7 @@ Non Bot API 4.0 changes: .. _`#1172`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1172 .. _`#1179`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1179 .. _`#1184`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1184 -.. _`our telegram passport wiki page`: https://git.io/fAvYd +.. _`our telegram passport wiki page`: https://github.com/python-telegram-bot/python-telegram-bot/wiki/Telegram-Passport Version 10.1.0 ============== @@ -3,7 +3,7 @@ pkgname=('python-telegram-bot-git') epoch=1 -pkgver=13.6.r3.52ce0392 +pkgver=20.0a0.r5.23ed0880 pkgrel=1 pkgdesc="A Python wrapper around the Telegram Bot API" arch=('any') @@ -11,18 +11,24 @@ _provide=${pkgname%-git} url=https://github.com/$_provide/$_provide license=('LGPL3') depends=( - 'python-certifi' - 'python-tornado>=5.1' - 'python-apscheduler>=3.6.3' # requirements.txt forces this to be ==3.6.3 + 'python-httpx>=0.22.0' + 'python-tornado>=6.1' + 'python-apscheduler' # FIXME: requirements.txt: apscheduler~=3.9.1 'python-pytz>=2018.6' - 'python-cachetools>=4.2.2' # requirements.txt forces this to be ==4.2.2 + 'python-cachetools>=5.0.0' ) makedepends=( 'git' 'python-setuptools' ) +checkdepends=( + 'python-cryptography' + 'python-pytest>=7.1.2' + 'python-pytest-asyncio' # FIXME: requirements-dev.txt: pytest-asyncio==0.18.3 + 'python-flaky' +) optdepends=( - 'python-pysocks: SOCKS or HTTP proxy support' + 'python-socksio: SOCKS proxy support' 'python-ujson: Ultra fast JSON parsing' 'python-cryptography: Telegram Passport support' ) @@ -31,29 +37,20 @@ conflicts=($_provide) changelog='CHANGES.rst' source=( $_provide::git+${url}.git - "urllib3::git+https://github.com/python-telegram-bot/urllib3.git#branch=ptb" ) -sha256sums=('SKIP' 'SKIP') +sha256sums=('SKIP') prepare() { - msg2 "Updating dependencies..." cd $srcdir/$_provide - git submodule init - git config submodule.telegram/vendor/urllib3.url $srcdir/urllib3 - git submodule update msg2 "Updating changelog..." cp ./CHANGES.rst ../../ - msg2 "Unpinning python-apscheduler..." - sed -i 's/APScheduler==.*$/APScheduler/' requirements.txt - msg2 "Unpinning python-cachetools..." # just in case - sed -i 's/cachetools==.*$/cachetools/' requirements.txt } pkgver() { cd $srcdir/$_provide - printf "%s.r%s.%s" "$(python -c 'import telegram; print(telegram.__version__)')" \ - "$(git rev-list --count $(git log --oneline | grep Bump | head -n1 | awk '{print $1}')..HEAD)" "$(git rev-parse --short HEAD)" - # printf "%s" "$(git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')" + #printf "%s.r%s.%s" "$(python -c 'import telegram; print(telegram.__version__)')" \ + # "$(git rev-list --count $(git log --oneline | grep Bump | head -n1 | awk '{print $1}')..HEAD)" "$(git rev-parse --short HEAD)" + git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g' } build() { @@ -61,6 +58,19 @@ build() { python setup.py build } +check() { + cd $srcdir/$_provide + # https://github.com/python-telegram-bot/python-telegram-bot/blob/23ed0880d211999e0fb28e8703372129646896b7/.github/workflows/test.yml#L35-L60 + export TEST_NO_PYTZ='true' + export TEST_NO_PASSPORT='true' + export TEST_BUILD='true' + pytest -k test_no_passport.py + export TEST_NO_PASSPORT='false' + pytest -k test_helpers.py + export TEST_NO_PYTZ='false' + pytest +} + package() { cd $srcdir/$_provide python setup.py install --root=$pkgdir --optimize=1 |