[arch-commits] Commit in python-qrcode/trunk (PKGBUILD)
Felix Yan
felixonmars at archlinux.org
Tue Mar 19 05:55:06 UTC 2019
Date: Tuesday, March 19, 2019 @ 05:55:06
Author: felixonmars
Revision: 442537
upgpkg: python-qrcode 6.1-2
remove python2 sibling
Modified:
python-qrcode/trunk/PKGBUILD
----------+
PKGBUILD | 49 ++++++++++---------------------------------------
1 file changed, 10 insertions(+), 39 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-03-19 05:51:27 UTC (rev 442536)
+++ PKGBUILD 2019-03-19 05:55:06 UTC (rev 442537)
@@ -3,58 +3,29 @@
# Contributor Maintainer: Timothy Redaelli <timothy.redaelli at gmail.com>
# Contributor: Francois Boulogne <fboulogne at april dot org>
-pkgbase=python-qrcode
-pkgname=(python-qrcode python2-qrcode)
+pkgname=python-qrcode
pkgver=6.1
-pkgrel=1
+pkgrel=2
pkgdesc='Python library to generate QR codes'
url='https://github.com/lincolnloop/python-qrcode'
arch=('any')
license=('custom')
-makedepends=('python-pillow' 'python2-pillow' 'python-six' 'python2-six' 'python-setuptools' 'python2-setuptools')
-checkdepends=('python2-mock')
-source=(https://github.com/lincolnloop/python-qrcode/archive/v${pkgver}/${pkgbase}-v${pkgver}.tar.gz)
+depends=('python-pillow' 'python-six' 'python-setuptools')
+source=(https://github.com/lincolnloop/python-qrcode/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
sha512sums=('3af3b67959be8dd30b372145ff7b8aa1e20153c403b17c688d5a7189e3b25da872c6eee916e6d47e4f6545c87c0c0eb9af52e115353a0e8c0f73e4948ddc6829')
-prepare() {
- cp -a ${pkgbase}-${pkgver}{,-py2}
- find "${pkgbase}-${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 {} +
-}
-
build() {
- cd "${srcdir}"/${pkgbase}-${pkgver}
+ cd $pkgname-$pkgver
python setup.py build
-
- cd "${srcdir}"/${pkgbase}-${pkgver}-py2
- python2 setup.py build
}
check() {
- cd "${srcdir}"/${pkgbase}-${pkgver}
+ cd $pkgname-$pkgver
python -m unittest discover qrcode
-
- cd "${srcdir}"/${pkgbase}-${pkgver}-py2
- python2 -m unittest discover qrcode
}
-package_python-qrcode() {
- depends=('python-pillow' 'python-six' 'python-setuptools')
-
- cd ${pkgbase}-${pkgver}
- python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
- install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
+package() {
+ cd $pkgname-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
-
-package_python2-qrcode() {
- depends=('python2-pillow' 'python2-six' 'python2-setuptools')
-
- cd ${pkgbase}-${pkgver}-py2
- python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
- install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
-
- rm -r "${pkgdir}"/usr/bin
- rm -r "${pkgdir}"/usr/share/man
-}
-
-# vim:ts=2:sw=2:et:
More information about the arch-commits
mailing list