%if 0%{?rhel}
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%global with_python3 0
%else
%global with_python3 1
%endif
Name: python-openid-teams
Version: 1.1
Release: 5%{?dist}
Summary: Teams extension for python-openid
License: BSD
URL: https://github.com/puiterwijk/python-openid-teams
Source: https://github.com/puiterwijk/python-openid-teams/releases/download/v%{version}/python-openid-teams-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-openid
Requires: python-openid
Provides: python2-openid-teams
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-openid
%endif
%description
Teams extension implementation for python-openid
%if 0%{?with_python3}
%package -n python3-openid-teams
Summary: OpenID support for Flask
Group: Development/Libraries
Requires: python3-openid
%description -n python3-openid-teams
Teams extension implementation for python-openid
This package includes the python 3 version of the module.
%endif # with_python3
%prep
%setup -q
%build
%{__python} setup.py build
%if 0%{?with_python3}
%{__python3} setup.py build
%endif
%install
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%if 0%{?with_python3}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
%endif
%files
# TODO: Upstream error: no COPYING in latest release
#%doc COPYING
%{python_sitelib}/*
%if 0%{?with_python3}
%files -n python3-openid-teams
%{python3_sitelib}/*
%endif # with_python3
%changelog
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.1-5
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Mon Oct 19 2015 Patrick Uiterwijk <puiterwijk@redhat.com> - 1.1-1
- Rebase to v1.1, adding python3 support
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu May 16 2013 Patrick Uiterwijk <puiterwijk@gmail.com> - 1.0-1
- Initial packaging