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:        10%{?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:  python2-setuptools
BuildRequires:  python2-openid

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

%global _description\
CLA extension implementation for python-openid

%description %_description

%package -n python2-openid-cla
Summary: %summary
Requires:       python2-openid
Provides:       python2-openid-cla
%{?python_provide:%python_provide python2-openid-cla}

%description -n python2-openid-cla %_description

%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
%py2_build

%if 0%{?with_python3}
%{__python3} setup.py build
%endif


%install
%py2_install

%if 0%{?with_python3}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
%endif

 
%files -n python2-openid-cla
# TODO: Upstream error: no COPYING in latest release
#%doc COPYING
%{python2_sitelib}/*

%if 0%{?with_python3}
%files -n python3-openid-cla
%{python3_sitelib}/*

%endif # with_python3


%changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.2-9
- Rebuilt for Python 3.7

* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.2-8
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.2-6
- Python 2 binary package renamed to python2-openid-cla
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

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

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.2-3
- Rebuild for Python 3.6

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

* 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