git: e237c912125c - main - comms/py-pyserial: Add an EXAMPLES option
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Dec 2021 17:38:11 UTC
The branch main has been updated by leres:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e237c912125cf736a2bb67759d23d3e11cb5acc3
commit e237c912125cf736a2bb67759d23d3e11cb5acc3
Author: Craig Leres <leres@FreeBSD.org>
AuthorDate: 2021-12-28 17:37:39 +0000
Commit: Craig Leres <leres@FreeBSD.org>
CommitDate: 2021-12-28 17:37:39 +0000
comms/py-pyserial: Add an EXAMPLES option
The pyserial distribution includes a handy tcp/serial port bridge
script called tcp_serial_redirect.py. Add an EXAMPLES option to
install this (along with other pyserial example scripts).
PR: 260328
Approved by: sbz (maintainer timeout, 18 days)
---
comms/py-pyserial/Makefile | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/comms/py-pyserial/Makefile b/comms/py-pyserial/Makefile
index 7dd89f348134..4e53177b4903 100644
--- a/comms/py-pyserial/Makefile
+++ b/comms/py-pyserial/Makefile
@@ -2,7 +2,7 @@
PORTNAME= pyserial
PORTVERSION= 3.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= comms python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -13,13 +13,29 @@ COMMENT= Serial port encapsulation library for Python
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
-USES= python:3.6+
+USES= python:3.6+ shebangfix
+SHEBANG_FILES= examples/*.py
USE_PYTHON= distutils autoplist concurrent
+PORTEXAMPLES= at_protocol.py port_publisher.py rfc2217_server.py \
+ setup-miniterm-py2exe.py setup-rfc2217_server-py2exe.py \
+ setup-wxTerminal-py2exe.py tcp_serial_redirect.py \
+ wxSerialConfigDialog.py wxTerminal.py
+
+EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME}
+
+OPTIONS_DEFINE= EXAMPLES
+
NO_ARCH= yes
+post-install:
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_SCRIPT} ${PORTEXAMPLES:S,^,${WRKSRC}/examples/,} \
+ ${STAGEDIR}${EXAMPLESDIR}
+
do-test:
- ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} ${PYTHON_CMD} ${WRKSRC}/test/test.py
+ ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
+ ${PYTHON_CMD} ${WRKSRC}/test/test.py
.include <bsd.port.mk>