24260e
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
24260e
%{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")}
24260e
24260e
Summary: Linux scheduler python bindings
24260e
Name: python-schedutils
24260e
Version: 0.4
3622e7
Release: 6%{?dist}
24260e
License: GPLv2
24260e
URL: http://git.kernel.org/?p=linux/kernel/git/acme/python-schedutils.git
24260e
Source: http://userweb.kernel.org/~acme/python-schedutils/%{name}-%{version}.tar.bz2
24260e
Group: System Environment/Libraries
24260e
BuildRequires: python-devel
24260e
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
24260e
3622e7
Patch1: python-schedutils-Correct-typos-in-usage-messages.patch
3622e7
Patch2: python-schedutils-Add-man-pages-for-pchrt-and-ptasks.patch
3622e7
Patch3: Update-spec-file-to-install-man-pages-for-pchrt-and-.patch
3622e7
Patch4: schedutils.c-added-support-for-SCHED_DEADLINE.patch
3622e7
Patch5: python-schedutils-Update-URL-in-python-schedutils.sp.patch
3622e7
24260e
%description
24260e
Python interface for the Linux scheduler sched_{get,set}{affinity,scheduler}
24260e
functions and friends.
24260e
24260e
%prep
24260e
%setup -q
3622e7
%patch1 -p1
3622e7
%patch2 -p1
3622e7
%patch3 -p1
3622e7
%patch4 -p1
3622e7
%patch5 -p1
24260e
24260e
%build
24260e
%{__python} setup.py build
24260e
24260e
%install
24260e
rm -rf %{buildroot}
24260e
%{__python} setup.py install --skip-build --root %{buildroot}
24260e
mkdir -p %{buildroot}%{_bindir}
24260e
cp -p pchrt.py %{buildroot}%{_bindir}/pchrt
24260e
cp -p ptaskset.py %{buildroot}%{_bindir}/ptaskset
3622e7
mkdir -p %{buildroot}%{_mandir}/man1
3622e7
gzip -c pchrt.1 > %{buildroot}%{_mandir}/man1/pchrt.1.gz
3622e7
gzip -c ptaskset.1 > %{buildroot}%{_mandir}/man1/ptaskset.1.gz
24260e
24260e
%clean
24260e
rm -rf %{buildroot}
24260e
24260e
%files
24260e
%defattr(-,root,root)
24260e
%doc COPYING
24260e
%{_bindir}/pchrt
24260e
%{_bindir}/ptaskset
24260e
%{python_sitearch}/schedutils.so
24260e
%if "%{python_ver}" >= "2.5"
24260e
%{python_sitearch}/*.egg-info
24260e
%endif
3622e7
%{_mandir}/man1/pchrt.1.gz
3622e7
%{_mandir}/man1/ptaskset.1.gz
24260e
24260e
%changelog
3622e7
* Tue Jul 05 2016 John Kacur <jkacur@redhat.com> - 0.4-6
3622e7
- python-schedutils-Update-URL-in-python-schedutils.sp.patch
3622e7
- schedutils.c-added-support-for-SCHED_DEADLINE.patch
3622e7
Resolves: rhbz#1298388
3622e7
3622e7
* Tue May 10 2016 John Kacur <jkacur@redhat.com> - 0.4-5
3622e7
- Add man pages for pchrt and ptaskset
3622e7
- Fix and update usage messages for pchrt and ptaskset
3622e7
- Resolves:rhbz#948381
3622e7
9d9615
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.4-4
9d9615
- Mass rebuild 2014-01-24
9d9615
9d9615
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.4-3
9d9615
- Mass rebuild 2013-12-27
9d9615
24260e
* Thu Aug 22 2013 John Kacur <jkacur@redhat.com> - 0.4-1
24260e
- Rebuilding for rhel7.0
24260e
24260e
* Mon Aug  1 2011 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.4-1
24260e
- New upstream release.
24260e
24260e
* Tue May 17 2011 Clark Williams <williams@redhat.com> - 0.3-1
24260e
- reworked get_affinity() and set_affinity() to use dynamic CPU_* macros
24260e
24260e
* Thu Aug 28 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.2-2
24260e
- Fix build and install sections as suggested by the fedora rewiewer
24260e
  (BZ #460387)
24260e
24260e
* Wed Aug 27 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.2-1
24260e
- Add get_priority_{min,max} methods
24260e
- Add constants for SCHED_{BATCH,FIFO,OTHER,RR}
24260e
- Implement get_priority method
24260e
- Add pchrt utility for testing the bindings, chrt clone
24260e
- Add ptaskset utility for testing the bindings, taskset clone
24260e
24260e
* Tue Jun 10 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-3
24260e
- add dist to the release tag
24260e
3622e7
* Wed Dec 19 2007 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-2
24260e
- First build into rhel5-rt
24260e
3622e7
* Wed Dec 19 2007 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-1
24260e
- Initial package