3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 Summary: Python 2 module to interface with the Linux scheduler
7 Summary(pl.UTF-8): Moduł Pythona 2 do komunikacji z linuksowym planistą
8 Name: python-schedutils
12 Group: Libraries/Python
13 Source0: https://www.kernel.org/pub/software/libs/python/python-schedutils/%{name}-%{version}.tar.xz
14 # Source0-md5: e834aa5b0d026102bd9b04f24019c731
15 URL: https://rt.wiki.kernel.org/index.php/Tuna
17 BuildRequires: python-devel >= 2
18 BuildRequires: python-modules >= 2
21 BuildRequires: python3-devel >= 1:3.2
22 BuildRequires: python3-modules >= 1:3.2
24 BuildRequires: rpm-pythonprov
25 BuildRequires: rpmbuild(macros) >= 1.714
26 BuildRequires: tar >= 1:1.22
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Python 2 interface for the Linux scheduler
32 sched_{get,set}{affinity,scheduler} functions and friends.
34 %description -l pl.UTF-8
35 Interfejs Pythona 2 do funkcji linuksowego planisty
36 sched_{get,set}{affinity,scheduler} oraz pokrewnych.
38 %package -n python3-schedutils
39 Summary: Python 3 module to interface with the Linux scheduler
40 Summary(pl.UTF-8): Moduł Pythona 3 do komunikacji z linuksowym planistą
41 Group: Libraries/Python
43 %description -n python3-schedutils
44 Python 3 interface for the Linux scheduler
45 sched_{get,set}{affinity,scheduler} functions and friends.
47 %description -n python3-schedutils -l pl.UTF-8
48 Interfejs Pythona 3 do funkcji linuksowego planisty
49 sched_{get,set}{affinity,scheduler} oraz pokrewnych.
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT%{_bindir}
76 #cp -p pchrt.py $RPM_BUILD_ROOT%{_bindir}/pchrt
77 #cp -p ptaskset.py $RPM_BUILD_ROOT%{_bindir}/ptaskset
81 rm -rf $RPM_BUILD_ROOT
85 %defattr(644,root,root,755)
87 %attr(755,root,root) %{_bindir}/pchrt
88 %attr(755,root,root) %{_bindir}/ptaskset
89 %attr(755,root,root) %{py_sitedir}/schedutils.so
90 %{_mandir}/man1/pchrt.1*
91 %{_mandir}/man1/ptaskset.1*
92 %if "%{py_ver}" > "2.4"
93 %{py_sitedir}/schedutils-%{version}-py*.egg-info
98 %files -n python3-schedutils
99 %defattr(644,root,root,755)
101 %attr(755,root,root) %{py3_sitedir}/schedutils.cpython-*.so
102 %{py3_sitedir}/schedutils-%{version}-py*.egg-info