python-flickrapi/python-flickrapi.spec
2012-01-12 12:54:48 +00:00

71 lines
2.3 KiB
RPMSpec

#
# spec file for package python-flickrapi
#
# 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-flickrapi
Version: 1.4.2
Release: 0
Url: http://stuvel.eu/projects/flickrapi
Summary: Python interface to Flickr
License: Python-2.0
Group: Development/Libraries/Python
Source: flickrapi-%{version}.zip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-docutils
BuildRequires: python-devel
BuildRequires: python-distribute
BuildRequires: python-xml
BuildRequires: unzip
Requires: python-xml
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1010
BuildRequires: fdupes
%endif
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%endif
Provides: python-flickrapi-doc = %{version}
Obsoletes: python-flickrapi-doc < %{version}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
The easiest to use, most complete, and most actively developed
Python interface to the Flickr API. It includes support for
authorized and non-authorized access, uploading and replacing
photos, and all Flickr API functions.
%prep
%setup -q -n flickrapi-%{version}
sed -i "1d" flickrapi/__init__.py # Fix non-executable script
%build
python setup.py build
cd doc && make # Build HTML documentation
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm -rf %{buildroot}/usr/{{LICENSE,README,UPGRADING},share/doc/flickrapi-%{version}} # Remove wrongly installed documentation
%files
%defattr(-,root,root)
%doc LICENSE README UPGRADING
%{python_sitelib}/*
%changelog