[arch-commits] Commit in python-psutil/repos/community-x86_64 (3 files)

Jelle van der Waa jelle at archlinux.org
Sun Nov 18 19:29:17 UTC 2018


    Date: Sunday, November 18, 2018 @ 19:29:17
  Author: jelle
Revision: 408734

archrelease: copy trunk to community-x86_64

Added:
  python-psutil/repos/community-x86_64/PKGBUILD
    (from rev 408733, python-psutil/trunk/PKGBUILD)
  python-psutil/repos/community-x86_64/fix_test_disk_io_counters_sysfs.patch
    (from rev 408733, python-psutil/trunk/fix_test_disk_io_counters_sysfs.patch)
Deleted:
  python-psutil/repos/community-x86_64/PKGBUILD

---------------------------------------+
 PKGBUILD                              |  128 ++++++++++++++++----------------
 fix_test_disk_io_counters_sysfs.patch |   20 +++++
 2 files changed, 86 insertions(+), 62 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2018-11-18 19:28:34 UTC (rev 408733)
+++ PKGBUILD	2018-11-18 19:29:17 UTC (rev 408734)
@@ -1,62 +0,0 @@
-# $Id$
-# Maintainer: Sébastien Luttringer
-
-pkgbase=python-psutil
-pkgname=('python-psutil' 'python2-psutil')
-pkgver=5.4.7
-pkgrel=1
-arch=('x86_64')
-url='https://github.com/giampaolo/psutil'
-license=('custom: BSD')
-makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools')
-checkdepends=('net-tools' 'procps-ng' 'python2-nose' 'python-nose')
-source=("https://github.com/giampaolo/psutil/archive/release-$pkgver.tar.gz")
-md5sums=('e8d6259eafe5925e7c522868aedd2caa')
-
-build() {
-  cd psutil-release-$pkgver
-
-  msg python
-  python setup.py build --build-lib=build/python
-
-  msg python2
-  python2 setup.py build --build-lib=build/python2
-  find build/python2 -type f -exec \
-    sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
-}
-
-check() {
-  cd psutil-release-$pkgver
-
-  msg python
-  export PYTHONPATH="$PWD/build/python"
-  cd psutil/tests/
-  # FIXME: dynamic loading so
-
-
-  msg python2
-  export PYTHONPATH="$PWD/build/python2"
-  #python2 psutil/tests/runner.py
-}
-
-package_python-psutil() {
-  pkgdesc='A cross-platform process and system utilities module for Python'
-  depends=('python')
-
-  cd psutil-release-$pkgver
-  python setup.py build --build-lib=build/python \
-                  install --root="$pkgdir" --optimize=1
-  install -D -m 644 LICENSE "$pkgdir/"usr/share/licenses/$pkgname/LICENSE
-}
-
-package_python2-psutil() {
-  pkgdesc='A cross-platform process and system utilities module for Python2'
-  depends=('python2')
-
-  cd psutil-release-$pkgver
-  python2 setup.py build --build-lib=build/python2 \
-                   install --root="$pkgdir" --optimize=1
-  install -D -m 644 LICENSE "$pkgdir/"usr/share/licenses/$pkgname/LICENSE
-}
-
-# vim:set ts=2 sw=2 et:

