[arch-commits] Commit in python-qrcode/repos (2 files)

Felix Yan felixonmars at archlinux.org
Wed Apr 25 06:12:10 UTC 2018


    Date: Wednesday, April 25, 2018 @ 06:12:09
  Author: felixonmars
Revision: 317718

archrelease: copy trunk to community-testing-any

Added:
  python-qrcode/repos/community-testing-any/
  python-qrcode/repos/community-testing-any/PKGBUILD
    (from rev 317717, python-qrcode/trunk/PKGBUILD)

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

Copied: python-qrcode/repos/community-testing-any/PKGBUILD (from rev 317717, python-qrcode/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2018-04-25 06:12:09 UTC (rev 317718)
@@ -0,0 +1,58 @@
+# $Id$
+# Maintainer: Timothy Redaelli <timothy.redaelli at gmail.com>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Francois Boulogne <fboulogne at april dot org>
+
+pkgbase=python-qrcode
+pkgname=(python-qrcode python2-qrcode)
+pkgver=6.0
+pkgrel=1
+pkgdesc="Python library to generate QR codes"
+arch=('any')
+url="https://github.com/lincolnloop/python-qrcode"
+license=('custom')
+makedepends=('python-pillow' 'python2-pillow' 'python-six' 'python2-six' 'python-setuptools' 'python2-setuptools')
+checkdepends=('python2-mock')
+source=(https://pypi.io/packages/source/q/qrcode/qrcode-${pkgver}.tar.gz
+        https://github.com/lincolnloop/python-qrcode/commit/35056062270a3d5084b1217df611d09cd94c5ca3.patch)
+sha512sums=('c43f12fe6b12d244d19a994cfd20adbe3776bbda1459c9dbc6164b1c9e7637f05e2acc1c2d29b82243024a4ea9b46c319a56acdf6d05e7b697bcd2c31c02102e'
+            '320ec020268d8ede2f80ba622cd593b2ba9758f1d264fdb546dac126a841d454d02d12ae57edc6601bfd19062953bce9189b59184ce653d43c002e7664f87018')
+
+prepare() {
+  (cd qrcode-$pkgver; patch -p1 -i ../35056062270a3d5084b1217df611d09cd94c5ca3.patch)
+  cp -a qrcode-$pkgver{,-py2}
+
+  find "qrcode-$pkgver-py2" -type f -exec sed -e 's#/usr/bin/python#/usr/bin/python2#g' \
+                                              -e 's#/usr/bin/env python#/usr/bin/env python2#g' -i {} +
+}
+
+check() {
+  cd "$srcdir"/qrcode-$pkgver
+  python -m unittest discover qrcode
+
+  cd "$srcdir"/qrcode-$pkgver-py2
+  python2 -m unittest discover qrcode
+}
+
+package_python-qrcode() {
+  depends=('python-pillow' 'python-six' 'python-setuptools')
+
+  cd "qrcode-$pkgver"
+  python setup.py install --root="${pkgdir}" --optimize=1
+
+  install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_python2-qrcode() {
+  depends=('python2-pillow' 'python2-six' 'python2-setuptools')
+
+  cd "qrcode-$pkgver-py2"
+  python2 setup.py install --root="${pkgdir}" --optimize=1
+
+  install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+  mv "$pkgdir"/usr/bin/qr{,2}
+  mv "$pkgdir"/usr/share/man/man1/qr{,2}.1
+}
+
+# vim:ts=2:sw=2:et:



More information about the arch-commits mailing list