Date: Wednesday, February 14, 2018 @ 13:22:02
  Author: dvzrv
Revision: 294302

upgpkg: python-linux-procfs 0.5.1-3

Rebuild for community. Also applying python2 shebang to pflags executable.
Adding bitmasklist_test.py to check().

Modified:
  python-linux-procfs/trunk/PKGBUILD

----------+
 PKGBUILD |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2018-02-14 13:12:35 UTC (rev 294301)
+++ PKGBUILD    2018-02-14 13:22:02 UTC (rev 294302)
@@ -5,7 +5,7 @@
 pkgbase=python-linux-procfs
 pkgname=('python-linux-procfs' 'python2-linux-procfs')
 pkgver=0.5.1
-pkgrel=2
+pkgrel=3
 pkgdesc="Linux /proc abstraction classes for python"
 arch=('any')
 
url="https://git.kernel.org/pub/scm/libs/python/python-linux-procfs/python-linux-procfs.git/";
@@ -15,10 +15,10 @@
 
sha512sums=('eb57fbc17e918cea1234323bf48ea228df00dafb5344dad94cf88c63116058c75c4e8113e203d10eb5005592aad5d55abfc9587d43e18b4ff5ac100833ad3cee')
 
 prepare() {
-  cp -a "${pkgname[0]}-${pkgver}" "${pkgname[1]}-${pkgver}"
+  cp -av "${pkgname[0]}-${pkgver}" "${pkgname[1]}-${pkgver}"
   cd "${pkgname[1]}-${pkgver}"
   # fixing shebang of scripts
-  sed -i '1s/python/python2/' procfs/*.py
+  sed -e '1s/python/python2/' -i procfs/*.py pflags
 }
 
 build() {
@@ -28,6 +28,16 @@
   python2 setup.py build
 }
 
+check() {
+  cd "${pkgname[0]}-${pkgver}"
+  export PYTHONPATH=${srcdir}/${pkgname}-${pkgver}/build:${PYTHONPATH}
+  python bitmasklist_test.py
+
+  cd ../"${pkgname[1]}-${pkgver}"
+  export PYTHONPATH=${srcdir}/${pkgname}-${pkgver}/build:${PYTHONPATH}
+  python2 bitmasklist_test.py
+}
+
 package_python-linux-procfs() {
   depends=('python')
   cd "${pkgname[0]}-${pkgver}"

Reply via email to