2012-03-08 10:49:45 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-Chameleon
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
#
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
Name: python-Chameleon
|
- update to 2.10
- Deprecations:
- The fast_translate function has been deprecated. Instead, the default translation
function is now always a function that simply interpolates the mapping onto the message default or id.
- The motivation is that since version 2.9, the context argument is non-trivial: the econtext
mapping is passed. This breaks an expectation on the Zope platform that the context parameter is the HTTP
request. Previously, with Chameleon this parameter was simply not provided and so that did not cause issues as such.
- The ast24 module has been renamed to ast25. This should help clear up any confusion that
Chameleon 2.x might be support a Python interpreter less than version 2.5 (it does not).
- Features:
- The ProxyExpr expression class (and hence the load: expression type) is now a TALES-expression.
In practical terms, this means that the expression type (which computes a string result using the
standard "${...}" interpolation syntax and proxies the result through a function) now supports fallback using the pipe operator ("|"). This fixes issue #128.
- An attempt to interpolate using the empty string as the expression (i.e. ${}) now does nothing: the string ${} is simply output as is.
- Added support for adding, modifying, and removing attributes using a dictionary expression in tal:attributes (analogous to Genshi's py:attrs directive):
- <div tal:attributes="name value; attrs" />
- In the example above, name is an identifier, while value and attrs are Python expressions. However,
attrs must evaluate to a Python dictionary object (more concisely, the value must implement the dictionary API-methods update() and items()).
- Optimizations:
- In order to cut down on the size of the compiled function objects, some conversion and quoting statements
have been put into functions. In one measurement, the reduction was 35%. The benchmark suite does not report of an increased render time (actually slightly decreased).
- Bugfixes:
- An exception is now raised if a trivial string is passed for metal:fill-slot. This fixes issue #89.
- An empty string is now never translated. Not really a bug, but it's been reported in as an issue (#92) because some translation frameworks handle this case incorrectly.
- The template module loader (file cache) now correctly encodes generated template source code as UTF-8. This fixes issue #125.
- Fixed issue where a closure might be reused unsafely in nested template rendering.
- Fixed markup class __repr__ method. This fixes issue #124.
- Added missing return statement to fix printing the non-abbreviated filename in case of an exception. [tomo]
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Chameleon?expand=0&rev=9
2012-10-21 16:27:13 +00:00
|
|
|
Version: 2.10
|
2012-03-08 10:49:45 +00:00
|
|
|
Release: 0
|
|
|
|
|
Url: http://www.pagetemplates.org/
|
|
|
|
|
Summary: Fast HTML/XML Template Compiler
|
2012-03-08 13:13:31 +00:00
|
|
|
License: BSD-3-Clause and BSD-4-Clause and Python-2.0 and ZPL-2.1
|
2012-03-08 10:49:45 +00:00
|
|
|
Group: Development/Languages/Python
|
|
|
|
|
Source: http://pypi.python.org/packages/source/C/Chameleon/Chameleon-%{version}.tar.gz
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
BuildRequires: python-devel
|
2012-03-08 13:13:31 +00:00
|
|
|
BuildRequires: python-Sphinx
|
|
|
|
|
BuildRequires: python-distribute
|
2012-03-08 10:49:45 +00:00
|
|
|
# seems like Camelon needs pkg_resources on runtime
|
|
|
|
|
# it invalidates its template cache based on your combined package versions
|
2012-03-08 13:13:31 +00:00
|
|
|
Requires: python-distribute
|
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
|
%else
|
2012-03-08 10:49:45 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
2012-03-08 13:13:31 +00:00
|
|
|
Chameleon is an HTML/XML template engine for Python. It uses the
|
|
|
|
|
*page templates* language.
|
2012-03-08 10:49:45 +00:00
|
|
|
|
|
|
|
|
You can use it in any Python web application with just about any
|
2012-03-08 13:13:31 +00:00
|
|
|
version of Python (2.5 and up, including 3.x and pypy).
|
2012-03-08 10:49:45 +00:00
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n Chameleon-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
2012-03-08 13:13:31 +00:00
|
|
|
python setup.py build
|
2012-05-28 08:50:56 +00:00
|
|
|
PYTHONPATH=`pwd`/src make html && rm -rf _build/html/.buildinfo # Build HTML documentation
|
2012-03-08 10:49:45 +00:00
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2012-03-08 13:13:31 +00:00
|
|
|
rm -rf %{buildroot}%{python_sitelib}/chameleon/tests # Don't ship testsuite
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
python setup.py test
|
2012-03-08 10:49:45 +00:00
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
2012-03-08 13:13:31 +00:00
|
|
|
%doc COPYRIGHT.txt LICENSE.txt README.rst _build/html
|
2012-05-28 08:50:56 +00:00
|
|
|
%{python_sitelib}/chameleon/
|
|
|
|
|
%{python_sitelib}/Chameleon-%{version}-py%{py_ver}.egg-info
|
2012-03-08 10:49:45 +00:00
|
|
|
|
|
|
|
|
%changelog
|