Blob Blame History Raw
%if 0%{?fedora} > 12
%global with_python3 1
%endif

%global modname repoze.who

Name:           python-repoze-who
Version:        2.1
Release:        5%{?dist}
Summary:        An identification and authentication framework for WSGI

Group:          Development/Languages
License:        BSD
URL:            http://pypi.python.org/pypi/%{modname}
Source0:        http://pypi.python.org/packages/source/r/%{modname}/%{modname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-nose
BuildRequires:  python-zope-interface
BuildRequires:  python-coverage
BuildRequires:  python-webob

Requires:       python-setuptools
Requires:       python-zope-interface
Requires:       python-webob

%if 0%{?with_python3}
BuildRequires:      python3-devel
BuildRequires:      python3-nose
BuildRequires:      python3-coverage
BuildRequires:      python3-zope-interface
BuildRequires:      python3-webob

Requires:           python3-setuptools
Requires:           python3-zope-interface
Requires:           python3-webob
%endif


%description
repoze.who is an identification and authentication framework for arbitrary WSGI
applications.  It acts as WSGI middleware.

repoze.who is inspired by Zope 2's Pluggable Authentication Service (PAS) (but
repoze.who is not dependent on Zope in any way; it is useful for any WSGI
application).  It provides no facility for authorization (ensuring whether a
user can or cannot perform the operation implied by the request).  This is
considered to be the domain of the WSGI application.


%if 0%{?with_python3}
%package -n python3-repoze-who
Summary:        An identification and authentication framework for WSGI
Group:          Development/Languages

%description -n python3-repoze-who
repoze.who is an identification and authentication framework for arbitrary WSGI
applications.  It acts as WSGI middleware.

repoze.who is inspired by Zope 2's Pluggable Authentication Service (PAS) (but
repoze.who is not dependent on Zope in any way; it is useful for any WSGI
application).  It provides no facility for authorization (ensuring whether a
user can or cannot perform the operation implied by the request).  This is
considered to be the domain of the WSGI application.
%endif

%prep
%setup -q -n %{modname}-%{version}

# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif

%build
%{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif


%install
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
popd
%endif

%check
PYTHONPATH=$(pwd) %{__python} setup.py test
%if 0%{?with_python3}
PYTHONPATH=$(pwd) %{__python3} setup.py test
%endif

%clean
rm -rf $RPM_BUILD_ROOT


%files
%doc README.txt COPYRIGHT.txt LICENSE.txt
%{python_sitelib}/repoze/who/
%{python_sitelib}/%{modname}-*

%if 0%{?with_python3}
%files -n python3-repoze-who
%doc README.txt COPYRIGHT.txt LICENSE.txt
%{python3_sitelib}/repoze/who/
%{python3_sitelib}/%{modname}-*
%endif


%changelog
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Apr 04 2013 Luke Macken <lmacken@redhat.com> - 2.1-1
- Update to 2.1
- Add a python3 subpackage
- Remove setuptools patch

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.18-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.18-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.18-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.18-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Jul 26 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.18-4
- Add missing BR: python-coverage

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0.18-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Tue May 04 2010 Luke Macken <lmacken@redhat.com> - 1.0.18-2
- Run the test suite in %%check

* Mon Apr 26 2010 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 1.0.18-1
- Update to the latest upstream release.

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed May 06 2009 Luke Macken <lmacken@redhat.com> - 1.0.13-1
- Update to the latest upstream release.

* Tue Oct 21 2008 Luke Macken <lmacken@redhat.com> - 1.0.7-1
- Initial package