From a118fe3ef573b2a4bed0bf55ee5442abaa8c1520 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Tue, 19 Mar 2013 14:19:42 +0700 Subject: + python26-psutil --- admin/python26-psutil.spec | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 admin/python26-psutil.spec (limited to 'admin/python26-psutil.spec') diff --git a/admin/python26-psutil.spec b/admin/python26-psutil.spec new file mode 100644 index 0000000..e7456ac --- /dev/null +++ b/admin/python26-psutil.spec @@ -0,0 +1,66 @@ +%{!?python_sitearch: %global python_sitearch %(%{__python}26 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")} + +%global short_name psutil + +# Filter Python modules from Provides +%{?filter_setup: +%filter_provides_in %{python_sitearch}/.*\.so$ +%filter_setup +} + +Name: python26-psutil +Version: 0.6.1 +Release: 1%{?dist} +Summary: A process and system utilities module for Python + +Group: Development/Languages +License: BSD +URL: http://psutil.googlecode.com/ +Source0: http://psutil.googlecode.com/files/%{short_name}-%{version}.tar.gz + +BuildRequires: python26-devel + +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +%description +psutil is a module providing an interface for retrieving information on all +running processes and system utilization (CPU, memory, disks, network, users) in +a portable way by using Python, implementing many functionalities offered by +command line tools such as: ps, top, df, kill, free, lsof, free, netstat, +ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap. + + +%prep +%setup -q -n %{short_name}-%{version} + +# Remove shebangs +for file in psutil/*.py; do + sed -i.orig -e 1d $file && \ + touch -r $file.orig $file && \ + rm $file.orig +done + + +%build +CFLAGS=$RPM_OPT_FLAGS %{__python}26 setup.py build + + +%install +%{__python}26 setup.py install \ + --skip-build \ + --root $RPM_BUILD_ROOT + +# Fix permissions +chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/*.so + + +%files +%doc CREDITS HISTORY LICENSE README +%{python_sitearch}/%{short_name}/ +%{python_sitearch}/*.egg-info +%{python_sitearch}/*.so + + +%changelog +* Tue Mar 19 2013 Michel Salim - 0.6.1-1 +- Initial package, based on python-psutil-0.6.1-1 -- cgit