Copied: python-psutil/repos/community-x86_64/PKGBUILD (from rev 408733, python-psutil/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2018-11-18 19:29:17 UTC (rev 408734)
@@ -0,0 +1,66 @@
+# Maintainer: Sébastien Luttringer
+
+pkgbase=python-psutil
+pkgname=('python-psutil' 'python2-psutil')
+pkgver=5.4.8
+pkgrel=1
+arch=('x86_64')
+url='https://github.com/giampaolo/psutil'
+license=('custom: BSD')
+makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools')
+checkdepends=('net-tools' 'procps-ng' 'python2-ipaddress' 'python2-mock' 'python-mock' 'python-pytest')
+source=("https://github.com/giampaolo/psutil/archive/release-$pkgver.tar.gz"
+        "fix_disk_io_counters.patch::https://github.com/giampaolo/psutil/commit/8f99f3782663959062ee868bbfdbc336307a3a4d.patch"
+        "fix_test_disk_io_counters_sysfs.patch")
+sha512sums=('66990d006680142c309874624882ba7612cdef99f44cfed07ba5371ba20e1c978e42364248dba09fce053d78a62630061d1995662f9b965492ea2261eda83ea8'
+            '5b6318f0a74360c048ef910109c9ed2738ad9755d2a3061d341f3c3cb7256d1eedbac2a452d453415e4155720ca51a9abb471a638583d30b7d648483af21b890'
+            'f2164b0c31a2f0cc9db0913451ded71c8fc401ac88ebb5cabc00b2902e37c2695b273c75799ca2a060c11555e5b05a2f6aac4c214ec7e000c7b79d90a2e7e07e')
+
+prepare() {
+  cd psutil-release-$pkgver
+  patch -Np1 -i $srcdir/fix_disk_io_counters.patch
+  patch -Np1 -i $srcdir/fix_test_disk_io_counters_sysfs.patch
+}
+
+build() {
+  cd psutil-release-$pkgver
+
+  python setup.py build --build-lib=build/python
+
+  python2 setup.py build --build-lib=build/python2
+  find build/python2 -type f -exec \
+    sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
+}
+
+check() {
+  cd psutil-release-$pkgver
+
+  # Required for testing
+  cp setup.py build/python
+  cp -r scripts build/python/
+
+# 4 non-working tests in build chroot, requires fixes. Test framework does not allow exclusion.
+#  PYTHONPATH="$PWD/build/python" python psutil/tests/__main__.py
+}
+
+package_python-psutil() {
+  pkgdesc='A cross-platform process and system utilities module for Python'
+  depends=('python')
+
+  cd psutil-release-$pkgver
+  python setup.py build --build-lib=build/python \
+                  install --root="$pkgdir" --optimize=1
+  install -D -m 644 LICENSE "$pkgdir/"usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-psutil() {
+  pkgdesc='A cross-platform process and system utilities module for Python2'
+  depends=('python2')
+
+  cd psutil-release-$pkgver
+  python2 setup.py build --build-lib=build/python2 \
+                   install --root="$pkgdir" --optimize=1
+  install -D -m 644 LICENSE "$pkgdir/"usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:

Copied: python-psutil/repos/community-x86_64/fix_test_disk_io_counters_sysfs.patch (from rev 408733, python-psutil/trunk/fix_test_disk_io_counters_sysfs.patch)
===================================================================
--- fix_test_disk_io_counters_sysfs.patch	                        (rev 0)
+++ fix_test_disk_io_counters_sysfs.patch	2018-11-18 19:29:17 UTC (rev 408734)
@@ -0,0 +1,20 @@
+diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py
+index b775d39a..dcacfea0 100644
+--- a/psutil/_pslinux.py
++++ b/psutil/_pslinux.py
+@@ -1099,8 +1099,13 @@ def disk_io_counters(perdisk=False):
+                 with open_text(os.path.join(root, 'stat')) as f:
+                     fields = f.read().strip().split()
+                 name = os.path.basename(root)
+-                (reads, reads_merged, rbytes, rtime, writes, writes_merged,
+-                    wbytes, wtime, _, busy_time, _) = map(int, fields)
++                if len(fields) == 11:
++                    (reads, reads_merged, rbytes, rtime, writes, writes_merged,
++                     wbytes, wtime, _, busy_time, _) = map(int, fields)
++                else:
++                    (reads, reads_merged, rbytes, rtime, writes, writes_merged,
++                     wbytes, wtime, _, busy_time, _, _, _, _, _) = map(int,
++                                                                       fields)
+                 yield (name, reads, writes, rbytes, wbytes, rtime,
+                        wtime, reads_merged, writes_merged, busy_time)
+ 



More information about the arch-commits mailing list