#
# spec file for package python-html5lib
#
# Copyright (c) 2015 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/
#
Name: python-html5lib
Version: 0.999999
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: http://pypi.python.org/packages/source/h/html5lib/html5lib-%{version}.tar.gz
BuildRequires: python-Genshi >= 0.7
BuildRequires: python-devel
BuildRequires: python-lxml
BuildRequires: python-nose >= 1.3.7
BuildRequires: python-setuptools >= 18.0.1
BuildRequires: python-six >= 1.9.0
Requires: python-six >= 1.9.0
%if 0%{?suse_version}
Recommends: python-Genshi >= 0.7
Recommends: python-lxml
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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
BuildArch: noarch
%endif
%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 setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%if 0%{?suse_version} && 0%{?suse_version} > 1110
%check
nosetests
%endif
%files
%defattr(-,root,root,-)
%doc CHANGES.rst LICENSE README.rst
%{python_sitelib}/html5lib/
%{python_sitelib}/html5lib-%{version}-py*.egg-info
%changelog
* 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.