Created attachment 144136 [details] fix-py-html5lib-python-ver.patch The Python version is set to 2.x only, yet html5lib supports Python 3. How-To-Repeat: Install python 3 and then html5lib. Python 2.7 is pulled in.
Redports: https://redports.org/buildarchive/20140625053801-53876/
Assign to maintainer
Thanks for your submission Melvyn. Could you please: * Provide unit test output under Python 2.x and 3.x to confirm that the new version works (functionally) under both? More info here: https://github.com/html5lib/html5lib-python/blob/master/README.rst#tests
They don't and I doubt it works with the version in ports as well. Needs a RUN_DEPENDS on devel/py-six. See html5lib-python/html5lib/html5parser.py line 2.
Python 3: Ran 25610 tests in 79.508s OK Python 2: Ran 25610 tests in 85.931s OK I have the following now, but the porters handbook doesn't include anything about running a test suite. If this is OK, I'll resubmit. diff -r 4a8fd906061d www/py-html5lib/Makefile --- a/www/py-html5lib/Makefile Thu Jun 26 20:55:34 2014 +0200 +++ b/www/py-html5lib/Makefile Thu Jun 26 22:34:01 2014 +0200 @@ -3,9 +3,11 @@ PORTNAME= html5lib PORTVERSION= 0.999 +PORTREVISION= 1 CATEGORIES= www python -MASTER_SITES= GOOGLE_CODE \ - CHEESESHOP +MASTER_SITES= GOOGLE_CODE:master \ + CHEESESHOP:master \ + http://magemana.nl/ports/dist/:test PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= rm@FreeBSD.org @@ -13,8 +15,28 @@ LICENSE= MIT +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:${PORTSDIR}/devel/py-six +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>0:${PORTSDIR}/devel/py-nose + +OPTIONS_DEFINE= TEST + USE_PYTHON= yes USE_PYDISTUTILS= yes PYDISTUTILS_AUTOPLIST= yes +.include <bsd.port.options.mk> +.if !empty(PORT_OPTIONS:MTEST) +DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:master \ + ${PORTNAME}-${PORTVERSION}-testdata${EXTRACT_SUFX}:test +BUILD_DEPENDS+= ${TEST_DEPENDS} +.endif + +regression-test: build + @${ECHO_MSG} "===> Testing ${PORTNAME} (patience...)" + @cd ${WRKSRC} && nosetests -q + +.if !empty(PORT_OPTIONS:MTEST) +pre-install: regression-test +.endif + .include <bsd.port.mk>
FYI: Added the -q to nosetest, cause otherwise you WILL get 25k dots on your screen / in your log.
A commit references this bug: Author: rm Date: Tue Jul 8 06:28:07 UTC 2014 New revision: 361181 URL: http://svnweb.freebsd.org/changeset/ports/361181 Log: www/py-html5lib: update python version - update python version: 3.x is now supported - add tests PR: 191385 Submitted by: melvyn@magemana.nl Reviewed by: koobs Changes: head/www/py-html5lib/Makefile head/www/py-html5lib/distinfo
Committed, thank you!