cb630b
%if 0%{?fedora}
cb630b
%global with_python3 1
cb630b
%{!?py3ver: %global py3ver %(%{__python3} -c "import sys ; print(sys.version[:3])")}
cb630b
%endif
cb630b
cb630b
%{!?py2ver: %global py2ver %(%{__python} -c "import sys ; print sys.version[:3]")}
cb630b
cb630b
%global modname webob
cb630b
cb630b
Name:           python-webob
cb630b
Summary:        WSGI request and response object
cb630b
Version:        1.2.3
e56ae5
Release:        7%{?dist}
cb630b
License:        MIT
cb630b
Group:          System Environment/Libraries
cb630b
URL:            http://pythonpaste.org/webob/
cb630b
Source0:        http://pypi.python.org/packages/source/W/WebOb/WebOb-%{version}.tar.gz
cb630b
Source1:        README.Fedora
cb630b
cb630b
# https://github.com/Pylons/webob/issues/75
cb630b
# Fix build/test issue on python 3
cb630b
Patch1:         webob-1.2.3-test-headers2-fix.patch
e56ae5
# Fix the generation of the hash of the message body, in fips mode
e56ae5
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=976661
e56ae5
Patch2:			fix-fips-hash-generation.patch
cb630b
cb630b
BuildArch:      noarch
cb630b
BuildRequires:  python2-devel
cb630b
BuildRequires:  python-setuptools
cb630b
BuildRequires:  python-nose
cb630b
BuildRequires:  python-dtopt
cb630b
BuildRequires:  python-tempita
cb630b
BuildRequires:  python-webtest
cb630b
cb630b
%if 0%{?with_python3}
cb630b
BuildRequires:  python3-devel
cb630b
BuildRequires:  python3-setuptools
cb630b
BuildRequires:  python3-nose
cb630b
%endif
cb630b
cb630b
Provides: python-webob1.2 = %{version}-%{release}
cb630b
Obsoletes: python-webob1.2 < 1.2.3-4
cb630b
cb630b
%description
cb630b
WebOb provides wrappers around the WSGI request environment, and an object to 
cb630b
help create WSGI responses. The objects map much of the specified behavior of 
cb630b
HTTP, including header parsing and accessors for other standard parts of the 
cb630b
environment.
cb630b
cb630b
%if 0%{?with_python3}
cb630b
%package -n python3-webob
cb630b
Summary:        WSGI request and response object
cb630b
Group:          System Environment/Libraries
cb630b
cb630b
Requires:       python3
cb630b
cb630b
%description -n python3-webob
cb630b
WebOb provides wrappers around the WSGI request environment, and an object to 
cb630b
help create WSGI responses. The objects map much of the specified behavior of 
cb630b
HTTP, including header parsing and accessors for other standard parts of the 
cb630b
environment.
cb630b
%endif
cb630b
cb630b
%prep
cb630b
%setup -q -n WebOb-%{version}
cb630b
cp -p %{SOURCE1} .
cb630b
# Disable performance_test, which requires repoze.profile, which isn't
cb630b
# in Fedora.
cb630b
%{__rm} -f tests/performance_test.py
cb630b
cb630b
%patch1 -p1 -b .test_headers2
e56ae5
%patch2 -p1
cb630b
cb630b
%if 0%{?with_python3}
cb630b
rm -rf %{py3dir}
cb630b
cp -a . %{py3dir}
cb630b
%endif
cb630b
cb630b
%build
cb630b
%{__python} setup.py build
cb630b
cb630b
%if 0%{?with_python3}
cb630b
pushd %{py3dir}
cb630b
%{__python3} setup.py build
cb630b
popd
cb630b
%endif
cb630b
cb630b
%install
cb630b
%if 0%{?with_python3}
cb630b
pushd %{py3dir}
cb630b
%{__python3} setup.py install --skip-build --root %{buildroot}
cb630b
#%{__chmod} 0644 %{buildroot}%{python3_sitelib}/WebOb-%{version}-*.egg/%{modname}/*.py
cb630b
popd
cb630b
%endif
cb630b
cb630b
%{__mkdir} -p %{buildroot}%{python_sitelib}
cb630b
%{__python} setup.py install --skip-build --root %{buildroot}
cb630b
#%{__chmod} 0644 %{buildroot}%{python_sitelib}/WebOb-%{version}-*.egg/%{modname}/*.py
cb630b
cb630b
%check
cb630b
%{__python} setup.py test
cb630b
cb630b
%if 0%{?with_python3}
cb630b
pushd %{py3dir}
cb630b
%{__python3} setup.py test
cb630b
popd
cb630b
%endif
cb630b
cb630b
%files
cb630b
%doc docs/* README.Fedora
cb630b
%{python_sitelib}/webob/
cb630b
%{python_sitelib}/WebOb-%{version}-py%{py2ver}.egg-info
cb630b
cb630b
%if 0%{?with_python3}
cb630b
%files -n python3-webob
cb630b
%doc docs/* README.Fedora
cb630b
%{python3_sitelib}/webob/
cb630b
%{python3_sitelib}/WebOb-%{version}-py%{py3ver}.egg-info
cb630b
%endif
cb630b
cb630b
%changelog
e56ae5
* Wed Jan 25 2017 Charalampos Stratakis <cstratak@redhat.com> - 1.2.3-7
e56ae5
- Fix hash generation of message body in fips mode
e56ae5
Resolves: rhbz#976661
e56ae5
e2efa2
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.2.3-6
e2efa2
- Mass rebuild 2013-12-27
e2efa2
cb630b
* Tue May  7 2013 Luke Macken <lmacken@redhat.com> - 1.2.3-5
cb630b
- Remove the python-wsgiproxy build requirement (#960463)
cb630b
cb630b
* Tue Apr  2 2013 Luke Macken <lmacken@redhat.com> - 1.2.3-4
cb630b
- Rebase with and obsolete the python-webob1.2 forward-compat package
cb630b
cb630b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-3
cb630b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
cb630b
cb630b
* Thu Jan 10 2013 Pádraig Brady <P@draigBrady.com> - 1.2.3-2
cb630b
- Update to WebOb-1.2.3
cb630b
cb630b
* Wed Jan 09 2013 Matthias Runge <mrunge@redhat.com> - 1.1.1-4
cb630b
- fix deprecation warning (rhbz#801312)
cb630b
- minor spec cleanup
cb630b
cb630b
* Thu Nov 29 2012 Ralph Bean <rbean@redhat.com> - 1.2.1-9
cb630b
- Trying pyver again with py2ver and py3ver.  Getting ugly.
cb630b
cb630b
* Thu Nov 29 2012 Ralph Bean <rbean@redhat.com> - 1.2.1-8
cb630b
- Hardcode python3 version
cb630b
cb630b
* Thu Nov 29 2012 Ralph Bean <rbean@redhat.com> - 1.2.1-7
cb630b
- Forced rebuild.
cb630b
cb630b
* Tue Oct 16 2012 Ralph Bean <rbean@redhat.com> - 1.2.1-6
cb630b
- Use pyver macro to use the correct easy-install.
cb630b
cb630b
* Tue Oct 16 2012 Ralph Bean <rbean@redhat.com> - 1.2.1-5
cb630b
- Forced rebuild.
cb630b
cb630b
* Mon Aug 06 2012 Ralph Bean <rbean@redhat.com> - 1.2.1-4
cb630b
- Modernized the with_python3 conditional.
cb630b
- Updated README.Fedora from 1.0.x to 1.2.1.
cb630b
cb630b
* Mon Aug 06 2012 Ralph Bean <rbean@redhat.com> - 1.2.1-3
cb630b
- Removed unreferenced %%global pypiname.
cb630b
- Changed %%check invocation from "nosetests" to "python setup.py test"
cb630b
- Added python3 support.
cb630b
cb630b
* Mon Aug 06 2012 Ralph Bean <rbean@redhat.com> - 1.2.1-2
cb630b
- Typofix BR: python-setuptools-devel -> python-setuptools
cb630b
cb630b
* Mon Aug 06 2012 Ralph Bean <rbean@redhat.com> - 1.2.1-1
cb630b
- Fork from python-webob1.0 for forward-compat python-webob1.2.
cb630b
- Some modernization of the spec file.
cb630b
cb630b
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-3
cb630b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
cb630b
cb630b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
cb630b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
cb630b
cb630b
* Wed Dec 14 2011 Luke Macken <lmacken@redhat.com> - 1.1.1-1
cb630b
- Update to the latest stable release
cb630b
- Remove wsgiproxy, tempita, and dtopt from our build requirements
cb630b
cb630b
* Thu Nov 17 2011 Steve Traylen <steve.traylen@cern.ch> - 1.0.8-3
cb630b
- Rename package from python-webob10 to python-webob1.0
cb630b
cb630b
* Thu Nov 17 2011 Steve Traylen <steve.traylen@cern.ch> - 1.0.8-2
cb630b
- Fedora package adapted to parallel installable on el6.
cb630b
cb630b
* Wed Aug 17 2011 Nils Philippsen <nils@redhat.com> - 1.0.8-1
cb630b
- Update to 1.0.8 for TurboGears 2.1.1 which needs 1.0.7 (#663117)
cb630b
cb630b
* Mon Mar 21 2011 Luke Macken <lmacken@redhat.com> - 1.0.5-1
cb630b
- Update to 1.0.5, which restores Python 2.4 support
cb630b
cb630b
* Thu Feb 24 2011 Luke Macken <lmacken@redhat.com> - 1.0.3-1
cb630b
- Update to 1.0.3
cb630b
cb630b
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
cb630b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
cb630b
cb630b
* Tue Dec 14 2010 Ricky Zhou <ricky@fedoraproject.org> - 1.0-1
cb630b
- Upstream released new version.
cb630b
cb630b
* Sun Jul 25 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.9.8-4
cb630b
- Reenable tests since python-webtest is now available
cb630b
cb630b
* Sun Jul 25 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.9.8-3
cb630b
- Disable tests. We need to bootstrap against python-webtest
cb630b
cb630b
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.8-2
cb630b
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
cb630b
cb630b
* Wed May 05 2010 Luke Macken <lmacken@redhat.com> - 0.9.8-1
cb630b
- Latest upstream release
cb630b
- Get the test suite running
cb630b
cb630b
* Tue Jan 19 2010 Ricky Zhou <ricky@fedoraproject.org> - 0.9.7.1-1
cb630b
- Upstream released new version.
cb630b
cb630b
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6.1-3
cb630b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
cb630b
cb630b
* Tue Apr 14 2009 Ricky Zhou <ricky@fedoraproject.org> - 0.9.6.1-2
cb630b
- Change define to global.
cb630b
- Remove unnecessary BuildRequires on python-devel.
cb630b
cb630b
* Tue Mar 10 2009 Ricky Zhou <ricky@fedoraproject.org> - 0.9.6.1-1
cb630b
- Upstream released new version.
cb630b
cb630b
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-2
cb630b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
cb630b
cb630b
* Tue Jan 06 2009 Luke Macken <lmacken@redhat.com> 0.9.5-1
cb630b
- Update to 0.9.5
cb630b
cb630b
* Sat Dec 06 2008 Ricky Zhou <ricky@fedoraproject.org> 0.9.4-1
cb630b
- Upstream released new version.
cb630b
cb630b
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.3-3
cb630b
- Rebuild for Python 2.6
cb630b
cb630b
* Tue Sep 30 2008 Ricky Zhou <ricky@fedoraproject.org> 0.9.3-2
cb630b
- Add BuildRequires on python-tempita.
cb630b
cb630b
* Tue Sep 30 2008 Ricky Zhou <ricky@fedoraproject.org> 0.9.3-1
cb630b
- Upstream released new version.
cb630b
cb630b
* Thu Jul 17 2008 Ricky Zhou <ricky@fedoraproject.org> 0.9.2-2
cb630b
- Remove conftest from the tests.
cb630b
cb630b
* Fri Jun 27 2008 Ricky Zhou <ricky@fedoraproject.org> 0.9.2-1
cb630b
- Upstream released new version.
cb630b
- Rename to python-webob, as mentioned in the Python package naming
cb630b
  guidelines.
cb630b
- Clean up spec.
cb630b
- Add %%check section.
cb630b
cb630b
* Sat Mar 15 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9-1
cb630b
- Initial package for Fedora