200c198f |
%{!?python2_sitelib: %global python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
Summary: Utility tools for control groups of Linux
Name: cgroup-utils
Version: 0.6 |
5aff88e9 |
Release: 6%{?dist} |
200c198f |
License: GPLv2
Group: Development/Libraries
URL: https://pypi.python.org/pypi/cgroup-utils/0.6 |
706f07a4 |
|
200c198f |
Source0: https://github.com/peo3/cgroup-utils/archive/%{name}-%{version}.tar.gz
%define sha1 cgroup-utils=c0c9c6ddcd7e5ce2eb04394aa1ad46e1b05eb669 |
706f07a4 |
|
f20850e3 |
Patch0: cgutil-support-space-in-procname.patch |
706f07a4 |
BuildRequires: python-setuptools
BuildRequires: python2-devel
|
200c198f |
Requires: python2 |
706f07a4 |
|
f20850e3 |
|
706f07a4 |
%description
cgroup-utils provides utility tools and libraries for control groups of Linux. For example,
cgutil top is a top-like tool which shows activities of running processes in control groups.
|
200c198f |
%package -n python3-cgroup-utils
Summary: python3-cgroup-utils
BuildRequires: python3-devel |
a848bcf8 |
BuildRequires: python3-setuptools
BuildRequires: python3-xml |
200c198f |
%description -n python3-cgroup-utils |
706f07a4 |
%prep
%setup -q |
f20850e3 |
%patch0 -p1 |
200c198f |
rm -rf ../p3dir
cp -a . ../p3dir |
706f07a4 |
%build |
200c198f |
python2 setup.py build
pushd ../p3dir
python3 setup.py build
popd |
706f07a4 |
%install |
200c198f |
pushd ../p3dir
python3 setup.py install --single-version-externally-managed -O1 --root=%{buildroot}
mv %{buildroot}/%{_bindir}/cgutil %{buildroot}/%{_bindir}/cgutil3
popd
python2 setup.py install --single-version-externally-managed -O1 --root=%{buildroot} |
706f07a4 |
|
23a6af57 |
%check
python test_all.py |
200c198f |
pushd ../p3dir |
5aff88e9 |
python test_all.py |
200c198f |
popd |
23a6af57 |
|
706f07a4 |
%clean
%{__rm} -rf %{buildroot}
|
200c198f |
%files
%defattr(-,root,root)
%{_bindir}/cgutil
%{python2_sitelib}/*
%files -n python3-cgroup-utils |
706f07a4 |
%defattr(-,root,root) |
200c198f |
%{_bindir}/cgutil3
%{python3_sitelib}/* |
706f07a4 |
%changelog |
5aff88e9 |
* Fri Aug 11 2017 Rongrong Qiu <rqiu@vmware.com> 0.6-6
- fix make check for bug 1900249 |
a848bcf8 |
* Tue Jun 13 2017 Xiaolin Li <xiaolinl@vmware.com> 0.6-5
- Add python3-setuptools and python3-xml to python3 sub package Buildrequires. |
f20850e3 |
* Fri Jun 09 2017 Xiaolin Li <xiaolinl@vmware.com> 0.6-4
- Support space in proc name. |
200c198f |
* Tue May 23 2017 Xiaolin Li <xiaolinl@vmware.com> 0.6-3
- Added python3 subpackage.
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.6-2
- GA - Bump release of all rpms
* Wed Jan 6 2016 Xiaolin Li <xiaolinl@vmware.com> 0.6-1 |
5aff88e9 |
- Initial build. First version |