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