OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyquery?expand=0&rev=1
60 lines
1.9 KiB
RPMSpec
60 lines
1.9 KiB
RPMSpec
# vim: set sw=4 ts=4 et:
|
||
|
||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||
|
||
Name: python-pyquery
|
||
Version: 0.7
|
||
Release: 0
|
||
Summary: XML Querying Module for Python
|
||
Source: https://bitbucket.org/olauzanne/pyquery/get/34bdaa6c7908.tar.bz2
|
||
URL: https://bitbucket.org/olauzanne/pyquery/
|
||
Group: Development/Libraries/Python
|
||
License: BSD3c
|
||
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
||
BuildRequires: python-devel
|
||
BuildRequires: python-setuptools
|
||
%if 0%{?suse_version} >= 1120
|
||
BuildArch: noarch
|
||
%endif
|
||
%py_requires
|
||
|
||
%description
|
||
pyquery allows you to make jquery queries on xml documents. The API is as much
|
||
as possible the similar to jquery. pyquery uses lxml for fast xml and html
|
||
manipulation.
|
||
|
||
This is not (or at least not yet) a library to produce or interact with
|
||
javascript code. I just liked the jquery API and I missed it in python so I
|
||
told myself “Hey let’s make jquery in python”. This is the result.
|
||
|
||
It can be used for many purposes, one idea that I might try in the future is to
|
||
use it for templating with pure http templates that you modify using pyquery. I
|
||
can also be used for web scrapping or for theming applications with
|
||
Deliverance.
|
||
|
||
%prep
|
||
%setup -q -n olauzanne-pyquery-34bdaa6c7908
|
||
|
||
%build
|
||
%__python ./setup.py build
|
||
|
||
%install
|
||
%__python ./setup.py install \
|
||
--prefix="%{_prefix}" \
|
||
--root="%{buildroot}" \
|
||
--record-rpm=files.lst
|
||
|
||
%__rm "%{buildroot}%{python_sitelib}/pyquery"/*.txt
|
||
%__perl -ni -e 'print unless m,\.txt$,' files.lst
|
||
|
||
%clean
|
||
%{?buildroot:%__rm -rf "%{buildroot}"}
|
||
|
||
%files -f files.lst
|
||
%defattr(-,root,root)
|
||
%doc LICENSE.txt
|
||
%doc docs/*.txt
|
||
|
||
|