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