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

Felix Yan felixonmars at archlinux.org
Thu Nov 17 10:29:24 UTC 2016


    Date: Thursday, November 17, 2016 @ 10:29:24
  Author: felixonmars
Revision: 196231

archrelease: copy trunk to community-testing-any

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

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

Copied: python-qrcode/repos/community-testing-any/PKGBUILD (from rev 196230, python-qrcode/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2016-11-17 10:29:24 UTC (rev 196231)
@@ -0,0 +1,55 @@
+# $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=5.3
+pkgrel=2
+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)
+md5sums=('af41b650a3675d0a0366f842de9786b9')
+
+prepare() {
+  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