[arch-commits] Commit in python-click-threading/trunk (2 files)

David Runge dvzrv at archlinux.org
Mon May 31 16:37:51 UTC 2021


    Date: Monday, May 31, 2021 @ 16:37:51
  Author: dvzrv
Revision: 952811

upgpkg: python-click-threading 0.5.0-1: Upgrade to 0.5.0.

Remove fix for python-click > 8.0.
Minor cleanup.
Update maintainer info.

Modified:
  python-click-threading/trunk/PKGBUILD
Deleted:
  python-click-threading/trunk/fix-click-8.0-compat.patch

----------------------------+
 PKGBUILD                   |   28 ++++++++++------------------
 fix-click-8.0-compat.patch |   42 ------------------------------------------
 2 files changed, 10 insertions(+), 60 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-31 14:53:15 UTC (rev 952810)
+++ PKGBUILD	2021-05-31 16:37:51 UTC (rev 952811)
@@ -1,28 +1,21 @@
-# Maintainer: David Runge <dave at sleepmap.de>
+# Maintainer: David Runge <dvzrv at archlinux.org>
 # Contributor: eolianoe <eolianoe At GoogleMAIL DoT com>
 
 _name=click-threading
 pkgname=python-click-threading
-pkgver=0.4.4
-pkgrel=10
+pkgver=0.5.0
+pkgrel=1
 pkgdesc="Multithreaded Click apps made easy"
 arch=("any")
 url="https://pypi.python.org/pypi/click-threading"
 license=("MIT")
-depends=("python-click")
-makedepends=("python-setuptools")
-checkdepends=("python-pytest" "python-click")
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
-        fix-click-8.0-compat.patch)
-#source=("${_name}-${pkgver}.tar.gz::https://github.com/click-contrib/${_name}/archive/${pkgver}.tar.gz")
-sha512sums=('7fd17ad04065160a3278eab4e2c070424d9d69de145e88a8dc2ad9a3064162d91ad5c46b8d30e19640b2c4b420c0bb801ff6fd6dd9985f34ce2ede35cf8373f1'
-            '712726854065215ebaddd62e589ec64b5b056a090bcd8fc2bc5e2c784831f48d205b700e04662d653f87306faa02972f9c7d5b55958c552156346b180c99b1f7')
+depends=('python-click')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'python-click')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+sha512sums=('0f3cfe6951488dfa9cb5b6a9356bef99cadc56556640e76f68deb7ca2748f578a8ad77fa063e3ca116b17546199a1b3c7982c58a5a6a7b028704692ce1f9e93f')
+b2sums=('a3aa978ad2691c7f4c65e548865d102a6fcaacdd18c966e9695c7c7ff1e8d7dc292860d572879cbbd5b4bd04e65e8b86f02539b2e578505a38216089742d7819')
 
-prepare() {
-  cd "${_name}-${pkgver}"
-  patch -Np1 < ../fix-click-8.0-compat.patch
-}
-
 build() {
   cd "${_name}-${pkgver}"
   python setup.py build
@@ -31,7 +24,7 @@
 check() {
   cd "${_name}-${pkgver}"
   export PYTHONPATH=build/lib:${PYTHONPATH}
-  py.test
+  pytest -v
 }
 
 package() {
@@ -38,7 +31,6 @@
   cd "${_name}-${pkgver}"
   python setup.py install --skip-build \
     --optimize=1 \
-    --prefix=/usr \
     --root="${pkgdir}"
   install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
   install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}/"

Deleted: fix-click-8.0-compat.patch
===================================================================
--- fix-click-8.0-compat.patch	2021-05-31 14:53:15 UTC (rev 952810)
+++ fix-click-8.0-compat.patch	2021-05-31 16:37:51 UTC (rev 952811)
@@ -1,42 +0,0 @@
-From 7194508dfedb1a29709927de6e8d9f8480a0017a Mon Sep 17 00:00:00 2001
-From: Jim Turner <git at turner.link>
-Date: Wed, 12 May 2021 19:07:41 -0400
-Subject: [PATCH] Fix monkey-patching of functions with annotations
-
-click 8.0.0 [added type annotations][1] which broke click-threading's
-monkey patching of these functions. This commit is a small change to
-fix the issue. Note that this commit uses the `inspect.Signature`
-type, which was added in Python 3.3.
-
-[1]: https://github.com/pallets/click/commit/0103c9570650daa59560baf42ad0a27e57b3157f
----
- click_threading/monkey.py | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/click_threading/monkey.py b/click_threading/monkey.py
-index 1c16cd6..20361ff 100644
---- a/click_threading/monkey.py
-+++ b/click_threading/monkey.py
-@@ -40,12 +40,16 @@ def patch_ui_functions(wrapper):
- 
-         new_f = wrapper(_copy_fn(f), info)
- 
--        argspec = getargspec(f)
--        signature = inspect.formatargspec(*argspec) \
--            .lstrip('(') \
--            .rstrip(')')
--        args = ', '.join(arg.split('=')[0].split(':')[0].strip()
--                         for arg in signature.split(','))
-+        orig_sig_obj = inspect.signature(f)
-+        sig_obj = orig_sig_obj.replace(
-+            parameters=[
-+                p.replace(annotation=inspect.Parameter.empty)
-+                for p in orig_sig_obj.parameters.values()
-+            ],
-+            return_annotation=inspect.Signature.empty,
-+        )
-+        signature = str(sig_obj).lstrip('(').rstrip(')')
-+        args = ', '.join(p for p in sig_obj.parameters.keys())
- 
-         stub_f = eval('lambda {s}: {n}._real_click_fn({a})'
-                       .format(n=f.__name__, s=signature, a=args))



More information about the arch-commits mailing list