]> git.pld-linux.org Git - packages/python-pyquery.git/blob - python-pyquery.spec
678848627e953cbc89d042fe40ec04b21a7a55c9
[packages/python-pyquery.git] / python-pyquery.spec
1 #
2 # Conditional build:
3 %bcond_without  doc             # don't build doc
4 %bcond_without  tests   # do not perform "make test"
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.2.9
13 Release:        6
14 License:        BSD
15 Group:          Development/Languages/Python
16 # Source0:      http://pypi.python.org/packages/source/p/pyquery/%{module}-%{version}.tar.gz
17 Source0:        https://github.com/gawel/pyquery/archive/%{version}.tar.gz
18 # Source0-md5:  902e2ded38899c7c3f66cba6d4a464fb
19 URL:            http://pypi.python.org/pypi/pyquery
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.710
22 %if %{with python2}
23 BuildRequires:  python-devel
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-WebOb
27 BuildRequires:  python-cssselect
28 BuildRequires:  python-webtest
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-devel
33 BuildRequires:  python3-modules
34 BuildRequires:  python3-setuptools
35 %if %{with tests}
36 BuildRequires:  python3-WebOb
37 BuildRequires:  python3-cssselect
38 BuildRequires:  python3-webtest
39 %endif
40 %endif
41 Requires:       python-cssselect
42 Requires:       python-lxml
43 Requires:       python-modules
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 Pyquery allows you to make jquery queries on xml documents. The API is
49 as much as possible the similar to jquery. pyquery uses lxml for fast
50 xml and html manipulation.
51
52 %description -l pl.UTF-8
53 Pyquery pozwala na wykonywanie zapytań jquery na dokumentach XML.
54 Interfejs jest jak to tylko możliwe podobny do jquery. Pyquery używa
55 lxml do szybkiej manipulacji plików XML i HTML.
56
57 %package -n python3-%{module}
58 Summary:        A jquery-like library for Python
59 Summary(pl.UTF-8):      Podobna do jquery biblioteka dla Pythona
60 Group:          Libraries/Python
61 Requires:       python3-cssselect
62 Requires:       python3-lxml
63 Requires:       python3-modules
64
65 %description -n python3-%{module}
66 Pyquery allows you to make jquery queries on xml documents. The API is
67 as much as possible the similar to jquery. pyquery uses lxml for fast
68 xml and html manipulation.
69
70 %description -n python3-%{module} -l pl.UTF-8
71 Pyquery pozwala na wykonywanie zapytań jquery na dokumentach XML.
72 Interfejs jest jak to tylko możliwe podobny do jquery. Pyquery używa
73 lxml do szybkiej manipulacji plików XML i HTML.
74
75 %prep
76 %setup -q -n %{module}-%{version}
77
78 %build
79 %if %{with python2}
80 %py_build %{?with_tests:test}
81 %endif
82
83 %if %{with python3}
84 %py3_build %{?with_tests:test}
85 %endif
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %py_install
92
93 %py_postclean
94 %endif
95
96 %if %{with python3}
97 %py3_install
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
105 %defattr(644,root,root,755)
106 %dir %{py_sitescriptdir}/%{module}
107 %{py_sitescriptdir}/%{module}/*.py[co]
108 %{py_sitescriptdir}/pyquery-*.egg-info
109 %endif
110
111 %if %{with python3}
112 %files -n python3-%{module}
113 %defattr(644,root,root,755)
114 %{py3_sitescriptdir}/%{module}
115 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
116 %endif
This page took 0.046524 seconds and 2 git commands to generate.