From 010e714f3869d8c5cb29e1331d5186eec92701e7 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Mar 29 2017 13:33:07 +0000 Subject: Initial import #1434997. --- diff --git a/python-openidc-client.spec b/python-openidc-client.spec new file mode 100644 index 0000000..5433f03 --- /dev/null +++ b/python-openidc-client.spec @@ -0,0 +1,104 @@ +%global srcname openidc-client +%global pkgname openidc_client + +%global commit 5456800bb2e4b54a7a36c9749cf5614079cc88b3 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +%if 0%{?rhel} && 0%{?rhel} <= 7 +%bcond_with python3 +%else +%bcond_without python3 +%endif + +Name: python-%{srcname} +Version: 0 +Release: 3.20170327git%{shortcommit}%{?dist} +Summary: Python OpenID Connect client with token caching and management + +License: MIT +URL: https://github.com/puiterwijk/%{name} +Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz + +BuildArch: noarch + +%description +%{summary}. + +%package -n python2-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{srcname}} +BuildRequires: python2-devel +%if 0%{?rhel} && 0%{?rhel} <= 7 +BuildRequires: python-setuptools +BuildRequires: python-mock +BuildRequires: python-requests +Requires: python-requests +%else +BuildRequires: python2-setuptools +BuildRequires: python2-mock +BuildRequires: python2-requests +Requires: python2-requests +%endif + +%description -n python2-%{srcname} +%{summary}. + +Python 2 version. + +%if %{with python3} +%package -n python3-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{srcname}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-requests +Requires: python3-requests + +%description -n python3-%{srcname} +%{summary}. + +Python 3 version. +%endif + +%prep +%autosetup -n %{name}-%{commit} + +%build +%py2_build +%py3_build + +%install +%py2_install +%py3_install + +%check +%{__python2} setup.py test +%{__python3} setup.py test + +%files -n python2-openidc-client +%license COPYING +%doc README.md +%{python2_sitelib}/%{pkgname}-*.egg-info/ +%{python2_sitelib}/%{pkgname}/ + +%if %{with python3} +%files -n python3-openidc-client +%license COPYING +%doc README.md +%{python3_sitelib}/%{pkgname}-*.egg-info/ +%{python3_sitelib}/%{pkgname}/ +%endif + +%changelog +* Mon Mar 27 2017 Mohan Boddu - 0-3.20170327git5456800 +- Changed the version number to use date +- Using package name in URL + +* Fri Mar 24 2017 Mohan Boddu - 0-2.git5456800 +- Skip tests on setup.py install +- Adding Requires on python{2,3}-requests +- Adding %py{2,3}_build macros +- Adding %py{2,3}_install macros + +* Mon Mar 20 2017 Mohan Boddu - 0-1 +- Initial packaging of python-openidc-client