]> git.pld-linux.org Git - packages/python-lxml.git/blob - python-lxml.spec
3b1a5c28ccb351eb4a3049ba7b314b010e00953f
[packages/python-lxml.git] / python-lxml.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # do not build and package API docs
4 %bcond_without  python2         # Python 2 package
5 %bcond_without  python3         # Python 3 package
6
7 %define         module  lxml
8 Summary:        Python 2 binding for the libxml2 and libxslt libraries
9 Summary(pl.UTF-8):      Wiązanie Pythona 2 do bibliotek libxml2 i libxslt
10 Name:           python-%{module}
11 Version:        3.3.0
12 Release:        1
13 License:        BSD
14 Group:          Libraries/Python
15 Source0:        http://lxml.de/files/%{module}-%{version}.tgz
16 # Source0-md5:  ca2f02fd762f3614a1930c568847052b
17 URL:            http://lxml.de/
18 BuildRequires:  libxml2-devel >= 1:2.7.8
19 BuildRequires:  libxslt-devel >= 1.1.26
20 %if %{with python2}
21 BuildRequires:  python-devel >= 1:2.4
22 BuildRequires:  python-modules
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-Cython > 0.17
26 BuildRequires:  python3-devel
27 BuildRequires:  python3-modules
28 %endif
29 BuildRequires:  rpm-pythonprov
30 BuildRequires:  rpmbuild(macros) >= 1.219
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
35
36 %description -l pl.UTF-8
37 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
38
39 %package -n python3-%{module}
40 Summary:        Python 3 binding for the libxml2 and libxslt libraries
41 Summary(pl.UTF-8):      Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
42 Group:          Libraries/Python
43
44 %description -n python3-%{module}
45 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
46
47 %description -n python3-%{module} -l pl.UTF-8
48 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
49
50 %package apidocs
51 Summary:        lxml API documentation
52 Summary(pl.UTF-8):      Dokumentacja API modułu lxml
53 Group:          Documentation
54
55 %description apidocs
56 lxml API documentation.
57
58 %description apidocs -l pl.UT8-8
59 Dokumentacja API modułu lxml.
60
61 %prep
62 %setup -q -n %{module}-%{version}
63
64 %build
65 %if %{with python2}
66 %{__python} setup.py build
67 %endif
68 %if %{with python3}
69 %{__python3} setup.py build
70 %endif
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 %if %{with python2}
76 %{__python} setup.py \
77         install \
78         --root=$RPM_BUILD_ROOT \
79         --optimize=2
80
81 %py_postclean
82 %endif
83
84 %if %{with python3}
85 %{__python3} setup.py \
86         install \
87         --root=$RPM_BUILD_ROOT \
88         --optimize=2
89 %endif
90
91 # cleanup for packaging
92 rm -rf docs
93 cp -a doc docs
94 # apidocs packaged separately
95 rm -rf docs/html
96 # build docs not useful at runtime
97 rm docs/build.txt
98 # common licenses
99 rm docs/licenses/{BSD,GPL}.txt
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %files
106 %defattr(644,root,root,755)
107 %doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
108 %dir %{py_sitedir}/lxml
109 %{py_sitedir}/lxml/*.py[co]
110 %{py_sitedir}/lxml/lxml.etree*.h
111 %{py_sitedir}/lxml/includes
112 %{py_sitedir}/lxml/isoschematron
113 %dir %{py_sitedir}/lxml/html
114 %{py_sitedir}/lxml/html/*.py[co]
115 %attr(755,root,root) %{py_sitedir}/lxml/etree.so
116 %attr(755,root,root) %{py_sitedir}/lxml/objectify.so
117 %{py_sitedir}/lxml-*.egg-info
118 %endif
119
120 %if %{with python3}
121 %files -n python3-%{module}
122 %defattr(644,root,root,755)
123 %doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
124 %dir %{py3_sitedir}/lxml
125 %attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
126 %attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
127 %{py3_sitedir}/lxml/*.py
128 %{py3_sitedir}/lxml/__pycache__
129 %{py3_sitedir}/lxml/lxml.etree*.h
130 %{py3_sitedir}/lxml/includes
131 %{py3_sitedir}/lxml/isoschematron
132 %{py3_sitedir}/lxml/html
133 %{py3_sitedir}/lxml-*.egg-info
134 %endif
135
136 %if %{with apidocs}
137 %files apidocs
138 %defattr(644,root,root,755)
139 %doc doc/html/*
140 %endif
This page took 0.035733 seconds and 2 git commands to generate.