git: 439898268332 - main - devel/py-pyyaml5: Add py-pyyaml5 5.4.1 (copied from py-yaml)

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 30 Jan 2023 23:51:52 UTC
The branch main has been updated by sunpoet:

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

commit 439898268332f576dc7bbbb9351a01d5eca562c3
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-01-30 23:48:59 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-01-30 23:51:42 +0000

    devel/py-pyyaml5: Add py-pyyaml5 5.4.1 (copied from py-yaml)
    
    - Add CONFLICTS_INSTALL
    - Add PORTSCOUT
---
 devel/Makefile             |  1 +
 devel/py-pyyaml5/Makefile  | 50 ++++++++++++++++++++++++++++++++++++++++++++++
 devel/py-pyyaml5/distinfo  |  3 +++
 devel/py-pyyaml5/pkg-descr | 14 +++++++++++++
 devel/py-pyyaml5/pkg-plist |  4 ++++
 5 files changed, 72 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index eb7f0be7bc1f..766a34cbc10b 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5287,6 +5287,7 @@
     SUBDIR += py-pyvisa-py
     SUBDIR += py-pyxb
     SUBDIR += py-pyyaml-include
+    SUBDIR += py-pyyaml5
     SUBDIR += py-pyyaml_env_tag
     SUBDIR += py-pyzipper
     SUBDIR += py-q
diff --git a/devel/py-pyyaml5/Makefile b/devel/py-pyyaml5/Makefile
new file mode 100644
index 000000000000..5a2c75dde5d3
--- /dev/null
+++ b/devel/py-pyyaml5/Makefile
@@ -0,0 +1,50 @@
+PORTNAME=	pyyaml
+PORTVERSION=	5.4.1
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+PKGNAMESUFFIX=	5
+DISTNAME=	PyYAML-${PORTVERSION}
+
+MAINTAINER=	python@FreeBSD.org
+COMMENT=	Python YAML parser
+WWW=		https://pyyaml.org/
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python:3.6+
+USE_PYTHON=	autoplist concurrent cython distutils
+
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}yaml
+
+PORTSCOUT=	limit:^5\.
+
+OPTIONS_DEFINE=	LIBYAML EXAMPLES
+OPTIONS_DEFAULT=LIBYAML
+LIBYAML_DESC=	Use textproc/libyaml for faster parsing
+
+LIBYAML_LIB_DEPENDS=	libyaml.so:textproc/libyaml
+
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MLIBYAML}
+PYDISTUTILS_SETUP+=		--with-libyaml
+PYDISTUTILS_BUILD_TARGET=	build_ext
+PYDISTUTILS_BUILDARGS+=		--include-dirs=${LOCALBASE}/include \
+				--library-dirs=${LOCALBASE}/lib
+.else
+PYDISTUTILS_SETUP+=		--without-libyaml
+NO_ARCH=			yes
+.endif
+
+post-install-EXAMPLES-on:
+	@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/)
+
+post-install-LIBYAML-on:
+	@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/yaml/_yaml*.so
+
+do-test:
+	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
+
+.include <bsd.port.post.mk>
diff --git a/devel/py-pyyaml5/distinfo b/devel/py-pyyaml5/distinfo
new file mode 100644
index 000000000000..d2b4d347de18
--- /dev/null
+++ b/devel/py-pyyaml5/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1622221237
+SHA256 (PyYAML-5.4.1.tar.gz) = 607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e
+SIZE (PyYAML-5.4.1.tar.gz) = 175147
diff --git a/devel/py-pyyaml5/pkg-descr b/devel/py-pyyaml5/pkg-descr
new file mode 100644
index 000000000000..aa8457b69545
--- /dev/null
+++ b/devel/py-pyyaml5/pkg-descr
@@ -0,0 +1,14 @@
+PyYAML is a YAML parser and emitter for the Python programming language.
+
+PyYAML features:
+   * a complete YAML 1.1 parser. In particular, PyYAML can parse all examples
+     from the specification. The parsing algorithm is simple enough to be a
+     reference for YAML parser implementors.
+   * Unicode support including UTF-8/UTF-16 input/output and \u escape
+     sequences.
+   * low-level event-based parser and emitter API (like SAX).
+   * high-level API for serializing and deserializing native Python objects
+     (like DOM or pickle).
+   * support for all types from the YAML types repository. A simple extension
+     API is provided.
+   * relatively sensible error messages.
diff --git a/devel/py-pyyaml5/pkg-plist b/devel/py-pyyaml5/pkg-plist
new file mode 100644
index 000000000000..e66ce5f13c7a
--- /dev/null
+++ b/devel/py-pyyaml5/pkg-plist
@@ -0,0 +1,4 @@
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pygments-lexer/example.yaml
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pygments-lexer/yaml.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yaml-highlight/yaml_hl.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yaml-highlight/yaml_hl.py