]> git.pld-linux.org Git - packages/python-lxml.git/blame_incremental - python-lxml.spec
- updated to 4.6.1 (HTML Cleaner vulnerability fix)
[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_without tests # unit tests
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.6.1
13Release: 1
14License: BSD
15Group: Libraries/Python
16Source0: https://lxml.de/files/%{module}-%{version}.tgz
17# Source0-md5: 10924ab543397a06cb4cfaf9bdf0b80f
18URL: https://lxml.de/
19BuildRequires: libxml2-devel >= 1:2.9.2
20BuildRequires: libxslt-devel >= 1.1.28
21BuildRequires: pkgconfig
22%if %{with python2}
23BuildRequires: python-Cython >= 0.29.7
24BuildRequires: python-devel >= 1:2.7
25BuildRequires: python-modules >= 1:2.7
26BuildRequires: python-setuptools
27%endif
28%if %{with python3}
29BuildRequires: python3-Cython >= 0.29.7
30BuildRequires: python3-devel >= 1:3.5
31BuildRequires: python3-modules >= 1:3.5
32BuildRequires: python3-setuptools
33%endif
34BuildRequires: rpm-pythonprov
35BuildRequires: rpmbuild(macros) >= 1.752
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39lxml is a Pythonic binding for the libxml2 and libxslt libraries.
40
41%description -l pl.UTF-8
42lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
43
44%package -n python3-%{module}
45Summary: Python 3 binding for the libxml2 and libxslt libraries
46Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
47Group: Libraries/Python
48
49%description -n python3-%{module}
50lxml is a Pythonic binding for the libxml2 and libxslt libraries.
51
52%description -n python3-%{module} -l pl.UTF-8
53lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
54
55%package apidocs
56Summary: lxml API documentation
57Summary(pl.UTF-8): Dokumentacja API modułu lxml
58Group: Documentation
59%{?noarchpackage}
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}
75install -d testdir-2/src/lxml
76cd testdir-2/src/lxml
77ln -snf ../../../build-2/lib.linux-*/lxml/* ../../../src/lxml/tests .
78cd ../..
79ln -snf ../doc ../samples ../test.py .
80LC_ALL=C.UTF-8 \
81%{__python} test.py -v
82cd ..
83%endif
84%endif
85
86%if %{with python3}
87%py3_build
88
89%if %{with tests}
90install -d testdir-3/src/lxml
91cd testdir-3/src/lxml
92ln -snf ../../../build-3/lib.linux-*/lxml/* ../../../src/lxml/tests .
93cd ../..
94ln -snf ../doc ../samples ../test.py .
95%{__python3} test.py -v
96cd ..
97%endif
98%endif
99
100%if %{with apidocs}
101# as of 4.4.2, python3 is not supported in mkhtml.py
102PYTHONPATH=$(echo $(pwd)/build-2/lib.linux-*) \
103%{__python} doc/mkhtml.py doc/html $(pwd) %{version}
104%endif
105
106%install
107rm -rf $RPM_BUILD_ROOT
108
109%if %{with python2}
110%py_install
111
112%py_postclean
113%endif
114
115%if %{with python3}
116%py3_install
117%endif
118
119%clean
120rm -rf $RPM_BUILD_ROOT
121
122%if %{with python2}
123%files
124%defattr(644,root,root,755)
125%doc CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt doc/licenses/{BSD,ZopePublicLicense,elementtree}.txt
126%dir %{py_sitedir}/lxml
127%{py_sitedir}/lxml/*.py[co]
128%{py_sitedir}/lxml/etree*.h
129%{py_sitedir}/lxml/lxml.etree*.h
130%{py_sitedir}/lxml/includes
131%{py_sitedir}/lxml/isoschematron
132%attr(755,root,root) %{py_sitedir}/lxml/_elementpath.so
133%attr(755,root,root) %{py_sitedir}/lxml/builder.so
134%attr(755,root,root) %{py_sitedir}/lxml/etree.so
135%attr(755,root,root) %{py_sitedir}/lxml/objectify.so
136%attr(755,root,root) %{py_sitedir}/lxml/sax.so
137%dir %{py_sitedir}/lxml/html
138%{py_sitedir}/lxml/html/*.py[co]
139%attr(755,root,root) %{py_sitedir}/lxml/html/clean.so
140%attr(755,root,root) %{py_sitedir}/lxml/html/diff.so
141%{py_sitedir}/lxml-%{version}-py*.egg-info
142%endif
143
144%if %{with python3}
145%files -n python3-%{module}
146%defattr(644,root,root,755)
147%doc CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt doc/licenses/{BSD,ZopePublicLicense,elementtree}.txt
148%dir %{py3_sitedir}/lxml
149%attr(755,root,root) %{py3_sitedir}/lxml/_elementpath.cpython-*.so
150%attr(755,root,root) %{py3_sitedir}/lxml/builder.cpython-*.so
151%attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
152%attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
153%attr(755,root,root) %{py3_sitedir}/lxml/sax.cpython-*.so
154%{py3_sitedir}/lxml/*.py
155%{py3_sitedir}/lxml/__pycache__
156%{py3_sitedir}/lxml/etree*.h
157%{py3_sitedir}/lxml/lxml.etree*.h
158%{py3_sitedir}/lxml/includes
159%{py3_sitedir}/lxml/isoschematron
160%dir %{py3_sitedir}/lxml/html
161%{py3_sitedir}/lxml/html/*.py
162%{py3_sitedir}/lxml/html/__pycache__
163%attr(755,root,root) %{py3_sitedir}/lxml/html/clean.cpython-*.so
164%attr(755,root,root) %{py3_sitedir}/lxml/html/diff.cpython-*.so
165%{py3_sitedir}/lxml-%{version}-py*.egg-info
166%endif
167
168%if %{with apidocs}
169%files apidocs
170%defattr(644,root,root,755)
171%doc doc/html/*
172%endif
This page took 0.074132 seconds and 4 git commands to generate.