Date: Wed, 10 Jan 2018 17:29:23 +0000 (UTC) From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458663 - in head/textproc/py-pytidylib: . files Message-ID: <201801101729.w0AHTNwK020648@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: amdmi3 Date: Wed Jan 10 17:29:23 2018 New Revision: 458663 URL: https://svnweb.freebsd.org/changeset/ports/458663 Log: - 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) Added: head/textproc/py-pytidylib/files/patch-tidylib_tidy.py (contents, props changed) Modified: head/textproc/py-pytidylib/Makefile head/textproc/py-pytidylib/distinfo head/textproc/py-pytidylib/files/patch-setup.py Modified: head/textproc/py-pytidylib/Makefile ============================================================================== --- head/textproc/py-pytidylib/Makefile Wed Jan 10 17:15:09 2018 (r458662) +++ head/textproc/py-pytidylib/Makefile Wed Jan 10 17:29:23 2018 (r458663) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= pytidylib -PORTVERSION= 0.2.4 +PORTVERSION= 0.3.2 CATEGORIES= textproc python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -13,12 +13,24 @@ COMMENT= Python wrapper for HTML Tidy (tidylib) LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -LIB_DEPENDS= libtidy.so:www/tidy-lib - USES= python USE_PYTHON= distutils autoplist - NO_ARCH= yes + +OPTIONS_DEFAULT=TIDYHTML5 +OPTIONS_SINGLE= BACKEND +OPTIONS_SINGLE_BACKEND= TIDYLIB TIDYHTML5 + +BACKEND_DESC= Backend library selection +TIDYLIB_DESC= Use tidylib +TIDYHTML5_DESC= Use tidy-html5 + +TIDYLIB_LIB_DEPENDS= libtidy.so:www/tidy-lib +TIDYHTML5_LIB_DEPENDS= libtidy5.so:www/tidy-html5 + +post-patch-TIDYHTML5-on: + @${REINPLACE_CMD} -e '/LIB_NAMES/ s|\[.*\]|["libtidy5.so"]|' \ + ${WRKSRC}/tidylib/tidy.py do-test: @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test Modified: head/textproc/py-pytidylib/distinfo ============================================================================== --- head/textproc/py-pytidylib/distinfo Wed Jan 10 17:15:09 2018 (r458662) +++ head/textproc/py-pytidylib/distinfo Wed Jan 10 17:29:23 2018 (r458663) @@ -1,2 +1,3 @@ -SHA256 (pytidylib-0.2.4.tar.gz) = 0af07bd8ebd256af70ca925ada9337faf16d85b3072624f975136a5134150ab6 -SIZE (pytidylib-0.2.4.tar.gz) = 86650 +TIMESTAMP = 1485774017 +SHA256 (pytidylib-0.3.2.tar.gz) = 22b1c8d75970d8064ff999c2369e98af1d0685417eda4c829a5c9f56764b0af3 +SIZE (pytidylib-0.3.2.tar.gz) = 87669 Modified: head/textproc/py-pytidylib/files/patch-setup.py ============================================================================== --- head/textproc/py-pytidylib/files/patch-setup.py Wed Jan 10 17:15:09 2018 (r458662) +++ head/textproc/py-pytidylib/files/patch-setup.py Wed Jan 10 17:29:23 2018 (r458663) @@ -1,9 +1,8 @@ ---- setup.py.orig 2016-02-26 12:55:44 UTC +--- setup.py.orig 2016-11-16 01:52:32 UTC +++ setup.py -@@ -84,5 +84,6 @@ setup( - 'Topic :: Text Processing :: Markup :: HTML', - 'Topic :: Text Processing :: Markup :: XML', - ], +@@ -94,4 +94,5 @@ setup( + 'Topic :: Text Processing :: Markup :: HTML', + 'Topic :: Text Processing :: Markup :: XML', + ], + test_suite='tests', - ) - + ) Added: head/textproc/py-pytidylib/files/patch-tidylib_tidy.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/py-pytidylib/files/patch-tidylib_tidy.py Wed Jan 10 17:29:23 2018 (r458663) @@ -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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801101729.w0AHTNwK020648>