git: f7274d0f0650 - main - devel/py-packaging: Allow build with py-pyparsing 3+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Fri, 05 Nov 2021 19:17:20 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f7274d0f0650698a133fc1916e76b1a30912d9d5

commit f7274d0f0650698a133fc1916e76b1a30912d9d5
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-11-05 19:03:06 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-11-05 19:14:09 +0000

    devel/py-packaging: Allow build with py-pyparsing 3+
    
    - Bump PORTREVISION for package change
    
    Obtained from:  https://github.com/pypa/packaging/commit/8cb9dbf19e2b76ab025efc11208bd50e09e8223e
---
 devel/py-packaging/Makefile                               |  3 ++-
 devel/py-packaging/files/patch-setup.py                   | 13 +++++++++++++
 devel/py-packaging/files/patch-tests-test_requirements.py | 12 ++++++++++++
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/devel/py-packaging/Makefile b/devel/py-packaging/Makefile
index 1fcac8220005..954cfacd093a 100644
--- a/devel/py-packaging/Makefile
+++ b/devel/py-packaging/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	packaging
 PORTVERSION=	21.2
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -14,7 +15,7 @@ LICENSE_COMB=	dual
 LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE.APACHE
 LICENSE_FILE_BSD2CLAUSE=${WRKSRC}/LICENSE.BSD
 
-RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pyparsing>=2.0.2<3:devel/py-pyparsing@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pyparsing>=2.0.2:devel/py-pyparsing@${PY_FLAVOR}
 
 USES=		python:3.6+
 USE_PYTHON=	autoplist concurrent distutils
diff --git a/devel/py-packaging/files/patch-setup.py b/devel/py-packaging/files/patch-setup.py
new file mode 100644
index 000000000000..c96dd1ab8c20
--- /dev/null
+++ b/devel/py-packaging/files/patch-setup.py
@@ -0,0 +1,13 @@
+Obtained from:  https://github.com/pypa/packaging/commit/8cb9dbf19e2b76ab025efc11208bd50e09e8223e
+
+--- setup.py.orig	2021-10-29 11:19:27 UTC
++++ setup.py
+@@ -48,7 +48,7 @@ setup(
+     author=about["__author__"],
+     author_email=about["__email__"],
+     python_requires=">=3.6",
+-    install_requires=["pyparsing>=2.0.2,<3"],  # Needed to avoid issue #91
++    install_requires=["pyparsing>=2.0.2"],  # Needed to avoid issue #91
+     classifiers=[
+         "Development Status :: 5 - Production/Stable",
+         "Intended Audience :: Developers",
diff --git a/devel/py-packaging/files/patch-tests-test_requirements.py b/devel/py-packaging/files/patch-tests-test_requirements.py
new file mode 100644
index 000000000000..689bc638086e
--- /dev/null
+++ b/devel/py-packaging/files/patch-tests-test_requirements.py
@@ -0,0 +1,12 @@
+Obtained from:  https://github.com/pypa/packaging/commit/8cb9dbf19e2b76ab025efc11208bd50e09e8223e
+
+--- tests/test_requirements.py.orig	2021-07-23 07:28:49 UTC
++++ tests/test_requirements.py
+@@ -192,4 +192,6 @@ class TestRequirements:
+     def test_parseexception_error_msg(self):
+         with pytest.raises(InvalidRequirement) as e:
+             Requirement("toto 42")
+-        assert "Expected stringEnd" in str(e.value)
++        assert "Expected stringEnd" in str(e.value) or (
++            "Expected string_end" in str(e.value)  # pyparsing>=3.0.0
++        )