pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/py-psutil Fixed building on Darwin; fixed run...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c95020aa8636
branches:  trunk
changeset: 645184:c95020aa8636
user:      adam <adam%pkgsrc.org@localhost>
date:      Sat Jan 24 23:01:29 2015 +0000

description:
Fixed building on Darwin; fixed running on NetBSD; fixed PLIST

diffstat:

 sysutils/py-psutil/Makefile                                |   5 ++-
 sysutils/py-psutil/PLIST                                   |   4 +-
 sysutils/py-psutil/distinfo                                |   6 ++--
 sysutils/py-psutil/patches/patch-psutil___psnetbsd.py      |  19 ++++++-------
 sysutils/py-psutil/patches/patch-psutil___psutil__netbsd.c |   4 +-
 5 files changed, 19 insertions(+), 19 deletions(-)

diffs (139 lines):

diff -r a98040f656b8 -r c95020aa8636 sysutils/py-psutil/Makefile
--- a/sysutils/py-psutil/Makefile       Sat Jan 24 20:42:22 2015 +0000
+++ b/sysutils/py-psutil/Makefile       Sat Jan 24 23:01:29 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2014/10/05 14:54:37 wiz Exp $
+# $NetBSD: Makefile,v 1.10 2015/01/24 23:01:29 adam Exp $
 
 DISTNAME=      psutil-2.1.3
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
@@ -11,13 +11,14 @@
 LICENSE=       modified-bsd
 
 REPLACE_PYTHON=        psutil/*py
-PYTHON_VERSIONS_INCOMPATIBLE=  33 34 # not yet ported as of 2.1.0
 
 .include "../../mk/bsd.prefs.mk"
 
 # facilitate PLIST processing
 .if ${OPSYS} == "SunOS"
 LOWER_OPSYS=   ${OPSYS:tl}
+.elif ${OPSYS} == "Darwin"
+LOWER_OPSYS=   osx
 .endif
 
 .include "../../lang/python/application.mk"
diff -r a98040f656b8 -r c95020aa8636 sysutils/py-psutil/PLIST
--- a/sysutils/py-psutil/PLIST  Sat Jan 24 20:42:22 2015 +0000
+++ b/sysutils/py-psutil/PLIST  Sat Jan 24 23:01:29 2015 +0000
@@ -1,5 +1,5 @@
-@comment $NetBSD: PLIST,v 1.3 2014/04/18 19:58:46 wiz Exp $
-${PYSITELIB}/_psutil_netbsd.so
+@comment $NetBSD: PLIST,v 1.4 2015/01/24 23:01:29 adam Exp $
+${PYSITELIB}/_psutil_${LOWER_OPSYS}.so
 ${PYSITELIB}/_psutil_posix.so
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
diff -r a98040f656b8 -r c95020aa8636 sysutils/py-psutil/distinfo
--- a/sysutils/py-psutil/distinfo       Sat Jan 24 20:42:22 2015 +0000
+++ b/sysutils/py-psutil/distinfo       Sat Jan 24 23:01:29 2015 +0000
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.7 2014/10/05 14:54:37 wiz Exp $
+$NetBSD: distinfo,v 1.8 2015/01/24 23:01:29 adam Exp $
 
 SHA1 (psutil-2.1.3.tar.gz) = aae4725eb33cf56d4480bc60f50c147870d607ba
 RMD160 (psutil-2.1.3.tar.gz) = 4d5d0971c7acbd81cd883eceb237b688a60d3b80
 Size (psutil-2.1.3.tar.gz) = 224008 bytes
 SHA1 (patch-psutil_____init____.py) = 4036989d048542eb2b5649c6398146369d2793a5
-SHA1 (patch-psutil___psnetbsd.py) = 20089b57640a5eb30aeb1f5460624a570f1d3236
-SHA1 (patch-psutil___psutil__netbsd.c) = c251e097ce5c919537176f16406ad6892db955fc
+SHA1 (patch-psutil___psnetbsd.py) = 1a017104b6ac800de1a47ccb810d5a56b2bde66a
+SHA1 (patch-psutil___psutil__netbsd.c) = 00480e009800bb1970592c8bcfbef17d7ac79240
 SHA1 (patch-psutil___psutil__netbsd.h) = 33e3c857f764d8391db747068ade7ea333698ec0
 SHA1 (patch-psutil_arch_netbsd_process__info.c) = c384d12cc47514d6396d779d59c586ef2b42a89a
 SHA1 (patch-psutil_arch_netbsd_process__info.h) = b23075df15749e4e5274ccb9e21d67ac55fdd199
diff -r a98040f656b8 -r c95020aa8636 sysutils/py-psutil/patches/patch-psutil___psnetbsd.py
--- a/sysutils/py-psutil/patches/patch-psutil___psnetbsd.py     Sat Jan 24 20:42:22 2015 +0000
+++ b/sysutils/py-psutil/patches/patch-psutil___psnetbsd.py     Sat Jan 24 23:01:29 2015 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-psutil___psnetbsd.py,v 1.1 2013/10/12 13:32:36 wiz Exp $
+$NetBSD: patch-psutil___psnetbsd.py,v 1.2 2015/01/24 23:01:29 adam Exp $
 
 Port to NetBSD.
 
 --- psutil/_psnetbsd.py.orig   2013-10-12 13:19:29.000000000 +0000
 +++ psutil/_psnetbsd.py
-@@ -0,0 +1,367 @@
+@@ -0,0 +1,366 @@
 +#!/usr/bin/env python
 +
 +# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
@@ -21,7 +21,6 @@
 +import _psutil_netbsd
 +import _psutil_posix
 +from psutil import _psposix
-+from psutil._error import AccessDenied, NoSuchProcess, TimeoutExpired
 +from psutil._compat import namedtuple, wraps
 +from psutil._common import *
 +
@@ -83,12 +82,12 @@
 +    percent = usage_percent(used, total, _round=1)
 +    return nt_swapmeminfo(total, used, free, percent, sin, sout)
 +
-+def get_system_cpu_times():
++def cpu_times():
 +    """Return system per-CPU times as a named tuple"""
 +    user, nice, system, idle, irq = _psutil_netbsd.get_system_cpu_times()
 +    return _cputimes_ntuple(user, nice, system, idle, irq)
 +
-+def get_system_per_cpu_times():
++def per_cpu_times():
 +    """Return system CPU times as a named tuple"""
 +    ret = []
 +    for cpu_t in _psutil_netbsd.get_system_per_cpu_times():
@@ -106,14 +105,14 @@
 +# crash at psutil import time.
 +# Next calls will fail with NotImplementedError
 +if not hasattr(_psutil_netbsd, "get_system_per_cpu_times"):
-+    def get_system_per_cpu_times():
++    def per_cpu_times():
 +        if NUM_CPUS == 1:
 +            return [get_system_cpu_times]
-+        if get_system_per_cpu_times.__called__:
++        if per_cpu_times.__called__:
 +            raise NotImplementedError("supported only starting from FreeBSD 8")
-+        get_system_per_cpu_times.__called__ = True
++        per_cpu_times.__called__ = True
 +        return [get_system_cpu_times]
-+get_system_per_cpu_times.__called__ = False
++per_cpu_times.__called__ = False
 +
 +def disk_partitions(all=False):
 +    retlist = []
@@ -143,7 +142,7 @@
 +
 +get_pid_list = _psutil_netbsd.get_pid_list
 +pid_exists = _psposix.pid_exists
-+get_disk_usage = _psposix.get_disk_usage
++disk_usage = _psposix.disk_usage
 +net_io_counters = _psutil_netbsd.get_net_io_counters
 +disk_io_counters = _psutil_netbsd.get_disk_io_counters
 +
diff -r a98040f656b8 -r c95020aa8636 sysutils/py-psutil/patches/patch-psutil___psutil__netbsd.c
--- a/sysutils/py-psutil/patches/patch-psutil___psutil__netbsd.c        Sat Jan 24 20:42:22 2015 +0000
+++ b/sysutils/py-psutil/patches/patch-psutil___psutil__netbsd.c        Sat Jan 24 23:01:29 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-psutil___psutil__netbsd.c,v 1.1 2013/10/12 13:32:36 wiz Exp $
+$NetBSD: patch-psutil___psutil__netbsd.c,v 1.2 2015/01/24 23:01:29 adam Exp $
 
 Port to NetBSD.
 
@@ -1251,7 +1251,7 @@
 +}
 +
 +static int
-+psutil_netbsd_clear(PyObject *m) {5A
++psutil_netbsd_clear(PyObject *m) {
 +    Py_CLEAR(GETSTATE(m)->error);
 +    return 0;
 +}



Home | Main Index | Thread Index | Old Index