]> git.pld-linux.org Git - packages/python-pyquery.git/blob - python-pyquery.spec
7ca0a84068f5c89319a8cef94d01b897ebcbe133
[packages/python-pyquery.git] / python-pyquery.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_with     tests   # unit tests (some using network)
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  pyquery
9 Summary:        A jquery-like library for Python
10 Summary(pl.UTF-8):      Podobna do jquery biblioteka dla Pythona
11 Name:           python-%{module}
12 Version:        1.4.1
13 Release:        2
14 License:        BSD
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/pyquery/
17 Source0:        http://files.pythonhosted.org/packages/source/p/pyquery/%{module}-%{version}.tar.gz
18 # Source0-md5:  7445c6de6db6618bf0670f624f2a82d4
19 URL:            http://pypi.org/project/pyquery/
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 %if %{with python2}
23 BuildRequires:  python-devel >= 1:2.7
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-WebOb
27 BuildRequires:  python-cssselect > 0.7.9
28 BuildRequires:  python-lxml >= 2.1
29 BuildRequires:  python-nose
30 BuildRequires:  python-webtest
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-devel >= 1:3.5
35 BuildRequires:  python3-setuptools
36 %if %{with tests}
37 BuildRequires:  python3-WebOb
38 BuildRequires:  python3-cssselect > 0.7.9
39 BuildRequires:  python3-lxml >= 2.1
40 BuildRequires:  python3-nose
41 BuildRequires:  python3-webtest
42 %endif
43 %endif
44 %if %{with doc}
45 BuildRequires:  sphinx-pdg
46 %endif
47 Requires:       python-modules >= 1:2.7
48 BuildArch:      noarch
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 Pyquery allows you to make jquery queries on xml documents. The API is
53 as much as possible the similar to jquery. pyquery uses lxml for fast
54 xml and html manipulation.
55
56 %description -l pl.UTF-8
57 Pyquery pozwala na wykonywanie zapytań jquery na dokumentach XML.
58 Interfejs jest jak to tylko możliwe podobny do jquery. Pyquery używa
59 lxml do szybkiej manipulacji plików XML i HTML.
60
61 %package -n python3-%{module}
62 Summary:        A jquery-like library for Python
63 Summary(pl.UTF-8):      Podobna do jquery biblioteka dla Pythona
64 Group:          Libraries/Python
65 Requires:       python3-modules >= 1:3.5
66
67 %description -n python3-%{module}
68 Pyquery allows you to make jquery queries on xml documents. The API is
69 as much as possible the similar to jquery. pyquery uses lxml for fast
70 xml and html manipulation.
71
72 %description -n python3-%{module} -l pl.UTF-8
73 Pyquery pozwala na wykonywanie zapytań jquery na dokumentach XML.
74 Interfejs jest jak to tylko możliwe podobny do jquery. Pyquery używa
75 lxml do szybkiej manipulacji plików XML i HTML.
76
77 %package apidocs
78 Summary:        API documentation for Python pyquery module
79 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona pyquery
80 Group:          Documentation
81
82 %description apidocs
83 API documentation for Python pyquery module.
84
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API modułu Pythona pyquery.
87
88 %prep
89 %setup -q -n %{module}-%{version}
90
91 %build
92 %if %{with python2}
93 %py_build
94
95 %if %{with tests}
96 nosetests-%{py_ver} tests
97 %endif
98 %endif
99
100 %if %{with python3}
101 %py3_build
102
103 %if %{with tests}
104 nosetests-%{py3_ver} tests
105 %endif
106 %endif
107
108 %if %{with doc}
109 PYTHONPATH=$(pwd) \
110 %{__make} -C docs html \
111         SPHINXBUILD=sphinx-build
112 %endif
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python2}
118 %py_install
119
120 %py_postclean
121 %endif
122
123 %if %{with python3}
124 %py3_install
125 %endif
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %if %{with python2}
131 %files
132 %defattr(644,root,root,755)
133 %doc CHANGES.rst LICENSE.txt README.rst
134 %{py_sitescriptdir}/pyquery
135 %{py_sitescriptdir}/pyquery-%{version}-py*.egg-info
136 %endif
137
138 %if %{with python3}
139 %files -n python3-%{module}
140 %defattr(644,root,root,755)
141 %doc CHANGES.rst LICENSE.txt README.rst
142 %{py3_sitescriptdir}/pyquery
143 %{py3_sitescriptdir}/pyquery-%{version}-py*.egg-info
144 %endif
145
146 %if %{with doc}
147 %files apidocs
148 %defattr(644,root,root,755)
149 %doc docs/_build/html/{_static,*.html,*.js}
150 %endif
This page took 0.086574 seconds and 2 git commands to generate.