File python-pytidylib6.spec of Package python-pytidylib6
#
# spec file for package python-pytidylib6
#
# Copyright (c) 2014 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-pytidylib6
Version: 0.2.2
Release: 0
Summary: Python wrapper for HTML Tidy (tidylib), compatible with Python 2 and 3
License: MIT
Group: Development/Languages/Python
Url: http://countergram.com/open-source/pytidylib/
Source: https://pypi.python.org/packages/source/p/pytidylib6/pytidylib6-%{version}.tar.gz
BuildRequires: libtidy-0_99-0-devel
BuildRequires: python-devel
# Test requirements:
BuildRequires: python-nose
Requires: libtidy-0_99-0
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
0.2.0: Works on Windows! See documentation for available DLL download
locations. Documentation rewritten and expanded.
`PyTidyLib`_ is a Python package that wraps the `HTML Tidy`_ library. This
allows you, from Python code, to "fix" invalid (X)HTML markup. Some of the
library's many capabilities include:
* Clean up unclosed tags and unescaped characters such as ampersands
* Output HTML 4 or XHTML, strict or transitional, and add missing doctypes
* Convert named entities to numeric entities, which can then be used in XML
documents without an HTML doctype.
* Clean up HTML from programs such as Word (to an extent)
* Indent the output, including proper (i.e. no) indenting for ``pre`` elements,
which some (X)HTML indenting code overlooks.
%prep
%setup -q -n pytidylib6-%{version}
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
nosetests
%files
%defattr(-,root,root,-)
%doc README LICENSE
%{python_sitelib}/*
%changelog