]> git.pld-linux.org Git - packages/python-lxml.git/blame - python-lxml.spec
- build python2 and python3 versions from one spec
[packages/python-lxml.git] / python-lxml.spec
CommitLineData
7321ac76 1#
ea280a0f
AF
2%bcond_without python3
3%bcond_without python2
7321ac76
AM
4%define module lxml
5#
6Summary: A Pythonic binding for the libxml2 and libxslt libraries
e1640e5a 7Summary(pl.UTF-8): Pythonowe wiązanie do bibliotek libxml2 i libxslt
7321ac76 8Name: python-%{module}
c1d4e651 9Version: 2.2.6
ea280a0f 10Release: 2
7321ac76 11License: BSD
eb4ef173 12Group: Libraries/Python
7321ac76 13Source0: http://codespeak.net/lxml/%{module}-%{version}.tgz
c1d4e651 14# Source0-md5: b1f700fb22d7ee9b977ee3eceb65b20c
ea280a0f 15Patch0: python3.patch
7321ac76 16URL: http://codespeak.net/lxml/
0f893bb9
AM
17BuildRequires: libxml2-devel
18BuildRequires: libxslt-devel
ea280a0f 19%if %{with python2}
0f893bb9 20BuildRequires: python-devel
7217b13f 21BuildRequires: python-modules
ea280a0f
AF
22%endif
23%if %{with python3}
24BuildRequires: python3-Cython
25BuildRequires: python3-devel
26BuildRequires: python3-modules
27%endif
7217b13f 28BuildRequires: rpm-pythonprov
7321ac76
AM
29BuildRequires: rpmbuild(macros) >= 1.219
30BuildRequires: unzip
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
ea280a0f
AF
39%package -n python3-%{module}
40Summary: A Pythonic binding for the libxml2 and libxslt libraries
41Summary(pl.UTF-8): Pythonowe wiązanie do bibliotek libxml2 i libxslt
42Version: %{version}
43Release: %{release}
44Group: Libraries/Python
45
46%description -n python3-%{module}
47lxml is a Pythonic binding for the libxml2 and libxslt libraries.
48
49%description -n python3-%{module} -l pl.UTF-8
50lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
51
7321ac76
AM
52%prep
53%setup -q -n %{module}-%{version}
ea280a0f 54%patch0 -p1
7321ac76
AM
55
56%build
ea280a0f
AF
57%if %{with python2}
58%{__python} setup.py build
59%endif
60%if %{with python3}
61%{__python3} setup.py build
62%endif
7321ac76
AM
63
64%install
65rm -rf $RPM_BUILD_ROOT
7321ac76 66
ea280a0f
AF
67%if %{with python2}
68%{__python} setup.py \
69 install \
7321ac76
AM
70 --root=$RPM_BUILD_ROOT \
71 --optimize=2
72
73%py_postclean
ea280a0f
AF
74%endif
75
76%if %{with python3}
77%{__python3} setup.py \
78 install \
79 --root=$RPM_BUILD_ROOT \
80 --optimize=2
81
82%py3_postclean
83%endif
7321ac76
AM
84
85%clean
86rm -rf $RPM_BUILD_ROOT
87
ea280a0f 88%if %{with python2}
7321ac76
AM
89%files
90%defattr(644,root,root,755)
91%doc doc/* CHANGES.txt CREDITS.txt TODO.txt
0f893bb9
AM
92%dir %{py_sitedir}/lxml
93%{py_sitedir}/lxml/*.py[co]
75dd257f
MB
94%dir %{py_sitedir}/lxml/html
95%{py_sitedir}/lxml/html/*.py[co]
96%attr(755,root,root) %{py_sitedir}/lxml/etree.so
97%attr(755,root,root) %{py_sitedir}/lxml/objectify.so
31980435 98%{py_sitedir}/lxml-*.egg-info
ea280a0f
AF
99%endif
100
101%if %{with python3}
102%files -n python3-%{module}
103%defattr(644,root,root,755)
104%doc doc/* CHANGES.txt CREDITS.txt TODO.txt
105%dir %{py3_sitedir}/lxml
106%{py3_sitedir}/lxml/*.py[co]
107%dir %{py3_sitedir}/lxml/html
108%{py3_sitedir}/lxml/html/*.py[co]
109%attr(755,root,root) %{py3_sitedir}/lxml/etree.so
110%attr(755,root,root) %{py3_sitedir}/lxml/objectify.so
111%{py3_sitedir}/lxml-*.egg-info
112%endif
This page took 0.099407 seconds and 4 git commands to generate.