View | Details | Raw Unified | Return to bug 220861 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-4 / +16 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	pytidylib
4
PORTNAME=	pytidylib
5
PORTVERSION=	0.2.4
5
PORTVERSION=	0.3.2
6
CATEGORIES=	textproc python
6
CATEGORIES=	textproc python
7
MASTER_SITES=	CHEESESHOP
7
MASTER_SITES=	CHEESESHOP
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
Lines 13-25 Link Here
13
LICENSE=	MIT
13
LICENSE=	MIT
14
LICENSE_FILE=	${WRKSRC}/LICENSE
14
LICENSE_FILE=	${WRKSRC}/LICENSE
15
15
16
LIB_DEPENDS=	libtidy.so:www/tidy-lib
17
18
USES=		python
16
USES=		python
19
USE_PYTHON=	distutils autoplist
17
USE_PYTHON=	distutils autoplist
20
21
NO_ARCH=	yes
18
NO_ARCH=	yes
22
19
20
OPTIONS_DEFAULT=TIDYHTML5
21
OPTIONS_SINGLE=	BACKEND
22
OPTIONS_SINGLE_BACKEND=	TIDYLIB TIDYHTML5
23
24
BACKEND_DESC=	Backend library selection
25
TIDYLIB_DESC=	Use tidylib
26
TIDYHTML5_DESC=	Use tidy-html5
27
28
TIDYLIB_LIB_DEPENDS=	libtidy.so:www/tidy-lib
29
TIDYHTML5_LIB_DEPENDS=	libtidy5.so:www/tidy-html5
30
31
post-patch-TIDYHTML5-on:
32
	@${REINPLACE_CMD} -e '/LIB_NAMES/ s|\[.*\]|["libtidy5.so"]|' \
33
		${WRKSRC}/tidylib/tidy.py
34
23
do-test:
35
do-test:
24
	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
36
	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
25
37
(-)distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (pytidylib-0.2.4.tar.gz) = 0af07bd8ebd256af70ca925ada9337faf16d85b3072624f975136a5134150ab6
1
TIMESTAMP = 1485774017
2
SIZE (pytidylib-0.2.4.tar.gz) = 86650
2
SHA256 (pytidylib-0.3.2.tar.gz) = 22b1c8d75970d8064ff999c2369e98af1d0685417eda4c829a5c9f56764b0af3
3
SIZE (pytidylib-0.3.2.tar.gz) = 87669
(-)files/patch-setup.py (-7 / +6 lines)
Lines 1-9 Link Here
1
--- setup.py.orig	2016-02-26 12:55:44 UTC
1
--- setup.py.orig	2016-11-16 01:52:32 UTC
2
+++ setup.py
2
+++ setup.py
3
@@ -84,5 +84,6 @@ setup(
3
@@ -94,4 +94,5 @@ setup(
4
           'Topic :: Text Processing :: Markup :: HTML',
4
         'Topic :: Text Processing :: Markup :: HTML',
5
           'Topic :: Text Processing :: Markup :: XML',
5
         'Topic :: Text Processing :: Markup :: XML',
6
           ],
6
     ],
7
+    test_suite='tests',
7
+    test_suite='tests',
8
     )
8
 )
9
 
(-)files/patch-tidylib_tidy.py (+21 lines)
Line 0 Link Here
1
--- tidylib/tidy.py.orig	2016-11-16 01:49:58 UTC
2
+++ tidylib/tidy.py
3
@@ -29,8 +29,7 @@ from .sink import create_sink, destroy_s
4
 __all__ = ['Tidy', 'PersistentTidy']
5
 
6
 # Default search order for library names if nothing is passed in
7
-LIB_NAMES = ['libtidy', 'libtidy.so', 'libtidy-0.99.so.0', 'cygtidy-0-99-0',
8
-             'tidylib', 'libtidy.dylib', 'tidy']
9
+LIB_NAMES = ['libtidy-0.99.so.0']
10
 
11
 # Error code from library
12
 ENOMEM = -12
13
@@ -84,7 +83,7 @@ class Tidy(object):
14
     def __init__(self, lib_names=None):
15
         self._tidy = None
16
         if lib_names is None:
17
-            lib_names = ctypes.util.find_library('tidy') or LIB_NAMES
18
+            lib_names = LIB_NAMES
19
         if isinstance(lib_names, str):
20
             lib_names = [lib_names]
21
         for name in lib_names:

Return to bug 220861