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