- updated to 4.2.3
[packages/python-lxml.git] / python-lxml.spec
CommitLineData
7321ac76 1#
9295daeb 2# Conditional build:
4c2d4999 3%bcond_without apidocs # API documentation
9295daeb 4%bcond_without python2 # Python 2 package
c0e9fb36 5%bcond_without python3 # Python 3 package
4c2d4999 6%bcond_with tests # unit tests (don't work without lxml not installed?)
9295daeb 7
7321ac76 8%define module lxml
c0e9fb36
JB
9Summary: Python 2 binding for the libxml2 and libxslt libraries
10Summary(pl.UTF-8): Wiązanie Pythona 2 do bibliotek libxml2 i libxslt
7321ac76 11Name: python-%{module}
4c2d4999
JB
12Version: 4.2.3
13Release: 1
7321ac76 14License: BSD
eb4ef173 15Group: Libraries/Python
4c2d4999
JB
16Source0: https://lxml.de/files/%{module}-%{version}.tgz
17# Source0-md5: 40331e46f6aa49fd0e7043d82e58a879
18URL: https://lxml.de/
d3b1534c
ER
19BuildRequires: libxml2-devel >= 1:2.9.2
20BuildRequires: libxslt-devel >= 1.1.28
ea280a0f 21%if %{with python2}
218fb629
JB
22BuildRequires: python-devel >= 1:2.6
23BuildRequires: python-modules >= 1:2.6
4c2d4999 24BuildRequires: python-setuptools
ea280a0f
AF
25%endif
26%if %{with python3}
a6453ed9 27BuildRequires: python3-Cython >= 0.17
4c2d4999
JB
28BuildRequires: python3-devel >= 1:3.3
29BuildRequires: python3-modules >= 1:3.3
30BuildRequires: python3-setuptools
ea280a0f 31%endif
7217b13f 32BuildRequires: rpm-pythonprov
a64792d2 33BuildRequires: rpmbuild(macros) >= 1.710
7321ac76
AM
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37lxml is a Pythonic binding for the libxml2 and libxslt libraries.
38
8b26c81f
JR
39%description -l pl.UTF-8
40lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
459884ee 41
c0e9fb36
JB
42%package -n python3-%{module}
43Summary: Python 3 binding for the libxml2 and libxslt libraries
44Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
ea280a0f
AF
45Group: Libraries/Python
46
47%description -n python3-%{module}
48lxml is a Pythonic binding for the libxml2 and libxslt libraries.
49
50%description -n python3-%{module} -l pl.UTF-8
51lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
52
9295daeb
ER
53%package apidocs
54Summary: lxml API documentation
c0e9fb36 55Summary(pl.UTF-8): Dokumentacja API modułu lxml
9295daeb 56Group: Documentation
5f407b18
ER
57%if "%{_rpmversion}" >= "5"
58BuildArch: noarch
59%endif
9295daeb
ER
60
61%description apidocs
c0e9fb36
JB
62lxml API documentation.
63
64%description apidocs -l pl.UT8-8
65Dokumentacja API modułu lxml.
9295daeb 66
7321ac76
AM
67%prep
68%setup -q -n %{module}-%{version}
69
70%build
ea280a0f 71%if %{with python2}
9ffc2b4f 72%py_build
4c2d4999
JB
73
74%if %{with tests}
75PYTHONPATH=$(pwd)/$(echo build-2/lib.linux-*) \
76%{__python} test.py
77%endif
ea280a0f 78%endif
4c2d4999 79
ea280a0f 80%if %{with python3}
9ffc2b4f 81%py3_build
4c2d4999
JB
82
83%if %{with tests}
84PYTHONPATH=$(pwd)/$(echo build-3/lib.linux-*) \
85%{__python3} test.py
86%endif
ea280a0f 87%endif
7321ac76
AM
88
89%install
90rm -rf $RPM_BUILD_ROOT
7321ac76 91
ea280a0f 92%if %{with python2}
9ffc2b4f 93%py_install
7321ac76
AM
94
95%py_postclean
ea280a0f
AF
96%endif
97
98%if %{with python3}
9ffc2b4f 99%py3_install
ea280a0f 100%endif
7321ac76
AM
101
102%clean
103rm -rf $RPM_BUILD_ROOT
104
ea280a0f 105%if %{with python2}
7321ac76
AM
106%files
107%defattr(644,root,root,755)
4c2d4999 108%doc CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt doc/licenses/{BSD,ZopePublicLicense,elementtree}.txt
0f893bb9
AM
109%dir %{py_sitedir}/lxml
110%{py_sitedir}/lxml/*.py[co]
00a14e75 111%{py_sitedir}/lxml/etree*.h
c0e9fb36
JB
112%{py_sitedir}/lxml/lxml.etree*.h
113%{py_sitedir}/lxml/includes
ae91e877 114%{py_sitedir}/lxml/isoschematron
00a14e75
JB
115%attr(755,root,root) %{py_sitedir}/lxml/_elementpath.so
116%attr(755,root,root) %{py_sitedir}/lxml/builder.so
75dd257f
MB
117%attr(755,root,root) %{py_sitedir}/lxml/etree.so
118%attr(755,root,root) %{py_sitedir}/lxml/objectify.so
00a14e75
JB
119%dir %{py_sitedir}/lxml/html
120%{py_sitedir}/lxml/html/*.py[co]
121%attr(755,root,root) %{py_sitedir}/lxml/html/clean.so
122%attr(755,root,root) %{py_sitedir}/lxml/html/diff.so
123%{py_sitedir}/lxml-%{version}-py*.egg-info
ea280a0f
AF
124%endif
125
126%if %{with python3}
127%files -n python3-%{module}
128%defattr(644,root,root,755)
4c2d4999 129%doc CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt doc/licenses/{BSD,ZopePublicLicense,elementtree}.txt
ea280a0f 130%dir %{py3_sitedir}/lxml
00a14e75
JB
131%attr(755,root,root) %{py3_sitedir}/lxml/_elementpath.cpython-*.so
132%attr(755,root,root) %{py3_sitedir}/lxml/builder.cpython-*.so
c0e9fb36
JB
133%attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
134%attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
ae91e877 135%{py3_sitedir}/lxml/*.py
38e20aab 136%{py3_sitedir}/lxml/__pycache__
00a14e75 137%{py3_sitedir}/lxml/etree*.h
c0e9fb36
JB
138%{py3_sitedir}/lxml/lxml.etree*.h
139%{py3_sitedir}/lxml/includes
ae91e877 140%{py3_sitedir}/lxml/isoschematron
00a14e75
JB
141%dir %{py3_sitedir}/lxml/html
142%{py3_sitedir}/lxml/html/*.py
143%{py3_sitedir}/lxml/html/__pycache__
144%attr(755,root,root) %{py3_sitedir}/lxml/html/clean.cpython-*.so
145%attr(755,root,root) %{py3_sitedir}/lxml/html/diff.cpython-*.so
146%{py3_sitedir}/lxml-%{version}-py*.egg-info
ea280a0f 147%endif
9295daeb
ER
148
149%if %{with apidocs}
150%files apidocs
151%defattr(644,root,root,755)
152%doc doc/html/*
153%endif
This page took 0.107733 seconds and 4 git commands to generate.