# # spec file for package python-Genshi # # Copyright (c) 2017 SUSE LINUX 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/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Genshi Version: 0.7 Release: 6.3 Url: http://genshi.edgewall.org/ Summary: A toolkit for generation of output for the web License: BSD-3-Clause Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/G/Genshi/Genshi-%{version}.tar.gz # PATCH-FIX-UPSTREAM http://genshi.edgewall.org/ticket/566 Patch1: changeset_r1242.diff # PATCH-FIX-UPSTREAM python-Genshi-0.7-sanitizer-test-fixes.patch https://genshi.edgewall.org/ticket/500 Patch2: %{name}-0.7-sanitizer-test-fixes.patch # PATCH-FIX-UPSTREAM python-Genshi-0.7-disable-speedups-for-python34.patch https://genshi.edgewall.org/ticket/555 Patch3: %{name}-0.7-disable-speedups-for-python34.patch # PATCH-FIX-UPSTREAM python-Genshi-0.7-isstring-helper.patch https://genshi.edgewall.org/ticket/582 Patch4: %{name}-0.7-isstring-helper.patch # PATCH-FIX-UPSTREAM python-Genshi-python34-ast-support.patch https://genshi.edgewall.org/ticket/582 Patch5: %{name}-0.7-python34-ast-support.patch # PATCH-FIX-UPSTREAM python-Genshi-python35-support.patch http://genshi.edgewall.org/ticket/602 Patch6: %{name}-bug-602-python35-support.patch # PATCH-FIX-UPSTREAM python-Genshi-python35-support-python27-fix.patch http://genshi.edgewall.org/ticket/602 Patch7: %{name}-bug-602-python35-support-python27-fix.patch BuildRequires: %{python_module Babel} BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module xml} BuildRequires: fdupes BuildRequires: gcc BuildRequires: python-rpm-macros Requires: python-Babel Requires: python-xml %define oldpython python %ifpython2 Obsoletes: %{oldpython}-genshi < %{version} Provides: %{oldpython}-genshi = %{version} %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %python_subpackages %description Genshi is a Python library that provides an integrated set of components for parsing, generating, and processing HTML, XML or other textual content for output generation on the web. The major feature is a template language, which is heavily inspired by Kid. %package -n %{name}-doc Summary: A toolkit for generation of output for the web - Documentation Group: Development/Libraries/Python Requires: %{name} = %{version} Provides: %{python_module Genshi-doc = %{version}} BuildArch: noarch %description -n %{name}-doc Genshi is a Python library that provides an integrated set of components for parsing, generating, and processing HTML, XML or other textual content for output generation on the web. The major feature is a template language, which is heavily inspired by Kid. This package contains documentation and examples. %prep %setup -q -n Genshi-%{version} %patch1 -p2 %patch2 %patch3 %patch4 %patch5 %patch6 -p1 %patch7 -p1 sed -i "1d" examples/{basic/run,basic/kidrun,tutorial/geddit/controller}.py # Fix non-excutable bits %fdupes -s doc pushd examples/bench/clearsilver ln -s -f ../mako/footer.html footer.cs popd pushd examples/bench/cheetah ln -s -f ../mako/footer.html footer.tmpl popd %build %python_build %install %{python_expand %$python_install --install-lib=%{$python_sitearch} rm -f %{buildroot}%{$python_sitearch}/genshi/_speedups.c %fdupes -s %{buildroot}%{$python_sitearch} } %check %python_exec setup.py test %files %{python_files} %defattr(-,root,root,-) %doc COPYING ChangeLog README.txt %{python_sitearch}/genshi/ %{python_sitearch}/Genshi-%{version}-py%{python_version}.egg-info %files -n %{name}-doc %defattr(-,root,root,-) %doc doc examples %changelog * Thu Apr 6 2017 jmatejek@suse.com - always build as arch-dependent - build docs as a single noarch package * Thu Apr 6 2017 aloisio@gmx.com - Added python-Genshi-0.7-disable-speedups-for-python34.patch, python-Genshi-0.7-isstring-helper.patch, python-Genshi-0.7-python34-ast-support.patch, python-Genshi-0.7-sanitizer-test-fixes.patch, python-Genshi-bug-602-python35-support.patch, python-Genshi-bug-602-python35-support-python27-fix.patch - Enabled tests * Thu Apr 6 2017 toddrme2178@gmail.com - Update singlespec build - Use pypi download url * Mon Dec 19 2016 jmatejek@suse.com - update for multipython build * Fri Jul 24 2015 seife+obs@b1-systems.com - fix build on non-SUSE distributions * Tue Feb 17 2015 opensuse@dstoecker.de - backport fix for bug 566 (pop from empty) from 0.7 devel (changeset_r1242.diff) * Tue Oct 22 2013 toddrme2178@gmail.com - Update to 0.7 * Add support for Python 3.1, 3.2 and 3.3 (via 2to3) and for PyPy. The majority of the coding was done in a sprint run by the Cape Town Python Users Group with financial assistance from the Python Software Foundation. * Default input and output encodings changed from UTF-8 to None (i.e. unicode strings). * Skip Mako benchmarks if Mako isn't installed (rather than failing completely). - Update to 0.6.1 * Security fix to enhance sanitizing of CSS in style attributes. Genshi's `HTMLSanitizer` disallows style attributes by default (this remains unchanged) and warns against such attacks in its documentation, but the provided CSS santizing is now less lacking (see #455). * Fix for error in how `HTMLFormFiller` would handle `textarea` elements if no value was not supplied form them. * The `HTMLFormFiller` now correctly handles check boxes and radio buttons with an empty `value` attribute. * Template `Context` objects now have a `.copy` method. * Added a simple `tox.ini` file for using tox to test against multiple verions of Python. * Fix for bug in `QName` comparison (see #413). * Fix for bug in handling of trailing events in match template matches (see #399). * Fix i18n namespace declaration in documentation (see #400). * Fix for bug in caching of events in serializers by no longer caching `(TEXT, Markup)` events (see #429). * Fix handling of `None` by `Markup.escape` in `_speedups.c` (see #439). * Fix handling of internal state by match templates (relevant when multiple templates match the same part of the stream, see #370). * Fix handling of multiple events between or on either side of start and end tags in translated messages (see #404). * Fix test failures caused by changes in HTMLParser in Python 2.7 (see #501). * Fix infinite loop in interplotation lexing that was introduced by a change in Python 2.7's tokenizer (see #540). * Fix handling of processing instructions without data (see #368). * Updated MANIFEST.in so as not to rely on build from Subersion 1.6. * Thu Sep 1 2011 saschpe@suse.de - Renamed to python-Genshi (from python-Genshi) - Changed license to BSD-3-Clause (SPDX style) from BSD3c - Fixed doc-file-dependency rpmlint issue * Thu Mar 3 2011 saschpe@suse.de - Spec file cleanup * Proper SUSE changes file and removed changelog from spec * Added proper license header * Package files COPYING, README.txt and docs and examples - Split of documentation package * Sun Apr 25 2010 bitdealer@gmail.com - Updated to 0.6 * Mon Aug 4 2008 dannoritzer@web.de - Updated to 0.5.1 * Thu Feb 28 2008 dannoritzer@web.de - Fixed build errors - Updated to 0.4.4 * Mon Oct 15 2007 nix@opensuse.org - Clean up spec file and change name to python-geneshi * Sun Jul 22 2007 dannoritzer@web.de - Initial package