]>
Commit | Line | Data |
---|---|---|
41e94907 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: Linux /proc abstraction classes for Python 2 | |
7 | Summary(pl.UTF-8): Klasy abstrakcji linuksowego /proc dla Pythona 2 | |
8 | Name: python-linux-procfs | |
a73ee581 | 9 | Version: 0.6 |
583d259e | 10 | Release: 1 |
41e94907 JB |
11 | License: GPL v2 |
12 | Group: Libraries/Python | |
13 | Source0: https://www.kernel.org/pub/software/libs/python/python-linux-procfs/%{name}-%{version}.tar.xz | |
a73ee581 | 14 | # Source0-md5: 039761a2abc01d92429b9df4636344b0 |
41e94907 JB |
15 | URL: https://rt.wiki.kernel.org/index.php/Tuna |
16 | BuildRequires: python-modules >= 2 | |
17 | BuildRequires: rpm-pythonprov | |
73546f65 | 18 | BuildRequires: rpmbuild(macros) >= 1.714 |
41e94907 JB |
19 | %if %{with python3} |
20 | BuildRequires: python3-modules >= 1:3.2 | |
21 | %endif | |
22 | BuildRequires: tar >= 1:1.22 | |
23 | BuildRequires: xz | |
24 | BuildArch: noarch | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | Python 2 abstractions to extract information from the Linux kernel | |
29 | /proc files. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | Abstrakcje Pythona 2 do wydobywania informacji z plików /proc jądra | |
33 | Linuksa. | |
34 | ||
35 | %package -n python3-linux-procfs | |
36 | Summary: Linux /proc abstraction classes for Python 3 | |
37 | Summary(pl.UTF-8): Klasy abstrakcji linuksowego /proc dla Pythona 3 | |
38 | Group: Libraries/Python | |
39 | ||
40 | %description -n python3-linux-procfs | |
41 | Python 3 abstractions to extract information from the Linux kernel | |
42 | /proc files. | |
43 | ||
44 | %description -n python3-linux-procfs -l pl.UTF-8 | |
45 | Abstrakcje Pythona 3 do wydobywania informacji z plików /proc jądra | |
46 | Linuksa. | |
47 | ||
48 | %prep | |
49 | %setup -q | |
50 | ||
51 | %build | |
52 | %if %{with python2} | |
8a7c0aa5 | 53 | %py_build |
41e94907 JB |
54 | %endif |
55 | ||
56 | %if %{with python3} | |
8a7c0aa5 | 57 | %py3_build |
41e94907 JB |
58 | %endif |
59 | ||
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
41e94907 JB |
62 | |
63 | %if %{with python2} | |
8a7c0aa5 | 64 | %py_install |
41e94907 JB |
65 | |
66 | %py_postclean | |
67 | %endif | |
68 | ||
69 | %if %{with python3} | |
8a7c0aa5 | 70 | %py3_install |
41e94907 JB |
71 | %endif |
72 | ||
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %if %{with python2} | |
77 | %files | |
78 | %defattr(644,root,root,755) | |
1f45ad27 JB |
79 | %if %{without python3} |
80 | %attr(755,root,root) %{_bindir}/pflags | |
81 | %endif | |
41e94907 JB |
82 | %{py_sitescriptdir}/procfs |
83 | %if "%{py_ver}" > "2.4" | |
1f45ad27 | 84 | %{py_sitescriptdir}/python_linux_procfs-%{version}-py*.egg-info |
41e94907 JB |
85 | %endif |
86 | %endif | |
87 | ||
88 | %if %{with python3} | |
89 | %files -n python3-linux-procfs | |
90 | %defattr(644,root,root,755) | |
a73ee581 | 91 | %attr(755,root,root) %{_bindir}/pflags |
41e94907 | 92 | %{py3_sitescriptdir}/procfs |
1f45ad27 | 93 | %{py3_sitescriptdir}/python_linux_procfs-%{version}-py*.egg-info |
41e94907 | 94 | %endif |