Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}

Name:           TurboGears2
Version:        2.1.4
Release:        3%{?dist}
Summary:        Next generation front-to-back web development megaframework built on Pylons

Group:          Development/Languages
License:        MIT
URL:            http://www.turbogears.org
Source0:        http://www.turbogears.org/2.1/downloads/%{version}/%{name}-%{version}.tar.gz
Source1:        test-templates.tar.bz2
Patch0:         %{name}-kajiki.patch
Patch1:         %{name}-no-chameleon.patch
Patch2:         %{name}-flexible-webob-version.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  python-devel python-setuptools-devel
BuildRequires:  python-nose python-coverage
BuildRequires:  python-turbokid >= 1.0.4
BuildRequires:  python-zope-sqlalchemy >= 0.4
BuildRequires:  python-jinja2
BuildRequires:  python-simplegeneric
BuildRequires:  python-repoze-who-friendlyform >= 1.0.4
BuildRequires:  python-repoze-who
#BuildRequires:  python-chameleon < 2.0
BuildRequires:  python-repoze-tm2 >= 1.0-0.4.a4
BuildRequires:  python-tw-forms
BuildRequires:  python-genshi >= 0.5.1
BuildRequires:  python-mako
BuildRequires:  python-repoze-who-testutil >= 1.0.1
BuildRequires:  python-repoze-what-pylons >= 1.0
BuildRequires:  python-turbojson >= 1.3
BuildRequires:  python-repoze-what >= 1.0.8
BuildRequires:  python-repoze-what-quickstart >= 1.0.3
BuildRequires:  python-webflash
BuildRequires:  python-babel >= 0.9.4
BuildRequires:  python-tgext-admin >= 0.3.9

%{?el5:BuildRequires: python-wsgiref}

Requires:       python-pylons >= 0.9.7
Requires:       python-webflash >= 0.1-0.a8
Requires:       python-weberror >= 0.10.1
Requires:       python-webob >= 1.0.7
Requires:       python-webob <= 1.1.1
Requires:       python-genshi >= 0.5.1
Requires:       python-zope-sqlalchemy >= 0.4
Requires:       python-toscawidgets >= 0.9.4
Requires:       python-turbojson >= 1.3
Requires:       python-repoze-tm2 >= 1.0-0.a4
Requires:       python-repoze-what-pylons >= 1.0-0.rc3
Requires:       python-simplegeneric
Requires:       python-babel >= 0.9.4


%description
TurboGears brings together a best of breed python tools to create a flexible,
full featured, and easy to use web framework.

TurboGears 2 provides and integrated and well tested set of tools for
everything you need to build dynamic, database driven applications.  It
provides a full range of tools for front end javascript develeopment, back
database development and everything in between:

 * dynamic javascript powered widgets ToscaWidgets
 * automatic JSON generation from your controllers
 * powerfull, designer friendly XHTML basted templating (Genshi)
 * object or route based URL dispatching
 * powerful Object Relational Mappers (SQLAlchemy)


%prep
%setup -q
%patch0 -p1 -b .kajiki
%patch1 -p1 -b .chameleon
%patch2 -p1 -b .webob


%build
python setup.py build

%install
rm -rf %{buildroot}
python setup.py install --skip-build --root %{buildroot}

%check
# TG2 tarball currently doesn't contain everything needed to run tests,
# so we create an additional tarball with the remaining files by running:
# tar -cjf test-templates.tar.bz2 `find tests -name '*.html' -or -name '*.mak'`
tar -jxvf %{SOURCE1}
mkdir tests/test_stack/config/templates
mkdir tests/test_stack/dispatch/templates

PYTHONPATH=$(pwd) nosetests -q
rm -fr %{buildroot}%{python_sitelib}/tests

%clean
rm -rf %{buildroot}

%files
%defattr(0644,root,root,0755)
%doc README.txt
%{python_sitelib}/%{name}-%{version}-py%{pyver}.egg-info/
%{python_sitelib}/tg/


%changelog
* Fri Apr 13 2012 Ralph Bean <rbean@redhat.com> - 2.1.4-3
- Patch webob version requirement to allow python-webob-1.1.1

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Dec 14 2011 Luke Macken <lmacken@redhat.com> - 2.1.4-1
- Update to 2.1.4
- Get the test suite up and running again
- Add a tarball with some missing templates needed to run the tests
- Patch out the chameleon.genshi tests

* Thu Aug 25 2011 Luke Macken <lmacken@redhat.com> - 2.1.2-1
- Update to 2.1.2
- Update our requirements

* Wed Aug 17 2011 Nils Philippsen <nils@redhat.com>
- Update to 2.1.1 (#663117)

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Nov 23 2010 Luke Macken <lmacken@redhat.com> - 2.1-1
- Update to 2.1 final
- Patch out the kajiki requirement & tests until it's packaged

* Mon Oct 18 2010 Luke Macken <lmacken@redhat.com> - 2.1-0.4.rc1
- Add a patch to fix a helpers import issue
- This brings our package up to speed with the latest RC1 release

* Tue Sep 28 2010 Luke Macken <lmacken@redhat.com> - 2.1-0.3.rc1.dev1048
- Pre-RC1 development snapshot
- Remove strict Pylons<0.9.7 requirement
- Get the test suite running
- Pull in python-chameleon for the test suite
- Require python-simplegeneric
- Update the description

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.1-0.2.b2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Wed May 05 2010 Luke Macken <lmacken@redhat.com> - 2.1-0.1.b2
- Update to 2.1b2

* Mon Jan 11 2010 Luke Macken <lmacken@redhat.com> - 2.0.3-4
- Fix the source URL

* Mon Sep 14 2009 Luke Macken <lmacken@redhat.com> - 2.0.3-3
- Tweak our python-wsgiref conditional for EL5

* Tue Sep 01 2009 Luke Macken <lmacken@redhat.com> - 2.0.3-2
- Remove the SQLAlchemy requirement, as python-zope-sqlalchemy
  is now set to include the appropriate version

* Wed Aug 12 2009 Luke Macken <lmacken@redhat.com> - 2.0.3-1
- 2.0.3

* Sat Jun 27 2009 Luke Macken <lmacken@redhat.com> 2.0.1-1
- 2.0.1
- Bump our ToscaWigdets requirement to 0.9.4
- Remove TurboGears2-custom-content-type.patch, which is upstream

* Sat Jun 06 2009 Luke Macken <lmacken@redhat.com> 2.0-4
- Require the new python-sqlalchemy0.5 package

* Thu Jun 04 2009 Luke Macken <lmacken@redhat.com> 2.0-3
- Add a patch to fix custom content types.
  http://trac.turbogears.org/ticket/2280

* Mon Jun 01 2009 Luke Macken <lmacken@redhat.com> 2.0-2
- Conditionally include wsgiref

* Sun May 31 2009 Luke Macken <lmacken@redhat.com> 2.0-1
- Update to 2.0 final.
- Add python-repoze-what-pylons and python-webflash to the BuildRequires
- Disable the test suite until we package chameleon.genshi

* Tue Oct 28 2008 Luke Macken <lmacken@redhat.com> 1.9.7.0.3.b1dev.r5627
- Update to a svn snapshot to support tgext.authorization instead of
  tg.ext.repoze.who

* Mon Oct 27 2008 Luke Macken <lmacken@redhat.com> 1.9.7-0.2.b1
- Update to 1.9.7b1

* Tue Oct 21 2008 Luke Macken <lmacken@redhat.com> 1.9.7-0.1.a5dev.r5564
- Initial packaging of TurboGears2 for Fedora.