a4e9bd
%if 0%{?fedora} || 0%{?rhel} > 6
a4e9bd
#global with_python3 1
a4e9bd
# paste is not python3 compatible at this time
a4e9bd
%else
a4e9bd
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
a4e9bd
%endif
a4e9bd
a4e9bd
Name:           python-paste
a4e9bd
Version:        1.7.5.1
f1521d
Release:        9.20111221hg1498%{?dist}
a4e9bd
Summary:        Tools for using a Web Server Gateway Interface stack
a4e9bd
Group:          System Environment/Libraries
a4e9bd
# Most of the code is MIT
a4e9bd
# paste/exceptions/collector.py is ZPLv2.0
a4e9bd
# paste/evalexception/mochikit/MochiKit.js AFL or MIT
a4e9bd
# paste/lint.py MIT or Apache v2
a4e9bd
# subproccess24.py PySourceColor.py, Python
a4e9bd
# doctest24.py, Public Domain
a4e9bd
License: MIT and ZPLv2.0 and Python and Public Domain and (AFL or MIT) and (MIT or ASL 2.0)
a4e9bd
URL:            http://pythonpaste.org
a4e9bd
# All files arent included in the 0.7.5.1 release.  Take a snapshot to get
a4e9bd
# unittests working and pick up three bugfixes as well
a4e9bd
# hg clone -r 1498 https://bitbucket.org/ianb/paste
a4e9bd
# cd paste
a4e9bd
# patch -p1 < ../paste-manifest.patch
a4e9bd
# python setup.py sdist
a4e9bd
# Source is in dist/Paste-1.7.5.1.tar.gz
a4e9bd
Source0:        Paste-%{version}.tar.gz
a4e9bd
#Source0:        http://pypi.python.org/pypi/packages/source/P/Paste/Paste-%{version}.tar.gz
a4e9bd
# In one remaining place, make sure we check for string in the stdlib before we use our copy
a4e9bd
Patch0: paste-unbundle-stdlib.patch
a4e9bd
# Use a system version of python-tempita before our bundled copy
a4e9bd
Patch1: paste-unbundle-tempita.patch
a4e9bd
Patch2: paste-27-lambda.patch
a4e9bd
# Fix parsing of digest key value pairs
a4e9bd
# Submitted upstream pull request
a4e9bd
Patch3: paste-digest-snap.patch
a4e9bd
# Submitted upstream pull request with this change.
a4e9bd
# This patch is needed when creating the tarball, not during rpm build
a4e9bd
Patch100: paste-manifest.patch
a4e9bd
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a4e9bd
BuildArch:      noarch
a4e9bd
a4e9bd
BuildRequires:  python2-devel
a4e9bd
BuildRequires:  python-setuptools
a4e9bd
BuildRequires: python-nose
a4e9bd
BuildRequires: python-tempita
a4e9bd
BuildRequires: pyOpenSSL
a4e9bd
Requires: python-tempita
a4e9bd
Requires: pyOpenSSL
a4e9bd
Requires:  python-setuptools
a4e9bd
a4e9bd
%if 0%{?with_python3}
a4e9bd
BuildRequires: python3-devel
a4e9bd
BuildRequires: python3-setuptools
a4e9bd
BuildRequires: python3-nose
a4e9bd
BuildRequires: python3-tempita
a4e9bd
BuildRequires: /usr/bin/2to3
a4e9bd
%endif # if with_python3
a4e9bd
a4e9bd
%description
a4e9bd
These provide several pieces of "middleware" (or filters) that can be nested
a4e9bd
to build web applications.  Each piece of middleware uses the WSGI (PEP 333)
a4e9bd
interface, and should be compatible with other middleware based on those
a4e9bd
interfaces.
a4e9bd
a4e9bd
%if 0%{?with_python3}
a4e9bd
%package -n python3-paste
a4e9bd
Summary:        Tools for using a Web Server Gateway Interface stack
a4e9bd
Group:          System Environment/Libraries
a4e9bd
Requires: python3-tempita
a4e9bd
Requires: python3-setuptools
a4e9bd
# TODO is there a pyOpenSSL for python3
a4e9bd
a4e9bd
%description -n python3-paste
a4e9bd
These provide several pieces of "middleware" (or filters) that can be nested
a4e9bd
to build web applications.  Each piece of middleware uses the WSGI (PEP 333)
a4e9bd
interface, and should be compatible with other middleware based on those
a4e9bd
interfaces.
a4e9bd
%endif # with_python3
a4e9bd
a4e9bd
a4e9bd
%prep
a4e9bd
%setup -q -n Paste-%{version}
a4e9bd
%patch0 -p1 -b .stdlib
a4e9bd
rm paste/util/subprocess24.py
a4e9bd
%patch1 -p1 -b .tmpta
a4e9bd
%patch2 -p1 -b .27lambda
a4e9bd
%patch3 -p1 -b .digest
a4e9bd
# Strip #! lines that make these seem like scripts
a4e9bd
%{__sed} -i -e '/^#!.*/,1 d' paste/util/scgiserver.py paste/debug/doctest_webapp.py
a4e9bd
a4e9bd
# clean docs directory
a4e9bd
pushd docs
a4e9bd
rm StyleGuide.txt
a4e9bd
popd
a4e9bd
a4e9bd
%if 0%{?with_python3}
a4e9bd
rm -rf %{py3dir}
a4e9bd
cp -a . %{py3dir}
a4e9bd
2to3 --write --nobackups %{py3dir}
a4e9bd
%endif # with_python3
a4e9bd
a4e9bd
%build
a4e9bd
%{__python} setup.py build
a4e9bd
a4e9bd
%if 0%{?with_python3}
a4e9bd
pushd %{py3dir}
a4e9bd
%{__python3} setup.py build
a4e9bd
popd
a4e9bd
%endif # with_python3
a4e9bd
a4e9bd
a4e9bd
%install
a4e9bd
rm -rf %{buildroot}
a4e9bd
%{__python} setup.py install --skip-build --root %{buildroot}
a4e9bd
a4e9bd
%if 0%{?with_python3}
a4e9bd
pushd %{py3dir}
a4e9bd
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
a4e9bd
popd
a4e9bd
%endif # with_python3
a4e9bd
a4e9bd
%check
a4e9bd
export PYTHONPATH=$(pwd)
a4e9bd
# We don't have access to the wider internet in the buildsystem
a4e9bd
nosetests -e '.*test_paste_website'
a4e9bd
a4e9bd
%if 0%{?with_python3}
a4e9bd
pushd %{py3dir}
a4e9bd
export PYTHONPATH=$(pwd)
a4e9bd
nosetests-%{python3_version}
a4e9bd
popd
a4e9bd
%endif # with_python3
a4e9bd
a4e9bd
%clean
a4e9bd
rm -rf %{buildroot}
a4e9bd
a4e9bd
a4e9bd
%files
a4e9bd
%defattr(-,root,root,-)
a4e9bd
%doc docs/*
a4e9bd
%{python_sitelib}/*
a4e9bd
a4e9bd
%if 0%{?with_python3}
a4e9bd
%files -n python3-paste
a4e9bd
%defattr(-,root,root,-)
a4e9bd
%{python3_sitelib}/*
a4e9bd
%endif
a4e9bd
a4e9bd
a4e9bd
%changelog
f1521d
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.7.5.1-9.20111221hg1498
f1521d
- Mass rebuild 2013-12-27
f1521d
a4e9bd
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.5.1-8.20111221hg1498
a4e9bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a4e9bd
a4e9bd
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.5.1-7.20111221hg1498
a4e9bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a4e9bd
a4e9bd
* Mon Jan 23 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 1.7.5.1-6.20111221hg1498
a4e9bd
- Disable python3 subpackage as paste is not python3 compatible at this time
a4e9bd
a4e9bd
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.5.1-5.20111221hg1498
a4e9bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a4e9bd
a4e9bd
* Wed Dec 21 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.7.5.1-4.20111221hg1498
a4e9bd
- Tarball is missing files, use a snapshot to get those files and also pick up
a4e9bd
  several bug fixes (one related to serving CGI scripts, another for http
a4e9bd
  Continue requests, and a third regarding digest authentication and internet
a4e9bd
  explorer)
a4e9bd
a4e9bd
* Tue Dec 20 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.7.5.1-3
a4e9bd
- Ugh.  Enable unittests and make a note that the python3 module is totally
a4e9bd
  non-functional.  Open a bug for that for the actual package maintainers to
a4e9bd
  make a decision on.
a4e9bd
a4e9bd
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.5.1-2
a4e9bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a4e9bd
a4e9bd
* Wed Sep 22 2010 Luke Macken <lmacken@redhat.com> - 1.7.5.1-1
a4e9bd
- 1.7.5.1 upstream release
a4e9bd
a4e9bd
* Wed Sep 15 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.7.5-1
a4e9bd
- New upstream bugfix
a4e9bd
a4e9bd
* Mon Aug 23 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.7.4-8
a4e9bd
- Rebuild for python3-3.2
a4e9bd
a4e9bd
* Mon Aug  2 2010 Kyle VanderBeek <kylev@kylev.com> - 1.7.4-7
a4e9bd
- Add python3 version.
a4e9bd
- Fix python 2.7/3 incompatible lambda syntax.
a4e9bd
- Unbundle stdlib (2.4+) subprocess module (removed because it isn't even 3.x legal).
a4e9bd
a4e9bd
* Fri Jul 30 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.7.4-6
a4e9bd
- Include another function from tempita that is used by paste-script.
a4e9bd
a4e9bd
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.7.4-5
a4e9bd
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
a4e9bd
a4e9bd
* Fri Jul 9 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.7.4-4
a4e9bd
- Actually apply the patches :-(
a4e9bd
a4e9bd
* Fri Jul 2 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.7.4-3
a4e9bd
- Require pyOpenSSL so that we get SSL capabilities
a4e9bd
a4e9bd
* Thu Jul 1 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.7.4-2
a4e9bd
- Unbundle tempita and don't rely on utils.string24
a4e9bd
a4e9bd
* Thu Jun 24 2010 Luke Macken <lmacken@redhat.com> - 1.7.4-1
a4e9bd
- 1.7.4 security release
a4e9bd
a4e9bd
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2-4
a4e9bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a4e9bd
a4e9bd
* Mon Jun 22 2009 Kyle VanderBeek <kylev@kylev.com> - 1.7.2-3
a4e9bd
- Package formerly ghost'ed .pyo files
a4e9bd
- Update to current python package methods
a4e9bd
a4e9bd
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2-2
a4e9bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a4e9bd
a4e9bd
* Tue Jan 06 2009 Luke Macken <lmacken@redhat.com> - 1.7.2-1
a4e9bd
- Update to 1.7.2
a4e9bd
a4e9bd
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.7.1-2
a4e9bd
- Rebuild for Python 2.6
a4e9bd
a4e9bd
* Sat Jun 14 2008 Luke Macken <lmacken@redhat.com> - 1.7.1-1
a4e9bd
- Update to Paste 1.7.1
a4e9bd
a4e9bd
* Thu Feb 28 2008 Luke Macken <lmacken@redhat.com> - 1.6-1
a4e9bd
- Update to 1.6
a4e9bd
a4e9bd
* Wed Oct  3 2007 Luke Macken <lmacken@redhat.com> - 1.4.2-1
a4e9bd
- 1.4.2
a4e9bd
a4e9bd
* Sun Sep  2 2007 Luke Macken <lmacken@redhat.com> - 1.4-2
a4e9bd
- Update for python-setuptools changes in rawhide
a4e9bd
a4e9bd
* Sat Jul  8 2007 Luke Macken <lmacken@redhat.com> - 1.4-1
a4e9bd
- 1.4
a4e9bd
a4e9bd
* Sat Mar  3 2007 Luke Macken <lmacken@redhat.com> - 1.2.1-1
a4e9bd
- 1.2.1
a4e9bd
a4e9bd
* Sat Dec  9 2006 Luke Macken <lmacken@redhat.com> - 1.0-2
a4e9bd
- Add python-devel to BuildRequires
a4e9bd
- 1.0
a4e9bd
a4e9bd
* Sun Sep 17 2006 Luke Macken <lmacken@redhat.com> - 0.9.8.1-1
a4e9bd
- 0.9.8.1
a4e9bd
a4e9bd
* Sun Sep  3 2006 Luke Macken <lmacken@redhat.com> - 0.9.3-5
a4e9bd
- Rebuild for FC6
a4e9bd
a4e9bd
* Wed Jul 19 2006 Luke Macken <lmacken@redhat.com> - 0.9.3-4
a4e9bd
- Use a smarter shebang removal expression
a4e9bd
a4e9bd
* Wed Jul 19 2006 Luke Macken <lmacken@redhat.com> - 0.9.3-3
a4e9bd
- Fix doc inclusion
a4e9bd
a4e9bd
* Sat Jul 15 2006 Luke Macken <lmacken@redhat.com> - 0.9.3-2
a4e9bd
- Clean up docs directory
a4e9bd
- Remove shebang from from non-executable scripts
a4e9bd
- Use consistent build root variables
a4e9bd
a4e9bd
* Mon Jul 10 2006 Luke Macken <lmacken@redhat.com> - 0.9.3-1
a4e9bd
- Initial package