[arch-commits] Commit in python-qrcode/trunk (PKGBUILD)

Caleb Maclennan alerque at gemini.archlinux.org
Sat Aug 28 10:05:37 UTC 2021


    Date: Saturday, August 28, 2021 @ 10:05:36
  Author: alerque
Revision: 1007667

upgpkg: python-qrcode 7.3-5; patch out setuptools use at runtime, restore pillow

Setuptools was being used at runtime only to inject the version which is easy
enough to replace.

Dependency on pillow is technically optional, but if not available some
functionality will expect to find unlisted dependency pymaging instead;
see upstream issue: https://github.com/lincolnloop/python-qrcode/issues/223

Modified:
  python-qrcode/trunk/PKGBUILD

----------+
 PKGBUILD |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-08-28 10:01:39 UTC (rev 1007666)
+++ PKGBUILD	2021-08-28 10:05:36 UTC (rev 1007667)
@@ -4,19 +4,31 @@
 # Contributor Maintainer: Timothy Redaelli <timothy.redaelli at gmail.com>
 # Contributor: Francois Boulogne <fboulogne at april dot org>
 
+# Dependency on pillow is technically optional, but if not available some
+# functionality will expect to find unlisted dependency pymaging instead;
+# see upstream issue: https://github.com/lincolnloop/python-qrcode/issues/223
+
 pkgname=python-qrcode
 pkgver=7.3
-pkgrel=3
+pkgrel=5
 pkgdesc='Python library to generate QR codes'
 arch=('any')
 url='https://github.com/lincolnloop/python-qrcode'
 license=('BSD')
-depends=('python' 'python-setuptools')
-optdepends=('python-pillow: generate images')
-checkdepends=('python-pillow' 'python-pytest')
+depends=('python' 'python-pillow')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest')
 source=($url/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
 sha512sums=('1d24dd7d3c9e0cd909a780b2639d2db54e0db6bc98100b6446cb290aa78ed1b9ed6d14c4cdd8a8ddcbe7a0ae6be8724c5b26118d25985450a974d78a520b3b0e')
 
+prepare() {
+  cd $pkgname-$pkgver
+  sed -i \
+    -e '/pkg_resources/d' \
+    -e "/version =/s/get_distribution('qrcode').version/'$pkgver'/" \
+    qrcode/console_scripts.py
+}
+
 build() {
   cd $pkgname-$pkgver
   python setup.py build



More information about the arch-commits mailing list