diff options
author | Michel Alexandre Salim <salimma@fedoraproject.org> | 2013-03-19 14:19:42 +0700 |
---|---|---|
committer | Michel Alexandre Salim <salimma@fedoraproject.org> | 2013-03-19 14:24:59 +0700 |
commit | a118fe3ef573b2a4bed0bf55ee5442abaa8c1520 (patch) | |
tree | 41f78421217a69d63cb771784d34ea9942bdecf8 /admin | |
parent | efef4476dd14826966144a792444ff9137f802b5 (diff) | |
download | specs-a118fe3ef573b2a4bed0bf55ee5442abaa8c1520.tar.gz specs-a118fe3ef573b2a4bed0bf55ee5442abaa8c1520.tar.xz specs-a118fe3ef573b2a4bed0bf55ee5442abaa8c1520.zip |
+ python26-psutil
Diffstat (limited to 'admin')
-rw-r--r-- | admin/python26-psutil.spec | 66 |
1 files changed, 66 insertions, 0 deletions
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 <salimma@fedoraproject.org> - 0.6.1-1 +- Initial package, based on python-psutil-0.6.1-1 |