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