Change-Id: Ib624634f3d1c5c219acab3d2bfab0d8a65b6202e
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2537
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,70 @@ |
| 0 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 1 |
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 2 |
+ |
|
| 3 |
+Summary: A library for retrieving information onrunning processes and system utilization |
|
| 4 |
+Name: python-psutil |
|
| 5 |
+Version: 5.2.2 |
|
| 6 |
+Release: 1%{?dist}
|
|
| 7 |
+Url: https://pypi.python.org/pypi/psutil |
|
| 8 |
+License: BSD |
|
| 9 |
+Group: Development/Languages/Python |
|
| 10 |
+Vendor: VMware, Inc. |
|
| 11 |
+Distribution: Photon |
|
| 12 |
+Source0: https://files.pythonhosted.org/packages/source/p/psutil/psutil-%{version}.tar.gz
|
|
| 13 |
+%define sha1 psutil=e22e2f6abdff051d438626f9a59a8782ace1a63e |
|
| 14 |
+ |
|
| 15 |
+BuildRequires: python2 |
|
| 16 |
+BuildRequires: python2-libs |
|
| 17 |
+BuildRequires: python2-devel |
|
| 18 |
+BuildRequires: python-setuptools |
|
| 19 |
+Requires: python2 |
|
| 20 |
+Requires: python2-libs |
|
| 21 |
+ |
|
| 22 |
+%description |
|
| 23 |
+psutil (process and system utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network, sensors) in Python. It is useful mainly for system monitoring, profiling and limiting process resources and management of running processes. It implements many functionalities offered by command line tools such as: ps, top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime, pidof, tty, taskset, pmap. It currently supports Linux, Windows, OSX, Sun Solaris, FreeBSD, OpenBSD and NetBSD, both 32-bit and 64-bit architectures, with Python versions from 2.6 to 3.6 (users of Python 2.4 and 2.5 may use 2.1.3 version). PyPy is also known to work. |
|
| 24 |
+ |
|
| 25 |
+%package -n python3-psutil |
|
| 26 |
+Summary: python-psutil |
|
| 27 |
+BuildRequires: python3 |
|
| 28 |
+BuildRequires: python3-devel |
|
| 29 |
+BuildRequires: python3-libs |
|
| 30 |
+Requires: python3 |
|
| 31 |
+Requires: python3-libs |
|
| 32 |
+ |
|
| 33 |
+%description -n python3-psutil |
|
| 34 |
+Python 3 version. |
|
| 35 |
+ |
|
| 36 |
+%prep |
|
| 37 |
+%setup -q -n psutil-%{version}
|
|
| 38 |
+rm -rf ../p3dir |
|
| 39 |
+cp -a . ../p3dir |
|
| 40 |
+ |
|
| 41 |
+%build |
|
| 42 |
+python2 setup.py build |
|
| 43 |
+pushd ../p3dir |
|
| 44 |
+python3 setup.py build |
|
| 45 |
+popd |
|
| 46 |
+ |
|
| 47 |
+%install |
|
| 48 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 49 |
+pushd ../p3dir |
|
| 50 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 51 |
+popd |
|
| 52 |
+ |
|
| 53 |
+%check |
|
| 54 |
+python2 setup.py test |
|
| 55 |
+pushd ../p3dir |
|
| 56 |
+python3 setup.py test |
|
| 57 |
+popd |
|
| 58 |
+ |
|
| 59 |
+%files |
|
| 60 |
+%defattr(-,root,root) |
|
| 61 |
+%{python2_sitelib}/*
|
|
| 62 |
+ |
|
| 63 |
+%files -n python3-psutil |
|
| 64 |
+%defattr(-,root,root,-) |
|
| 65 |
+%{python3_sitelib}/*
|
|
| 66 |
+ |
|
| 67 |
+%changelog |
|
| 68 |
+* Wed Apr 26 2017 Xialin Li <xiaolinl@vmware.com> 5.2.2-1 |
|
| 69 |
+- Initial packaging for Photon |