Blob Blame History Raw
%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-cla
Version:        1.2
Release:        1%{?dist}
Summary:        CLA extension for python-openid

License:        BSD
URL:            https://github.com/puiterwijk/python-openid-cla
Source:         https://github.com/puiterwijk/python-openid-cla/releases/download/v%{version}/python-openid-cla-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-openid
Requires:       python-openid

Provides:       python2-openid-cla

%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-openid
%endif

%description
CLA extension implementation for python-openid

%if 0%{?with_python3}
%package -n python3-openid-cla
Summary:        OpenID support for Flask
Group:          Development/Libraries
Requires:       python3-openid

%description -n python3-openid-cla
CLA 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-cla
%{python3_sitelib}/*

%endif # with_python3


%changelog
* Thu Feb 18 2016 Patrick Uiterwijk <puiterwijk@redhat.com> - 1.2-1
- Rebase to 1.2 to introduce python3 support

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

* 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

* Sat Jun 02 2013 Patrick Uiterwijk <puiterwijk@gmail.com> - 1.0-1
- Initial packaging