]> git.pld-linux.org Git - packages/python-schedutils.git/blob - python-schedutils.spec
rebuild with tests and docs
[packages/python-schedutils.git] / python-schedutils.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
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
9 Version:        0.6
10 Release:        7
11 License:        GPL v2
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
16 %if %{with python2}
17 BuildRequires:  python-devel >= 2
18 BuildRequires:  python-modules >= 2
19 %endif
20 %if %{with python3}
21 BuildRequires:  python3-devel >= 1:3.2
22 BuildRequires:  python3-modules >= 1:3.2
23 %endif
24 BuildRequires:  rpm-pythonprov
25 BuildRequires:  rpmbuild(macros) >= 1.714
26 BuildRequires:  tar >= 1:1.22
27 BuildRequires:  xz
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Python 2 interface for the Linux scheduler
32 sched_{get,set}{affinity,scheduler} functions and friends.
33
34 %description -l pl.UTF-8
35 Interfejs Pythona 2 do funkcji linuksowego planisty
36 sched_{get,set}{affinity,scheduler} oraz pokrewnych.
37
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
42
43 %description -n python3-schedutils
44 Python 3 interface for the Linux scheduler
45 sched_{get,set}{affinity,scheduler} functions and friends.
46
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.
50
51 %prep
52 %setup -q
53
54 %build
55 %if %{with python2}
56 %py_build
57 %endif
58
59 %if %{with python3}
60 %py3_build
61 %endif
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT%{_bindir}
66
67 %if %{with python3}
68 %py3_install
69 %endif
70
71 %if %{with python2}
72 %py_install
73
74 %py_postclean
75
76 #cp -p pchrt.py $RPM_BUILD_ROOT%{_bindir}/pchrt
77 #cp -p ptaskset.py $RPM_BUILD_ROOT%{_bindir}/ptaskset
78 %endif
79
80 %clean
81 rm -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
90 %{_mandir}/man1/pchrt.1*
91 %{_mandir}/man1/ptaskset.1*
92 %if "%{py_ver}" > "2.4"
93 %{py_sitedir}/schedutils-%{version}-py*.egg-info
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
102 %{py3_sitedir}/schedutils-%{version}-py*.egg-info
103 %endif
This page took 0.086597 seconds and 3 git commands to generate.