File python-feedcache.spec of Package python-feedcache

#
# spec file for package python-feedcache
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           python-feedcache
Version:        1.3.1
Release:        0
URL:            http://www.doughellmann.com/projects/feedcache/
Summary:        Wrapper for Mark Pilgrim's FeedParser module which caches feed content
License:        MIT
Group:          Development/Languages/Python
Source0:        http://www.doughellmann.com/downloads/feedcache-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-feedparser
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif
%endif
%{!?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)")}

%description
A class to wrap Mark Pilgrim's FeedParser module so that parameters can be used
to cache the feed results locally instead of fetching the feed every time it is
requested. Uses both etag and modified times for caching. The cache is
parameterized to use different backend storage options.

%prep
%setup -q -n feedcache-%{version}

%build
export CFLAGS="%{optflags}"
python setup.py build

%install
python setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot}
chmod 0755 %{buildroot}%{python_sitelib}/feedcache/{__init__,test_cache,test_server,test_cachestoragelock,test_shovefilesystem,cachestoragelock,example,cache,example_threads}.py

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by