]> git.pld-linux.org Git - packages/python-augeas.git/blob - python-augeas.spec
- python 3.5 rebuild
[packages/python-augeas.git] / python-augeas.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module  augeas
7 Summary:        Python 2.x bindings to augeas
8 Summary(pl.UTF-8):      Wiązania Pythona 2.x do augeasa
9 Name:           python-%{module}
10 Version:        0.5.0
11 Release:        3
12 License:        LGPL v2.1+
13 Group:          Libraries/Python
14 Source0:        https://fedorahosted.org/released/python-augeas/%{name}-%{version}.tar.gz
15 # Source0-md5:  2d5a903467410b8d60abca5fa54bae2d
16 URL:            http://augeas.net/
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.219
19 %if %{with python2}
20 BuildRequires:  python-devel
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-devel
24 %endif
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
32 Pure Python bindings to augeas, built for Python 2.x.
33
34 %description -l pl.UTF-8
35 Czysto pythonowe wiązania do augeasa, zbudowane dla Pythona 2.x.
36
37 %package -n python3-%{module}
38 Summary:        Python 3.x bindings to augeas
39 Summary(pl.UTF-8):      Wiązania Pythona 3.x do augeasa
40 Group:          Libraries/Python
41
42 %description -n python3-%{module}
43 Pure Python bindings to augeas, built for Python 3.x.
44
45 %description -n python3-%{module} -l pl.UTF-8
46 Czysto pythonowe wiązania do augeasa, zbudowane dla Pythona 3.x.
47
48 %prep
49 %setup -q
50
51 %build
52 %if %{with python2}
53 %{__python} setup.py build --build-base build-2
54 %endif
55
56 %if %{with python3}
57 CC="%{__cc}" \
58 CFLAGS="%{rpmcflags}" \
59 %{__python3} setup.py build --build-base build-3
60 %endif
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 %if %{with python2}
65 %{__python} setup.py \
66         build --build-base build-2 \
67         install --skip-build \
68         --optimize=2 \
69         --root=$RPM_BUILD_ROOT
70
71 %py_postclean
72 %endif
73
74 %if %{with python3}
75 %{__python3} setup.py \
76         build --build-base build-3 \
77         install --skip-build \
78         --optimize=2 \
79         --root=$RPM_BUILD_ROOT
80 %endif
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %if %{with python2}
86 %files
87 %defattr(644,root,root,755)
88 %doc AUTHORS README.txt
89 %{py_sitescriptdir}/augeas.py[co]
90 %{py_sitescriptdir}/python_augeas-%{version}-py*.egg-info
91 %endif
92
93 %if %{with python3}
94 %files -n python3-%{module}
95 %defattr(644,root,root,755)
96 %doc AUTHORS README.txt
97 %{py3_sitescriptdir}/augeas.py
98 %{py3_sitescriptdir}/__pycache__/augeas.cpython-*.py[co]
99 %{py3_sitescriptdir}/python_augeas-%{version}-py*.egg-info
100 %endif
This page took 0.079901 seconds and 3 git commands to generate.