]>
Commit | Line | Data |
---|---|---|
9228012c ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
f2fdf383 | 4 | %bcond_without python3 # CPython 3.x module |
9228012c ER |
5 | |
6 | %define module augeas | |
6fd319da JB |
7 | Summary: Python 2.x bindings to augeas |
8 | Summary(pl.UTF-8): Wiązania Pythona 2.x do augeasa | |
9228012c | 9 | Name: python-%{module} |
90f77985 | 10 | Version: 0.5.0 |
f2a0411e | 11 | Release: 5 |
b2319e48 | 12 | License: LGPL v2.1+ |
9228012c ER |
13 | Group: Libraries/Python |
14 | Source0: https://fedorahosted.org/released/python-augeas/%{name}-%{version}.tar.gz | |
90f77985 | 15 | # Source0-md5: 2d5a903467410b8d60abca5fa54bae2d |
b2319e48 | 16 | URL: http://augeas.net/ |
b2319e48 | 17 | BuildRequires: rpm-pythonprov |
029d296a | 18 | BuildRequires: rpmbuild(macros) >= 1.710 |
9228012c ER |
19 | %if %{with python2} |
20 | BuildRequires: python-devel | |
21 | %endif | |
22 | %if %{with python3} | |
23 | BuildRequires: python3-devel | |
24 | %endif | |
b2319e48 JB |
25 | # library is dlopened |
26 | Requires: augeas-libs | |
27 | Requires: python-modules | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
6fd319da | 32 | Pure Python bindings to augeas, built for Python 2.x. |
b2319e48 JB |
33 | |
34 | %description -l pl.UTF-8 | |
6fd319da | 35 | Czysto pythonowe wiązania do augeasa, zbudowane dla Pythona 2.x. |
b2319e48 | 36 | |
9228012c | 37 | %package -n python3-%{module} |
6fd319da JB |
38 | Summary: Python 3.x bindings to augeas |
39 | Summary(pl.UTF-8): Wiązania Pythona 3.x do augeasa | |
9228012c ER |
40 | Group: Libraries/Python |
41 | ||
42 | %description -n python3-%{module} | |
6fd319da | 43 | Pure Python bindings to augeas, built for Python 3.x. |
9228012c ER |
44 | |
45 | %description -n python3-%{module} -l pl.UTF-8 | |
6fd319da | 46 | Czysto pythonowe wiązania do augeasa, zbudowane dla Pythona 3.x. |
9228012c | 47 | |
b2319e48 | 48 | %prep |
9228012c | 49 | %setup -q |
b2319e48 JB |
50 | |
51 | %build | |
9228012c | 52 | %if %{with python2} |
7e67b24a | 53 | %py_build |
9228012c ER |
54 | %endif |
55 | ||
56 | %if %{with python3} | |
7e67b24a | 57 | %py3_build |
9228012c | 58 | %endif |
b2319e48 JB |
59 | |
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
9228012c | 62 | %if %{with python2} |
7e67b24a | 63 | %py_install |
b2319e48 JB |
64 | |
65 | %py_postclean | |
9228012c ER |
66 | %endif |
67 | ||
68 | %if %{with python3} | |
7e67b24a | 69 | %py3_install |
9228012c | 70 | %endif |
b2319e48 JB |
71 | |
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
9228012c | 75 | %if %{with python2} |
b2319e48 JB |
76 | %files |
77 | %defattr(644,root,root,755) | |
78 | %doc AUTHORS README.txt | |
79 | %{py_sitescriptdir}/augeas.py[co] | |
b2319e48 JB |
80 | %{py_sitescriptdir}/python_augeas-%{version}-py*.egg-info |
81 | %endif | |
9228012c ER |
82 | |
83 | %if %{with python3} | |
84 | %files -n python3-%{module} | |
85 | %defattr(644,root,root,755) | |
86 | %doc AUTHORS README.txt | |
87 | %{py3_sitescriptdir}/augeas.py | |
f2fdf383 | 88 | %{py3_sitescriptdir}/__pycache__/augeas.cpython-*.py[co] |
9228012c ER |
89 | %{py3_sitescriptdir}/python_augeas-%{version}-py*.egg-info |
90 | %endif |