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

David Runge dvzrv at archlinux.org
Sat Sep 8 12:48:50 UTC 2018


    Date: Saturday, September 8, 2018 @ 12:48:49
  Author: dvzrv
Revision: 378810

upgpkg: python-piexif 1.0.13-3

Adding python2 version of package.

Modified:
  python-piexif/trunk/PKGBUILD

----------+
 PKGBUILD |   35 +++++++++++++++++++++++++----------
 1 file changed, 25 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-08 12:32:58 UTC (rev 378809)
+++ PKGBUILD	2018-09-08 12:48:49 UTC (rev 378810)
@@ -1,35 +1,38 @@
 # Maintainer: David Runge <dave at sleepmap.de>
 _name=piexif
-pkgname=python-piexif
+pkgbase=python-piexif
+pkgname=('python-piexif' 'python2-piexif')
 pkgver=1.0.13
-pkgrel=2
+pkgrel=3
 pkgdesc="To simplify exif manipulations with python. Writing, reading, and more"
 arch=('any')
 url="https://github.com/hMatoba/Piexif"
 license=('MIT')
-depends=('python')
-makedepends=('python-setuptools')
-checkdepends=('python-pytest' 'python-pillow' 'python-sphinx')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest' 'python-pillow' 'python-sphinx' 'python2-pytest' 'python2-pillow' 'python2-sphinx')
 source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.zip")
 sha512sums=('4234783a639e777b58eb0b4591a272d7d5e8c116a7a242cf36287e64d15089478c88327a16b4fa75786fc3621a6bf647f6a075fab0708e2d0aed6395f95b92cb')
 
 prepare() {
-  mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
+  mv -v "${_name}-$pkgver" "$pkgbase-$pkgver"
 }
 
 build() {
-  cd "$pkgname-$pkgver"
+  cd "$pkgbase-$pkgver"
   python setup.py build
+  python2 setup.py build
 }
 
 check() {
-  cd "$pkgname-$pkgver"
+  cd "$pkgbase-$pkgver"
   export PYTHONPATH=build:${PYTHONPATH}
   py.test
+  py.test2
 }
 
-package() {
-  cd "$pkgname-$pkgver"
+package_python-piexif() {
+  cd "$pkgbase-$pkgver"
+  depends=('python')
   python setup.py install --skip-build \
     --optimize=1 \
     --prefix=/usr \
@@ -38,3 +41,15 @@
     "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
   install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
 }
+
+package_python2-piexif() {
+  cd "$pkgbase-$pkgver"
+  depends=('python2')
+  python2 setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}"
+  install -vDm 644 LICENSE.txt \
+    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+}



More information about the arch-commits mailing list