]> git.pld-linux.org Git - packages/python-linux-procfs.git/blob - python-linux-procfs.spec
rebuild with python 3.10
[packages/python-linux-procfs.git] / python-linux-procfs.spec
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
9 Version:        0.7.0
10 Release:        2
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
14 # Source0-md5:  a6c26f7cb2ce077b4d95da0e933a7ee9
15 URL:            https://rt.wiki.kernel.org/index.php/Tuna
16 %if %{with python2}
17 BuildRequires:  python-modules >= 1:2.5
18 BuildRequires:  python-setuptools
19 %endif
20 %if %{with python3}
21 BuildRequires:  python3-modules >= 1:3.2
22 BuildRequires:  python3-setuptools
23 %endif
24 BuildRequires:  rpm-pythonprov
25 BuildRequires:  rpmbuild(macros) >= 1.714
26 BuildRequires:  tar >= 1:1.22
27 BuildRequires:  xz
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 Python 2 abstractions to extract information from the Linux kernel
33 /proc files.
34
35 %description -l pl.UTF-8
36 Abstrakcje Pythona 2 do wydobywania informacji z plików /proc jądra
37 Linuksa.
38
39 %package -n python3-linux-procfs
40 Summary:        Linux /proc abstraction classes for Python 3
41 Summary(pl.UTF-8):      Klasy abstrakcji linuksowego /proc dla Pythona 3
42 Group:          Libraries/Python
43
44 %description -n python3-linux-procfs
45 Python 3 abstractions to extract information from the Linux kernel
46 /proc files.
47
48 %description -n python3-linux-procfs -l pl.UTF-8
49 Abstrakcje Pythona 3 do wydobywania informacji z plików /proc jądra
50 Linuksa.
51
52 %prep
53 %setup -q
54
55 %build
56 %if %{with python2}
57 %py_build
58 %endif
59
60 %if %{with python3}
61 %py3_build
62 %endif
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 %if %{with python2}
68 %py_install
69
70 %py_postclean
71 %endif
72
73 %if %{with python3}
74 # Make sure python2 script is removed
75 %{__rm} -f $RPM_BUILD_ROOT%{_bindir}/pflags
76 %py3_install
77 %endif
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %if %{with python2}
83 %files
84 %defattr(644,root,root,755)
85 %if %{without python3}
86 %attr(755,root,root) %{_bindir}/pflags
87 %endif
88 %{py_sitescriptdir}/procfs
89 %{py_sitescriptdir}/python_linux_procfs-%{version}-py*.egg-info
90 %endif
91
92 %if %{with python3}
93 %files -n python3-linux-procfs
94 %defattr(644,root,root,755)
95 %attr(755,root,root) %{_bindir}/pflags
96 %{py3_sitescriptdir}/procfs
97 %{py3_sitescriptdir}/python_linux_procfs-%{version}-py*.egg-info
98 %endif
This page took 0.067565 seconds and 3 git commands to generate.