[python26-psutil] Initial commit

Michel Alexandre Salim salimma at fedoraproject.org
Wed Apr 10 16:10:07 UTC 2013


commit 1125ca41c0d863d9ba1e57d709787cb66f2f6c2e
Author: Michel Alexandre Salim <salimma at fedoraproject.org>
Date:   Wed Apr 10 23:09:53 2013 +0700

    Initial commit

 .gitignore           |    1 +
 python26-psutil.spec |   79 ++++++++++++++++++++++++++++++++++++++++++++++++++
 sources              |    1 +
 3 files changed, 81 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..da778b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/psutil-0.6.1.tar.gz
diff --git a/python26-psutil.spec b/python26-psutil.spec
new file mode 100644
index 0000000..6098192
--- /dev/null
+++ b/python26-psutil.spec
@@ -0,0 +1,79 @@
+%{!?python_sitearch: %global python_sitearch %(%{__python}26 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")}
+
+# fix byte-compilation to not use default python
+# http://fedoraproject.org/wiki/Python26#Byte_compiling
+%global __os_install_post %__multiple_python_os_install_post
+
+%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:        2%{?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
+rm -rf $RPM_BUILD_ROOT
+%{__python}26 setup.py install \
+  --skip-build \
+  --root $RPM_BUILD_ROOT
+
+# Fix permissions
+chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/*.so
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%doc CREDITS HISTORY LICENSE README
+%{python_sitearch}/%{short_name}/
+%{python_sitearch}/*.egg-info
+%{python_sitearch}/*.so
+
+
+%changelog
+* Mon Apr  8 2013 Michel Salim <salimma at fedoraproject.org> - 0.6.1-2
+- Byte-compile with the correct Python version
+- Clean up buildroot
+
+* Tue Mar 19 2013 Michel Salim <salimma at fedoraproject.org> - 0.6.1-1
+- Initial package, based on python-psutil-0.6.1-1
diff --git a/sources b/sources
index e69de29..076c4dd 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+3cfcbfb8525f6e4c70110e44a85e907e  psutil-0.6.1.tar.gz


More information about the scm-commits mailing list