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