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

Felix Yan felixonmars at archlinux.org
Sat Jul 23 06:38:03 UTC 2016


    Date: Saturday, July 23, 2016 @ 06:38:03
  Author: felixonmars
Revision: 272136

upgpkg: python-wstools 0.4.4-1

Modified:
  python-wstools/trunk/PKGBUILD

----------+
 PKGBUILD |   54 ++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 40 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-07-23 05:20:16 UTC (rev 272135)
+++ PKGBUILD	2016-07-23 06:38:03 UTC (rev 272136)
@@ -1,35 +1,61 @@
 # $Id$
-# Maintainer: Felix Yan <felixonmars at gmail.com>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
 
 pkgbase=python-wstools
-pkgname=python2-wstools
-pkgver=0.4.3
+pkgname=('python-wstools' 'python2-wstools')
+pkgver=0.4.4
+_commit=f74298a5b0527382e6482d2354150813e976f12d
 pkgrel=1
 pkgdesc="WSDL parsing services package for Web Services for Python"
 arch=('any')
 url="https://github.com/pycontribs/wstools"
 license=('custom')
-makedepends=('python2-setuptools')
-depends=('python2')
-source=("https://pypi.python.org/packages/source/w/wstools/wstools-${pkgver}.tar.gz")
-md5sums=('82f800f83195519ab6f01304456dadd9')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-docutils' 'python2-docutils' 'git')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'autopep8' 'python2-autopep8')
+source=("git+https://github.com/pycontribs/wstools.git#commit=$_commit")
+md5sums=('SKIP')
 
 prepare() {
-  cd wstools-$pkgver
+  # pytest-pep8 doesn't work at the moment due to the upstream renaming from pep8 to pycodestyle
+  sed -i 's/--pep8//' wstools/setup.cfg
+  cp -a wstools{,-py2}
   sed -e 's|#! /usr/bin/env python$|#!/usr/bin/env python2|' \
       -e 's|#!/usr/bin/env python$|#!/usr/bin/env python2|' \
-      -i src/wstools/{c14n.py,Namespaces.py,XMLSchema.py,Utility.py,logging.py,__init__.py,tests/*}
+      -i wstools-py2/wstools/{c14n.py,Namespaces.py,XMLSchema.py,Utility.py,__init__.py}
 }
 
 build() {
-  cd wstools-${pkgver}
+  cd "$srcdir"/wstools
+  python setup.py build
+
+  cd "$srcdir"/wstools-py2
   python2 setup.py build
 }
 
+check() {
+  cd "$srcdir"/wstools
+  python setup.py test
+
+  cd "$srcdir"/wstools-py2
+  python2 setup.py test
+}
+
+package_python-wstools() {
+  depends=('python-six' 'python-docutils')
+
+  cd wstools
+  python setup.py install --root="$pkgdir" --optimize=1
+
+  install -d "$pkgdir/usr/share/licenses/$pkgname"
+  install -Dm644 docs/* "$pkgdir/usr/share/licenses/$pkgname"/
+}
+
 package_python2-wstools() {
-  cd wstools-${pkgver}
-  python2 setup.py install --root="${pkgdir}" --optimize=1
+  depends=('python2-six' 'python2-docutils')
 
-  install -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -Dm644 docs/* "${pkgdir}/usr/share/licenses/${pkgname}"/
+  cd wstools-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+
+  install -d "$pkgdir/usr/share/licenses/$pkgname"
+  install -Dm644 docs/* "$pkgdir/usr/share/licenses/$pkgname"/
 }



More information about the arch-commits mailing list