# # spec file for package python-html5lib # # 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-html5lib Version: 1.0.1 Release: 1.1 Summary: HTML parser based on the WHAT-WG Web Applications 1 License: MIT Group: Development/Languages/Python Url: https://github.com/html5lib/html5lib-python Source: https://files.pythonhosted.org/packages/source/h/html5lib/html5lib-%{version}.tar.gz BuildRequires: %{python_module Genshi} BuildRequires: %{python_module datrie} BuildRequires: %{python_module devel} BuildRequires: %{python_module lxml} BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest-expect} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools >= 18.5} BuildRequires: %{python_module six >= 1.9} BuildRequires: %{python_module webencodings} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-six >= 1.9 Requires: python-webencodings Recommends: python-Genshi Recommends: python-lxml BuildArch: noarch %python_subpackages %description HTML parser designed to follow the HTML5 specification. The parser is designed to handle all flavours of HTML and parses invalid documents using well-defined error handling rules compatible with the behaviour of major desktop web browsers. Output is to a tree structure; the current release supports output to DOM, ElementTree, lxml and BeautifulSoup tree formats as well as a simple custom format %prep %setup -q -n html5lib-%{version} %build %python_build %install %python_install %python_expand %fdupes -s %{buildroot}%{$python_sitelib} %check %python_expand %python_exec %{_bindir}/py.test --tb=short %files %{python_files} %doc CHANGES.rst LICENSE README.rst %{python_sitelib}/html5lib/ %{python_sitelib}/html5lib-%{version}-py%{python_version}.egg-info %changelog * Wed Dec 13 2017 tchvatal@suse.com - Version update to latest 1.0.1 release: * Dropped support for py 2.6 * Documentation update * Fixes for python 3.7 and 3.6 * Tue Dec 5 2017 opensuse@dstoecker.de - update to 1.0b10 * Fri Apr 7 2017 toddrme2178@gmail.com - html5lib has a hard dependency on python-webencodings. It will fail at import time without it. * Tue Apr 4 2017 aloisio@gmx.com - Updated to version 0.999999999 (see CHANGES.rst) - Converted to single-spec - Dropped coerce_comments_to_work_with_lxml.patch (accepted upstream) * Fri Feb 12 2016 toddrme2178@gmail.com - Add coerce_comments_to_work_with_lxml.patch Fixes compatibility with python-lxml 3.5+, which adds validation for xml comments. Should be in next release/ - Re-enable tests. * Tue Feb 2 2016 toddrme2178@gmail.com - Disable broken tests. Check if they are working again in the next release. * Mon Feb 1 2016 toddrme2178@gmail.com - update to version 0.9999999: * Fix #195: fix the sanitizer to drop broken URLs (it threw an exception between 0.9999 and 0.999999). * Mon Aug 3 2015 tbechtold@suse.com - Relax python-lxml BuildRequires and Requires. html5lib should also work with older python-lxml modules. * Mon Jul 27 2015 aloisio@gmx.com - Update to version 0.999999 * Fix #189: fix the sanitizer to allow relative URLs again (as it did prior to 0.9999/1.0b5). - Aligned version requirements with PyPI * Fri Jul 24 2015 seife+obs@b1-systems.com - Fix non-SUSE build by conditionalizing Recommends: tags * Wed May 6 2015 benoit.monin@gmx.fr - update to version 0.99999: * Fix #188: fix the sanitizer to not throw an exception when sanitizing bogus data URLs. - additional changes from version 0.9999: * Fix #153: Sanitizer fails to treat some attributes as URLs. Despite how this sounds, this has no known security implications. No known version of IE (5.5 to current), Firefox (3 to current), Safari (6 to current), Chrome (1 to current), or Opera (12 to current) will run any script provided in these attributes. * Pass error message to the ParseError exception in strict parsing mode. * Allow data URIs in the sanitizer, with a whitelist of content-types. * Add support for Python implementations that don’t support lone surrogates (read: Jython). Fixes #2. * Remove localization of error messages. This functionality was totally unused (and untested that everything was localizable), so we may as well follow numerous browsers in not supporting translating technical strings. * Expose treewalkers.pprint as a public API. * Add a documentEncoding property to HTML5Parser, fix #121. - update project URL * Mon May 26 2014 hpj@urpla.net - update to 0.999 - Fix #127: add work-around for CPython issue #20007: .read(0) on http.client.HTTPResponse drops the rest of the content. - Fix #115: lxml treewalker can now deal with fragments containing, at their root level, text nodes with non-ASCII characters on Python 2. - enable tests and include test suite for further validations for distributions > 11.1 and SLES 10 * Tue Oct 22 2013 toddrme2178@gmail.com - Update to 0.99 * No changes, just updated version number - Add additional dependencies * Thu Mar 29 2012 saschpe@suse.de - Use upstream tarball - Don't install tests, but install README * Sat Feb 11 2012 alexandre@exatati.com.br - Update to 0.95: - Sorry, no changelog atm. - Regenerate spec file with py2pack. * Mon Jan 18 2010 alexandre@exatati.com.br - Update to 0.90. * Wed Oct 14 2009 alexandre@exatati.com.br - Initial package (0.11.1) for openSUSE.