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

Eli Schwartz eschwartz at archlinux.org
Mon Nov 25 16:35:04 UTC 2019


    Date: Monday, November 25, 2019 @ 16:35:04
  Author: eschwartz
Revision: 533242

upgpkg: python-pychm 0.8.5-1: upstream release adds python 3 support

A pkgbase rename means let's move this from one svn directory to another...
Upstream just added unittests, so let's use that too.

Added:
  python-pychm/
Modified:
  python-pychm/trunk/PKGBUILD
Deleted:
  python2-pychm/

----------+
 PKGBUILD |   49 +++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 39 insertions(+), 10 deletions(-)

Modified: python-pychm/trunk/PKGBUILD
===================================================================
--- python2-pychm/trunk/PKGBUILD	2019-11-25 16:31:12 UTC (rev 533241)
+++ python-pychm/trunk/PKGBUILD	2019-11-25 16:35:04 UTC (rev 533242)
@@ -1,25 +1,54 @@
-# Maintainer: Alexander Rødseth <rodseth at gmail.com>
+# Maintainer: Jelle van der Waa <jelle at vdwaa.nl>
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+# Contributor: Alexander Rødseth <rodseth at gmail.com>
 # Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
 # Contributor: Roman Kyrylych <Roman.Kyrylych at gmail.com>
 # Contributor: iom <pizorn at gmail.com>
 
-pkgname=python2-pychm
-pkgver=0.8.4.1
-pkgrel=2
+pkgbase=python-pychm
+pkgname=(python-pychm python2-pychm)
+pkgver=0.8.5
+pkgrel=1
 pkgdesc="Python bindings for chmlib"
 arch=('x86_64')
 url="https://github.com/dottedmag/pychm"
 license=('GPL')
-depends=('chmlib' 'python2')
-makedepends=('python2-setuptools')
-replaces=('python-pychm=0.8.4')
+depends=('chmlib')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest' 'python2-pytest')
 source=($pkgname-$pkgver.tar.gz::https://github.com/dottedmag/pychm/archive/v$pkgver.tar.gz)
-md5sums=('730c484583c14350e55dba1aa1b03360')
+sh256sums=('730c484583c14350e55dba1aa1b03360')
+b2sums=('4671ccca56153ee493f239de46a01c9e878448f46ecb7e1a39156457562d7f7ac951007e04bd534ea26455da68607eab9b2e2266eed71a7b14c90f103888887e')
 
-package() {
+build() {
   cd "$srcdir/pychm-$pkgver"
 
-  python2 setup.py install --root="$pkgdir"
+  python setup.py build
+  python2 setup.py build
 }
 
+check() {
+  cd "$srcdir/pychm-$pkgver"
+
+  # do glob expansion in variable assignment
+  pythonpaths=("$PWD/build/lib.linux-$CARCH"-3* "$PWD/build/lib.linux-$CARCH-"2*)
+
+  PYTHONPATH="${pythonpaths[0]}" pytest
+  PYTHONPATH="${pythonpaths[1]}" pytest2
+}
+
+package_python-pychm() {
+  depends+=('python')
+
+  cd "$srcdir/pychm-$pkgver"
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+}
+
+package_python2-pychm() {
+  depends+=('python2')
+
+  cd "$srcdir/pychm-$pkgver"
+  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
+}
+
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list