%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%global srcname Chameleon
Name: python-chameleon
Version: 2.7.0
Release: 2%{?dist}
Summary: XML-based template compiler
Group: Development/Languages
License: BSD
URL: http://chameleon.repoze.org/
Source0: http://pypi.python.org/packages/source/C/Chameleon/Chameleon-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python2-devel
# For docs
BuildRequires: python-sphinx
# For tests to run
BuildRequires: python-setuptools
BuildRequires: python-lxml
BuildRequires: python-zope-interface
%if 0%{?rhel} && 0%{?rhel} <= 6
BuildRequires: python-unittest2
%endif
%if 0%{?rhel} && 0%{?rhel} < 6
BuildRequires: python-elementtree
Requires: python-elementtree
%endif
Requires: python-setuptools
Requires: python-zope-interface
Requires: python-lxml
%description
Chameleon is an XML attribute language template compiler. It comes with
implementations for the Zope Page Templates (ZPT) and Genshi templating
languages.
The engine compiles templates into Python byte-code. This results in
performance which is on average 10-15 times better than implementations which
use run-time interpretation.
%prep
%setup -q -n %{srcname}-%{version}
%build
%{__python} setup.py build
PYTHONPATH=`pwd`/src make html
%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
# No need to ship docs and tests as part of the module
rm -rf %{buildroot}%{python_sitelib}/chameleon/docs
rm -rf %{buildroot}%{python_sitelib}/chameleon/tests
# Data files for the tests
find %{buildroot}%{python_sitelib}/chameleon -name '*.txt' -exec rm \{\} \;
# Clean up the documentation
mv _build/html .
rm -rf html/.buildinfo
%check
%{__python} setup.py test
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc *.rst *.txt docs html
%{python_sitelib}/*
%changelog
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Dec 13 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 2.7.0-1
- New upstream release
* Thu Nov 10 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 2.5.3-1.1
- Fix to build on RHEL6
* Thu Nov 10 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 2.5.3-1
- New upstream release
* Mon Oct 3 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 2.5.1-1
- New upstream release
* Sun Aug 21 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 2.3.8-1
- New upstream release
* Thu Aug 18 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 2.3.6-1
- New upstream release
* Wed Aug 10 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 2.2-1
- New upstream release
* Fri Jul 15 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 2.0-1
- New upstream release
- This release removes the genshi-like syntax support -- F17+, only
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.12-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sat Sep 18 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.2.12-4
- Move COPYING file out of the ast directory and into docdir.
* Fri Sep 17 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.2.12-3
- Fix unittests on python-2.7.
* Thu Sep 16 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.2.12-2
- Add a patch so we can run with newer versions of the optional deps
* Wed Sep 15 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.2.12-1
- Initial package