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