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