Date: Friday, April 29, 2016 @ 20:33:53
  Author: jlichtblau
Revision: 172797

upgpkg: python-html2text 2016.4.2-1 - new upstream release
- python2 version added as split package

Modified:
  python-html2text/trunk/PKGBUILD

----------+
 PKGBUILD |   36 +++++++++++++++++++++++++++++-------
 1 file changed, 29 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2016-04-29 18:30:33 UTC (rev 172796)
+++ PKGBUILD    2016-04-29 18:33:53 UTC (rev 172797)
@@ -2,31 +2,53 @@
 # Maintainer: Jaroslav Lichtblau <svetlemo...@archlinux.org>
 # Contributor: Giovanni Scafora <giova...@archlinux.org>
 # Contributor: Daniel J Griffiths <ghost1...@archlinux.us>
+# Contributor: Felix Yan <felixonmars@archlinux>
 
-pkgname=python-html2text
-pkgver=2015.11.4
+pkgbase=python-html2text
+pkgname=('python-html2text' 'python2-html2text')
+pkgver=2016.4.2
 pkgrel=1
 pkgdesc="A HTML to markdown-structured text converter"
 arch=('any')
 url="https://pypi.python.org/pypi/html2text/";
 license=('GPL3')
-depends=('python-setuptools')
+makedepends=('python-setuptools' 'python2-setuptools')
 provides=('html2text')
 replaces=('html2text')
 
source=(https://pypi.python.org/packages/source/h/html2text/html2text-$pkgver.tar.gz)
-sha256sums=('44531c00fd125d0d987adf4e5ab6b4a8a2b44bfa5c4dc8896f50aa0e35c33708')
+sha256sums=('32e5e49eb520335bae200a00e3cc981f1ade558930068e1bb2a6e3fb1504f951')
 
+prepare() {
+  cp -a html2text-$pkgver{,-py2}
+}
+
 build() {
   cd "${srcdir}"/html2text-$pkgver
   python setup.py build
+  
+  cd "${srcdir}"/html2text-$pkgver-py2
+  python2 setup.py build
 }
 
 check() {
   cd "${srcdir}"/html2text-$pkgver
-#  PYTHONPATH=$PYTHONPATH:. python setup.py test --verbose
+  PYTHONPATH=$PYTHONPATH:. python setup.py test --verbose
+
+  cd "${srcdir}"/html2text-$pkgver-py2
+  PYTHONPATH=$PYTHONPATH:. python2 setup.py test --verbose
 }
 
-package() {
-  cd "${srcdir}"/html2text-${pkgver}
+package_python-html2text() {
+  depends=('python-setuptools')
+
+  cd "${srcdir}"/html2text-$pkgver
   python setup.py install --root="${pkgdir}"
 }
+
+package_python2-html2text() {
+  depends=('python2-setuptools')
+
+  cd "${srcdir}"/html2text-$pkgver-py2
+  python setup.py install --root="${pkgdir}"
+  mv "$pkgdir/usr/bin/html2text"{,2}
+}

Reply via email to