pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/py-html5lib



Module Name:    pkgsrc
Committed By:   wiz
Date:           Tue Apr 30 09:01:14 UTC 2024

Modified Files:
        pkgsrc/textproc/py-html5lib: Makefile PLIST distinfo
Added Files:
        pkgsrc/textproc/py-html5lib/patches: patch-html5lib_tests_conftest.py
            patch-html5lib_tests_sanitizer.py patch-html5lib_tests_tokenizer.py
            patch-html5lib_tests_tree__construction.py
            patch-requirements-test.txt

Log Message:
py-html5lib: convert to wheel.mk.

Add upstream patches to get test suite to progress a bit further.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/textproc/py-html5lib/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/textproc/py-html5lib/PLIST
cvs rdiff -u -r1.12 -r1.13 pkgsrc/textproc/py-html5lib/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_conftest.py \
    pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_sanitizer.py \
    pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_tokenizer.py \
    pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_tree__construction.py \
    pkgsrc/textproc/py-html5lib/patches/patch-requirements-test.txt

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/py-html5lib/Makefile
diff -u pkgsrc/textproc/py-html5lib/Makefile:1.16 pkgsrc/textproc/py-html5lib/Makefile:1.17
--- pkgsrc/textproc/py-html5lib/Makefile:1.16   Sun Jan 14 09:44:59 2024
+++ pkgsrc/textproc/py-html5lib/Makefile        Tue Apr 30 09:01:14 2024
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2024/01/14 09:44:59 wiz Exp $
+# $NetBSD: Makefile,v 1.17 2024/04/30 09:01:14 wiz Exp $
 
 DISTNAME=      html5lib-1.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    textproc www python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=h/html5lib/}
 
@@ -11,16 +11,18 @@ HOMEPAGE=   https://github.com/html5lib/ht
 COMMENT=       HTML5 parser and tokenizer
 LICENSE=       mit
 
+TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
+TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
 DEPENDS+=      ${PYPKGPREFIX}-genshi-[0-9]*:../../www/py-genshi
+DEPENDS+=      ${PYPKGPREFIX}-lxml-[0-9]*:../../textproc/py-lxml
 DEPENDS+=      ${PYPKGPREFIX}-six>=1.9:../../lang/py-six
 DEPENDS+=      ${PYPKGPREFIX}-webencodings-[0-9]*:../../textproc/py-webencodings
-TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
 TEST_DEPENDS+= ${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-expect-[0-9]*:../../devel/py-test-expect
 
 USE_LANGUAGES= # none
 
-PYTHON_VERSIONED_DEPENDENCIES+=        lxml
+PYTHON_VERSIONS_INCOMPATIBLE=  27
 
-.include "../../lang/python/egg.mk"
-.include "../../lang/python/versioned_dependencies.mk"
+.include "../../lang/python/wheel.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/textproc/py-html5lib/PLIST
diff -u pkgsrc/textproc/py-html5lib/PLIST:1.9 pkgsrc/textproc/py-html5lib/PLIST:1.10
--- pkgsrc/textproc/py-html5lib/PLIST:1.9       Tue Nov  9 20:10:28 2021
+++ pkgsrc/textproc/py-html5lib/PLIST   Tue Apr 30 09:01:14 2024
@@ -1,9 +1,10 @@
-@comment $NetBSD: PLIST,v 1.9 2021/11/09 20:10:28 wiz Exp $
-${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
-${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
-${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
-${PYSITELIB}/${EGG_INFODIR}/requires.txt
-${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+@comment $NetBSD: PLIST,v 1.10 2024/04/30 09:01:14 wiz Exp $
+${PYSITELIB}/${WHEEL_INFODIR}/AUTHORS.rst
+${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
+${PYSITELIB}/${WHEEL_INFODIR}/METADATA
+${PYSITELIB}/${WHEEL_INFODIR}/RECORD
+${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt
 ${PYSITELIB}/html5lib/__init__.py
 ${PYSITELIB}/html5lib/__init__.pyc
 ${PYSITELIB}/html5lib/__init__.pyo

Index: pkgsrc/textproc/py-html5lib/distinfo
diff -u pkgsrc/textproc/py-html5lib/distinfo:1.12 pkgsrc/textproc/py-html5lib/distinfo:1.13
--- pkgsrc/textproc/py-html5lib/distinfo:1.12   Tue Nov  9 20:10:28 2021
+++ pkgsrc/textproc/py-html5lib/distinfo        Tue Apr 30 09:01:14 2024
@@ -1,5 +1,10 @@
-$NetBSD: distinfo,v 1.12 2021/11/09 20:10:28 wiz Exp $
+$NetBSD: distinfo,v 1.13 2024/04/30 09:01:14 wiz Exp $
 
 BLAKE2s (html5lib-1.1.tar.gz) = de98dc78f784829b373e37ad38851c062983d16b91322a32a2a77113e34b3240
 SHA512 (html5lib-1.1.tar.gz) = af7c29591007fded99be6c38e3d0ae5a4ac32d71d26046a615918ae732cb1c1ecbf754f47ceca1a53726c3843f3ecea7af87a7362281b45ff3af495815818626
 Size (html5lib-1.1.tar.gz) = 272215 bytes
+SHA1 (patch-html5lib_tests_conftest.py) = 7aefd6920c5b490e0d033003aef2a31cc0b87b86
+SHA1 (patch-html5lib_tests_sanitizer.py) = 7ef8278779354a83b59001b1c4eb726e668b58ef
+SHA1 (patch-html5lib_tests_tokenizer.py) = 069535e27579ab9e297986da60ea5072ea15c4f8
+SHA1 (patch-html5lib_tests_tree__construction.py) = 471730a2408cb7c46e1d76448101f6a708b298f4
+SHA1 (patch-requirements-test.txt) = e9c89a4bbd6fac87f5143bc4b1f0016993c14450

Added files:

Index: pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_conftest.py
diff -u /dev/null pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_conftest.py:1.1
--- /dev/null   Tue Apr 30 09:01:15 2024
+++ pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_conftest.py        Tue Apr 30 09:01:14 2024
@@ -0,0 +1,29 @@
+$NetBSD: patch-html5lib_tests_conftest.py,v 1.1 2024/04/30 09:01:14 wiz Exp $
+
+https://github.com/html5lib/html5lib-python/pull/506
+
+--- html5lib/tests/conftest.py.orig    2020-06-22 23:23:02.000000000 +0000
++++ html5lib/tests/conftest.py
+@@ -99,10 +99,19 @@ def pytest_collect_file(path, parent):
+ 
+     if _tree_construction in dir_and_parents:
+         if path.ext == ".dat":
+-            return TreeConstructionFile(path, parent)
++            return TreeConstructionFile.from_parent(parent, fspath=path)
+     elif _tokenizer in dir_and_parents:
+         if path.ext == ".test":
+-            return TokenizerFile(path, parent)
++            return TokenizerFile.from_parent(parent, fspath=path)
+     elif _sanitizer_testdata in dir_and_parents:
+         if path.ext == ".dat":
+-            return SanitizerFile(path, parent)
++            return SanitizerFile.from_parent(parent, fspath=path)
++
++
++# Tiny wrapper to allow .from_parent constructors on older pytest for PY27
++if not hasattr(pytest.Item.__base__, "from_parent"):
++    @classmethod
++    def from_parent(cls, parent, **kwargs):
++        return cls(parent=parent, **kwargs)
++
++    pytest.Item.__base__.from_parent = from_parent
Index: pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_sanitizer.py
diff -u /dev/null pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_sanitizer.py:1.1
--- /dev/null   Tue Apr 30 09:01:15 2024
+++ pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_sanitizer.py       Tue Apr 30 09:01:14 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-html5lib_tests_sanitizer.py,v 1.1 2024/04/30 09:01:14 wiz Exp $
+
+https://github.com/html5lib/html5lib-python/pull/506
+
+--- html5lib/tests/sanitizer.py.orig   2020-06-22 23:23:02.000000000 +0000
++++ html5lib/tests/sanitizer.py
+@@ -13,7 +13,7 @@ class SanitizerFile(pytest.File):
+         with codecs.open(str(self.fspath), "r", encoding="utf-8") as fp:
+             tests = json.load(fp)
+         for i, test in enumerate(tests):
+-            yield SanitizerTest(str(i), self, test=test)
++            yield SanitizerTest.from_parent(self, name=str(i), test=test)
+ 
+ 
+ class SanitizerTest(pytest.Item):
Index: pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_tokenizer.py
diff -u /dev/null pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_tokenizer.py:1.1
--- /dev/null   Tue Apr 30 09:01:15 2024
+++ pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_tokenizer.py       Tue Apr 30 09:01:14 2024
@@ -0,0 +1,30 @@
+$NetBSD: patch-html5lib_tests_tokenizer.py,v 1.1 2024/04/30 09:01:14 wiz Exp $
+
+https://github.com/html5lib/html5lib-python/pull/506
+
+--- html5lib/tests/tokenizer.py.orig   2020-06-22 23:23:02.000000000 +0000
++++ html5lib/tests/tokenizer.py
+@@ -192,7 +192,7 @@ class TokenizerFile(pytest.File):
+             tests = json.load(fp)
+         if 'tests' in tests:
+             for i, test in enumerate(tests['tests']):
+-                yield TokenizerTestCollector(str(i), self, testdata=test)
++                yield TokenizerTestCollector.from_parent(self, name=str(i), testdata=test)
+ 
+ 
+ class TokenizerTestCollector(pytest.Collector):
+@@ -207,10 +207,10 @@ class TokenizerTestCollector(pytest.Coll
+     def collect(self):
+         for initialState in self.testdata["initialStates"]:
+             initialState = capitalize(initialState)
+-            item = TokenizerTest(initialState,
+-                                 self,
+-                                 self.testdata,
+-                                 initialState)
++            item = TokenizerTest.from_parent(self,
++                                             name=initialState,
++                                             test=self.testdata,
++                                             initialState=initialState)
+             if self.testdata["input"] is None:
+                 item.add_marker(pytest.mark.skipif(True, reason="Relies on lone surrogates"))
+             yield item
Index: pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_tree__construction.py
diff -u /dev/null pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_tree__construction.py:1.1
--- /dev/null   Tue Apr 30 09:01:15 2024
+++ pkgsrc/textproc/py-html5lib/patches/patch-html5lib_tests_tree__construction.py      Tue Apr 30 09:01:14 2024
@@ -0,0 +1,47 @@
+$NetBSD: patch-html5lib_tests_tree__construction.py,v 1.1 2024/04/30 09:01:14 wiz Exp $
+
+https://github.com/html5lib/html5lib-python/pull/506
+
+--- html5lib/tests/tree_construction.py.orig   2020-06-22 23:23:02.000000000 +0000
++++ html5lib/tests/tree_construction.py
+@@ -26,7 +26,7 @@ class TreeConstructionFile(pytest.File):
+     def collect(self):
+         tests = TestData(str(self.fspath), "data")
+         for i, test in enumerate(tests):
+-            yield TreeConstructionTest(str(i), self, testdata=test)
++            yield TreeConstructionTest.from_parent(self, name=str(i), testdata=test)
+ 
+ 
+ class TreeConstructionTest(pytest.Collector):
+@@ -48,11 +48,11 @@ class TreeConstructionTest(pytest.Collec
+                 nodeid = "%s::parser::namespaced" % treeName
+             else:
+                 nodeid = "%s::parser::void-namespace" % treeName
+-            item = ParserTest(nodeid,
+-                              self,
+-                              self.testdata,
+-                              treeAPIs["builder"] if treeAPIs is not None else None,
+-                              namespaceHTMLElements)
++            item = ParserTest.from_parent(self,
++                                          name=nodeid,
++                                          test=self.testdata,
++                                          treeClass=treeAPIs["builder"] if treeAPIs is not None else None,
++                                          namespaceHTMLElements=namespaceHTMLElements)
+             item.add_marker(getattr(pytest.mark, treeName))
+             item.add_marker(pytest.mark.parser)
+             if namespaceHTMLElements:
+@@ -61,10 +61,10 @@ class TreeConstructionTest(pytest.Collec
+ 
+     def _getTreeWalkerTests(self, treeName, treeAPIs):
+         nodeid = "%s::treewalker" % treeName
+-        item = TreeWalkerTest(nodeid,
+-                              self,
+-                              self.testdata,
+-                              treeAPIs)
++        item = TreeWalkerTest.from_parent(self,
++                                          name=nodeid,
++                                          test=self.testdata,
++                                          treeAPIs=treeAPIs)
+         item.add_marker(getattr(pytest.mark, treeName))
+         item.add_marker(pytest.mark.treewalker)
+         yield item
Index: pkgsrc/textproc/py-html5lib/patches/patch-requirements-test.txt
diff -u /dev/null pkgsrc/textproc/py-html5lib/patches/patch-requirements-test.txt:1.1
--- /dev/null   Tue Apr 30 09:01:15 2024
+++ pkgsrc/textproc/py-html5lib/patches/patch-requirements-test.txt     Tue Apr 30 09:01:14 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-requirements-test.txt,v 1.1 2024/04/30 09:01:14 wiz Exp $
+
+https://github.com/html5lib/html5lib-python/pull/506
+
+--- requirements-test.txt.orig 2020-06-10 01:34:36.000000000 +0000
++++ requirements-test.txt
+@@ -3,7 +3,7 @@
+ tox>=3.15.1,<4
+ flake8>=3.8.1,<3.9
+ pytest>=4.6.10,<5 ; python_version < '3'
+-pytest>=5.4.2,<6 ; python_version >= '3'
++pytest>=5.4.2,<7 ; python_version >= '3'
+ coverage>=5.1,<6
+ pytest-expect>=1.1.0,<2
+ mock>=3.0.5,<4 ; python_version < '3.6'



Home | Main Index | Thread Index | Old Index