]> git.pld-linux.org Git - packages/python-lxml.git/blame - python-lxml.spec
- updated to 3.3.1
[packages/python-lxml.git] / python-lxml.spec
CommitLineData
7321ac76 1#
9295daeb
ER
2# Conditional build:
3%bcond_without apidocs # do not build and package API docs
9295daeb 4%bcond_without python2 # Python 2 package
c0e9fb36 5%bcond_without python3 # Python 3 package
9295daeb 6
7321ac76 7%define module lxml
c0e9fb36
JB
8Summary: Python 2 binding for the libxml2 and libxslt libraries
9Summary(pl.UTF-8): Wiązanie Pythona 2 do bibliotek libxml2 i libxslt
7321ac76 10Name: python-%{module}
4fa52948 11Version: 3.3.1
cb8d4381 12Release: 1
7321ac76 13License: BSD
eb4ef173 14Group: Libraries/Python
1c115bfe 15Source0: http://lxml.de/files/%{module}-%{version}.tgz
4fa52948 16# Source0-md5: 09401c787d9b2660b0d76c4c6baec0f3
1c115bfe 17URL: http://lxml.de/
c0e9fb36
JB
18BuildRequires: libxml2-devel >= 1:2.7.8
19BuildRequires: libxslt-devel >= 1.1.26
ea280a0f 20%if %{with python2}
c0e9fb36 21BuildRequires: python-devel >= 1:2.4
7217b13f 22BuildRequires: python-modules
ea280a0f
AF
23%endif
24%if %{with python3}
339d4628 25BuildRequires: python3-Cython > 0.17
ea280a0f
AF
26BuildRequires: python3-devel
27BuildRequires: python3-modules
28%endif
7217b13f 29BuildRequires: rpm-pythonprov
7321ac76 30BuildRequires: rpmbuild(macros) >= 1.219
7321ac76
AM
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34lxml is a Pythonic binding for the libxml2 and libxslt libraries.
35
8b26c81f
JR
36%description -l pl.UTF-8
37lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
459884ee 38
c0e9fb36
JB
39%package -n python3-%{module}
40Summary: Python 3 binding for the libxml2 and libxslt libraries
41Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
ea280a0f
AF
42Group: Libraries/Python
43
44%description -n python3-%{module}
45lxml is a Pythonic binding for the libxml2 and libxslt libraries.
46
47%description -n python3-%{module} -l pl.UTF-8
48lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
49
9295daeb
ER
50%package apidocs
51Summary: lxml API documentation
c0e9fb36 52Summary(pl.UTF-8): Dokumentacja API modułu lxml
9295daeb
ER
53Group: Documentation
54
55%description apidocs
c0e9fb36
JB
56lxml API documentation.
57
58%description apidocs -l pl.UT8-8
59Dokumentacja API modułu lxml.
9295daeb 60
7321ac76
AM
61%prep
62%setup -q -n %{module}-%{version}
63
64%build
ea280a0f
AF
65%if %{with python2}
66%{__python} setup.py build
67%endif
68%if %{with python3}
69%{__python3} setup.py build
70%endif
7321ac76
AM
71
72%install
73rm -rf $RPM_BUILD_ROOT
7321ac76 74
ea280a0f
AF
75%if %{with python2}
76%{__python} setup.py \
77 install \
7321ac76
AM
78 --root=$RPM_BUILD_ROOT \
79 --optimize=2
80
81%py_postclean
ea280a0f
AF
82%endif
83
84%if %{with python3}
85%{__python3} setup.py \
86 install \
87 --root=$RPM_BUILD_ROOT \
88 --optimize=2
ea280a0f 89%endif
7321ac76 90
9295daeb
ER
91# cleanup for packaging
92rm -rf docs
93cp -a doc docs
94# apidocs packaged separately
95rm -rf docs/html
96# build docs not useful at runtime
97rm docs/build.txt
98# common licenses
99rm docs/licenses/{BSD,GPL}.txt
100
7321ac76
AM
101%clean
102rm -rf $RPM_BUILD_ROOT
103
ea280a0f 104%if %{with python2}
7321ac76
AM
105%files
106%defattr(644,root,root,755)
c0e9fb36 107%doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
0f893bb9
AM
108%dir %{py_sitedir}/lxml
109%{py_sitedir}/lxml/*.py[co]
c0e9fb36
JB
110%{py_sitedir}/lxml/lxml.etree*.h
111%{py_sitedir}/lxml/includes
ae91e877 112%{py_sitedir}/lxml/isoschematron
75dd257f
MB
113%dir %{py_sitedir}/lxml/html
114%{py_sitedir}/lxml/html/*.py[co]
115%attr(755,root,root) %{py_sitedir}/lxml/etree.so
116%attr(755,root,root) %{py_sitedir}/lxml/objectify.so
31980435 117%{py_sitedir}/lxml-*.egg-info
ea280a0f
AF
118%endif
119
120%if %{with python3}
121%files -n python3-%{module}
122%defattr(644,root,root,755)
c0e9fb36 123%doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
ea280a0f 124%dir %{py3_sitedir}/lxml
c0e9fb36
JB
125%attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
126%attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
ae91e877 127%{py3_sitedir}/lxml/*.py
38e20aab 128%{py3_sitedir}/lxml/__pycache__
c0e9fb36
JB
129%{py3_sitedir}/lxml/lxml.etree*.h
130%{py3_sitedir}/lxml/includes
ae91e877 131%{py3_sitedir}/lxml/isoschematron
132%{py3_sitedir}/lxml/html
ea280a0f
AF
133%{py3_sitedir}/lxml-*.egg-info
134%endif
9295daeb
ER
135
136%if %{with apidocs}
137%files apidocs
138%defattr(644,root,root,755)
139%doc doc/html/*
140%endif
This page took 0.044163 seconds and 4 git commands to generate.