From b87e5ceebdb0d7fdb166b48c168d32d99c0f8a00 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Wed, 10 Jan 2018 17:29:23 +0000 Subject: - Update to 0.3.2 - Support both tidy and tidy-html5 libraries as a backend. The former is practically useless nowadays as it doesn't handle any HTML5 tags, so the latter is the default. PR: 220861 Approved by: matainainer timeout (koobs, 3 weeks) --- textproc/py-pytidylib/files/patch-tidylib_tidy.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 textproc/py-pytidylib/files/patch-tidylib_tidy.py (limited to 'textproc/py-pytidylib/files/patch-tidylib_tidy.py') diff --git a/textproc/py-pytidylib/files/patch-tidylib_tidy.py b/textproc/py-pytidylib/files/patch-tidylib_tidy.py new file mode 100644 index 000000000000..3c455de64633 --- /dev/null +++ b/textproc/py-pytidylib/files/patch-tidylib_tidy.py @@ -0,0 +1,21 @@ +--- tidylib/tidy.py.orig 2016-11-16 01:49:58 UTC ++++ tidylib/tidy.py +@@ -29,8 +29,7 @@ from .sink import create_sink, destroy_s + __all__ = ['Tidy', 'PersistentTidy'] + + # Default search order for library names if nothing is passed in +-LIB_NAMES = ['libtidy', 'libtidy.so', 'libtidy-0.99.so.0', 'cygtidy-0-99-0', +- 'tidylib', 'libtidy.dylib', 'tidy'] ++LIB_NAMES = ['libtidy-0.99.so.0'] + + # Error code from library + ENOMEM = -12 +@@ -84,7 +83,7 @@ class Tidy(object): + def __init__(self, lib_names=None): + self._tidy = None + if lib_names is None: +- lib_names = ctypes.util.find_library('tidy') or LIB_NAMES ++ lib_names = LIB_NAMES + if isinstance(lib_names, str): + lib_names = [lib_names] + for name in lib_names: -- cgit v1.2.3