15
0
2017-05-17 08:19:09 +00:00
committed by Git OBS Bridge
parent e0b79bc5aa
commit b868fe0833
5 changed files with 44 additions and 74 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-flickrapi
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# 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
@@ -11,39 +11,39 @@
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-flickrapi
Version: 2.3
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
Source0: https://pypi.io/packages/source/f/flickrapi/flickrapi-%{version}.tar.gz
Source0: flickrapi-%{version}.zip
Patch0: flickrapi-drop-bootstrap-distribute.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module requests }
BuildRequires: %{python_module requests-oauthlib }
BuildRequires: %{python_module requests-toolbelt }
BuildRequires: %{python_module setuptools }
BuildRequires: %{python_module six }
BuildRequires: fdupes
BuildRequires: python-docutils
BuildRequires: python-devel
BuildRequires: python-rpm-macros
Requires: python-requests >= 2.4.3
Requires: python-requests-oauthlib >= 0.4.2
Requires: python-requests-toolbelt >= 0.3.1
Requires: python-six >= 1.8.0
%ifpython2
BuildRequires: python-setuptools
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}
%endif
BuildArch: noarch
%python_subpackages
%{!?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
@@ -54,18 +54,19 @@ photos, and all Flickr API functions.
%prep
%setup -q -n flickrapi-%{version}
sed -i "1d" flickrapi/__init__.py # Fix non-executable script
%patch0 -p1
%build
%python_build
python setup.py build
cd doc && make # Build HTML documentation
%install
%python_install
rm -rf %{buildroot}%{python_sitelib}/*.txt # Remove wrongly installed documentation
%fdupes %{buildroot}/%{_prefix}
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm -rf %{buildroot}/usr/{{LICENSE,README,UPGRADING},share/doc/flickrapi-%{version}} # Remove wrongly installed documentation
%files %{python_files}
%files
%defattr(-,root,root)
%doc LICENSE.txt README.md
%doc LICENSE README UPGRADING
%{python_sitelib}/*
%changelog