From fa0f51adb1a1b2e0456997223fb12aa6faa82417 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mar 11 2016 12:31:56 +0000 Subject: fix endian issue on s390x/ppc64 --- diff --git a/python-psutil-endian.patch b/python-psutil-endian.patch new file mode 100644 index 0000000..2002c52 --- /dev/null +++ b/python-psutil-endian.patch @@ -0,0 +1,21 @@ +diff -up psutil-3.2.1/psutil/_psutil_linux.c.than psutil-3.2.1/psutil/_psutil_linux.c +--- psutil-3.2.1/psutil/_psutil_linux.c.than 2016-03-11 06:35:23.200161395 -0500 ++++ psutil-3.2.1/psutil/_psutil_linux.c 2016-03-11 06:37:55.010161395 -0500 +@@ -272,7 +272,7 @@ psutil_proc_cpu_affinity_get(PyObject *s + cpu_set_t *mask = NULL; + PyObject *py_list = NULL; + +- if (!PyArg_ParseTuple(args, "i", &pid)) ++ if (!PyArg_ParseTuple(args, "l", &pid)) + return NULL; + ncpus = NCPUS_START; + while (1) { +@@ -339,7 +339,7 @@ psutil_proc_cpu_affinity_get(PyObject *s + PyObject* py_retlist = NULL; + PyObject *py_cpu_num = NULL; + +- if (!PyArg_ParseTuple(args, "i", &pid)) ++ if (!PyArg_ParseTuple(args, "l", &pid)) + return NULL; + CPU_ZERO(&cpuset); + if (sched_getaffinity(pid, len, &cpuset) < 0) diff --git a/python-psutil.spec b/python-psutil.spec index 49b7232..9aa8574 100644 --- a/python-psutil.spec +++ b/python-psutil.spec @@ -9,12 +9,13 @@ Name: python-%{srcname} Version: 3.2.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: %{sum} License: BSD URL: http://psutil.googlecode.com/ Source0: https://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +Patch0: python-psutil-endian.patch BuildRequires: python2-devel BuildRequires: python3-devel @@ -56,7 +57,7 @@ ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap. %prep -%autosetup -n %{srcname}-%{version} +%autosetup -p1 -n %{srcname}-%{version} # Remove shebangs for file in psutil/*.py; do @@ -99,6 +100,9 @@ make test-memleaks PYTHON=%{__python3} %changelog +* Fri Mar 11 2016 Than Ngo - 3.2.1-5 +- fix endian issue on s390x/ppc64 + * Thu Feb 04 2016 Fedora Release Engineering - 3.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild