Blob Blame Raw
%global srcname flickrapi

Name:           python-%{srcname}
Version:        2.2.1
Release:        1%{?dist}
Summary:        Python module for interfacing with the Flickr API
License:        Python
URL:            http://stuvel.eu/%{srcname}
Source0:        https://files.pythonhosted.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch

BuildRequires:  python-devel
BuildRequires:  python-setuptools

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
A Python module for interfacing with the Flickr API.


%package -n python2-%{srcname}
Summary:  %{summary}
Requires:  python-six
Requires:  python-requests
Requires:  python-requests-toolbelt
Requires:  python-requests-oauthlib
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
A Python 2 tool which provides a convenient example.

%package -n python3-%{srcname}
Summary:  %{summary}
Requires:  python3-six
Requires:  python3-requests
Requires:  python3-requests-toolbelt
Requires:  python3-requests-oauthlib
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
A Python 3 tool which provides a convenient example.


%prep
%setup -q -n %{srcname}-%{version}
# Remove bundled egg-info
rm -rf %{srcname}.egg-info


%build
%py2_build
%py3_build


%install
%py2_install
%py3_install

sed -i -e "s|#!/usr/bin/env python||" %{buildroot}/%{python_sitelib}/flickrapi/__init__.py


%files -n python2-%{srcname}
%doc UPGRADING.txt
%license LICENSE.txt
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}-%{version}-py*.egg-info
%exclude %{python2_sitelib}/LICENSE.txt
%exclude %{python2_sitelib}/UPGRADING.txt

%files -n python3-%{srcname}
%doc UPGRADING.txt
%license LICENSE.txt
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py*.egg-info
%exclude %{python3_sitelib}/LICENSE.txt
%exclude %{python3_sitelib}/UPGRADING.txt


%changelog
* Tue Mar 28 2017 Iryna Shcherbina <ishcherb@redhat.com> - 2.2.1-1
- Update to 2.2.1

* Tue Mar 28 2017 Dominika Krejci <dkrejci@redhat.com> - 2.1.2-1
- Update to 2.1.2
- Add Python 3
- Remove setuptools.patch as it is upstream

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-10
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Maxim Burgerhout <wzzrd@fedoraproject.org.> 1.4.2-6
- Fixing breakage caused by distribute

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Mar 24 2011 Maxim Burgerhout <wzzrd@fedoraproject.org> - 1.4-1
- "New" upstream release
- Using auth_callback=False when authentication is actually required now raises
  a FlickrError exception.
- The implementation uses self.flickr_host so that subclasses can override the
  API URLs.
- Support for short URLs was added.
- Changed source url to .zip because .tar.gz no longer seems to be available

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.3-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Sun Jan 24 2010 Ian Weller <ian@ianweller.org> - 1.3-2
- rebuild with inclusion of new tarball

* Sun Jan 24 2010 Ian Weller <ian@ianweller.org> - 1.3-1
- 1.3

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Dec 17 2008 Ian Weller <ianweller@gmail.com> 1.2-1
- 1.2
- Update URL and Source0 locations

* Tue Nov 11 2008 Ian Weller <ianweller@gmail.com> 1.1-5
- More specfile cleanup

* Wed Oct 22 2008 Ian Weller <ianweller@gmail.com> 1.1-4
- Remove python_sitearch variable
- Some specfile cleanup

* Tue Aug 05 2008 Kushal Das <kushal@fedoraproject.org> 1.1-3
- Fixed sha-bang in __init__.py

* Mon Aug 04 2008 Kushal Das <kushal@fedoraproject.org> 1.1-2
- Fixed build requires and %%files section

* Sun Aug 03 2008 Kushal Das <kushal@fedoraproject.org> 1.1-1
- Initial release