]> git.pld-linux.org Git - packages/python-schedutils.git/blame - python-schedutils.spec
rebuild with tests and docs
[packages/python-schedutils.git] / python-schedutils.spec
CommitLineData
8ef51ec1
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
10e8fb94 4%bcond_without python3 # CPython 3.x module
8ef51ec1
JB
5
6Summary: Python 2 module to interface with the Linux scheduler
7Summary(pl.UTF-8): Moduł Pythona 2 do komunikacji z linuksowym planistą
8Name: python-schedutils
10e8fb94 9Version: 0.6
e88bf112 10Release: 7
8ef51ec1
JB
11License: GPL v2
12Group: Libraries/Python
13Source0: https://www.kernel.org/pub/software/libs/python/python-schedutils/%{name}-%{version}.tar.xz
10e8fb94 14# Source0-md5: e834aa5b0d026102bd9b04f24019c731
8ef51ec1 15URL: https://rt.wiki.kernel.org/index.php/Tuna
0731b3a0 16%if %{with python2}
4270f987 17BuildRequires: python-devel >= 2
8ef51ec1 18BuildRequires: python-modules >= 2
0731b3a0 19%endif
8ef51ec1 20%if %{with python3}
4270f987 21BuildRequires: python3-devel >= 1:3.2
8ef51ec1
JB
22BuildRequires: python3-modules >= 1:3.2
23%endif
0731b3a0
JB
24BuildRequires: rpm-pythonprov
25BuildRequires: rpmbuild(macros) >= 1.714
8ef51ec1
JB
26BuildRequires: tar >= 1:1.22
27BuildRequires: xz
8ef51ec1
JB
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31Python 2 interface for the Linux scheduler
32sched_{get,set}{affinity,scheduler} functions and friends.
33
34%description -l pl.UTF-8
35Interfejs Pythona 2 do funkcji linuksowego planisty
36sched_{get,set}{affinity,scheduler} oraz pokrewnych.
37
38%package -n python3-schedutils
39Summary: Python 3 module to interface with the Linux scheduler
40Summary(pl.UTF-8): Moduł Pythona 3 do komunikacji z linuksowym planistą
41Group: Libraries/Python
42
43%description -n python3-schedutils
44Python 3 interface for the Linux scheduler
45sched_{get,set}{affinity,scheduler} functions and friends.
46
47%description -n python3-schedutils -l pl.UTF-8
48Interfejs Pythona 3 do funkcji linuksowego planisty
49sched_{get,set}{affinity,scheduler} oraz pokrewnych.
50
51%prep
52%setup -q
53
54%build
55%if %{with python2}
47ec5ed5 56%py_build
8ef51ec1
JB
57%endif
58
59%if %{with python3}
47ec5ed5 60%py3_build
8ef51ec1
JB
61%endif
62
63%install
64rm -rf $RPM_BUILD_ROOT
65install -d $RPM_BUILD_ROOT%{_bindir}
66
10e8fb94
JB
67%if %{with python3}
68%py3_install
69%endif
70
8ef51ec1 71%if %{with python2}
47ec5ed5 72%py_install
8ef51ec1
JB
73
74%py_postclean
75
10e8fb94
JB
76#cp -p pchrt.py $RPM_BUILD_ROOT%{_bindir}/pchrt
77#cp -p ptaskset.py $RPM_BUILD_ROOT%{_bindir}/ptaskset
8ef51ec1
JB
78%endif
79
80%clean
81rm -rf $RPM_BUILD_ROOT
82
83%if %{with python2}
84%files
85%defattr(644,root,root,755)
86%doc ChangeLog
87%attr(755,root,root) %{_bindir}/pchrt
88%attr(755,root,root) %{_bindir}/ptaskset
89%attr(755,root,root) %{py_sitedir}/schedutils.so
10e8fb94
JB
90%{_mandir}/man1/pchrt.1*
91%{_mandir}/man1/ptaskset.1*
8ef51ec1 92%if "%{py_ver}" > "2.4"
10e8fb94 93%{py_sitedir}/schedutils-%{version}-py*.egg-info
8ef51ec1
JB
94%endif
95%endif
96
97%if %{with python3}
98%files -n python3-schedutils
99%defattr(644,root,root,755)
100%doc ChangeLog
101%attr(755,root,root) %{py3_sitedir}/schedutils.cpython-*.so
10e8fb94 102%{py3_sitedir}/schedutils-%{version}-py*.egg-info
8ef51ec1 103%endif
This page took 0.075684 seconds and 4 git commands to generate.