[arch-commits] Commit in python-qrcode/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Sun Dec 25 17:16:18 UTC 2016
Date: Sunday, December 25, 2016 @ 17:16:18
Author: foutrelis
Revision: 202063
archrelease: copy trunk to community-staging-any
Added:
python-qrcode/repos/community-staging-any/
python-qrcode/repos/community-staging-any/PKGBUILD
(from rev 202062, python-qrcode/trunk/PKGBUILD)
----------+
PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
Copied: python-qrcode/repos/community-staging-any/PKGBUILD (from rev 202062, python-qrcode/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2016-12-25 17:16:18 UTC (rev 202063)
@@ -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=3
+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