%global srcname flask_oidc %global tar_name flask-oidc %global sum An openID Connect support for Flask %if 0%{?fedora} %global with_python3 1 %endif Name: python-%{tar_name} Version: 1.0.1 Release: 1%{?dist} Summary: %{sum} License: BSD URL: https://github.com/puiterwijk/flask-oidc Source0: https://pypi.io/packages/source/f/flask-oidc/%{tar_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-devel %description OpenID Connect support for Flask. This library should work with any standards compliant OpenID Connect provider. It has been tested with: Google+ Login, Ipsilon %package -n python2-%{tar_name} Summary: %{sum} Requires: python-setuptools Requires: python-flask Requires: python-itsdangerous Requires: python-oauth2client Requires: python-six BuildRequires: python-flask BuildRequires: python-itsdangerous BuildRequires: python-oauth2client BuildRequires: python-six BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: python-nose BuildRequires: python-mock %{?python_provide:%python_provide python2-%{tar_name}} %description -n python2-%{tar_name} Currently designed around Google’s oauth2client library and OpenID Connect implementation. May or may not interoperate with other OpenID Connect identity providers, for example, Microsoft’s Azure Active Directory %if 0%{?with_python3} %package -n python3-%{tar_name} Summary: %{sum} Requires: python3-setuptools Requires: python3-flask Requires: python3-itsdangerous Requires: python3-oauth2client Requires: python3-six BuildRequires: python3-flask BuildRequires: python3-itsdangerous BuildRequires: python3-oauth2client BuildRequires: python3-six BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-nose BuildRequires: python3-mock %{?python_provide:%python_provide python3-%{tar_name}} %description -n python3-%{tar_name} Currently designed around Google’s oauth2client library and OpenID Connect implementation. May or may not interoperate with other OpenID Connect identity providers, for example, Microsoft’s Azure Active Directory %endif %prep %autosetup -n %{tar_name}-%{version} %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %check %{__python2} setup.py test # Currently failing %if 0%{?with_python3} %{__python3} setup.py test %endif %files -n python2-%{tar_name} %doc README.rst %license LICENSE.txt %{python2_sitelib}/%{srcname}/ %{python_sitelib}/*.egg-info/ %if 0%{?with_python3} %files -n python3-%{tar_name} %doc README.rst %license LICENSE.txt %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/*.egg-info/ %{_bindir}/oidc-register %endif %changelog * Tue May 31 2016 - 0.1.2 - Working on initial spec file