Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Aug 2024 17:24:29 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 50685fd90c0c - main - devel/nanopb: Build and install python bytecode
Message-ID:  <202408041724.474HOTvi069594@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

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

commit 50685fd90c0c1827e93b5fdaf1ee82ceb3d534ea
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-08-04 17:11:30 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-08-04 17:14:31 +0000

    devel/nanopb: Build and install python bytecode
    
    - Bump PORTREVISION for package change
    
    from devel/criterion build log:
    =>> Checking for filesystem violations... done
    =>> Error: Filesystem touched during build:
    extra: usr/local/bin/__pycache__
    extra: usr/local/lib/python3.11/site-packages/nanopb/__pycache__
    extra: usr/local/lib/python3.11/site-packages/nanopb/generator/proto/__pycache__
    extra: usr/local/lib/python3.11/site-packages/nanopb/generator/__pycache__
    =>> Cleaning up wrkdir
    ===>  Cleaning for criterion-2.4.2_2
    
    Approved by:    portmgr (blanket)
    With hat:       python
---
 devel/nanopb/Makefile  |  7 +++++++
 devel/nanopb/pkg-plist | 14 ++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/devel/nanopb/Makefile b/devel/nanopb/Makefile
index d0cb81b91271..70567b29b752 100644
--- a/devel/nanopb/Makefile
+++ b/devel/nanopb/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	nanopb
 DISTVERSION=	0.4.8
+PORTREVISION=	1
 CATEGORIES=	devel
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -30,6 +31,12 @@ CMAKE_ARGS=	-DPython_EXECUTABLE=${PYTHON_CMD}
 
 BINARY_ALIAS=	python3=${PYTHON_CMD} # only for tests
 
+post-install:
+	${PYTHON_CMD} -m compileall -d ${PREFIX}/bin -f ${STAGEDIR}${PREFIX}/bin
+	${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR} -f ${STAGEDIR}${PYTHON_SITELIBDIR}
+	${PYTHON_CMD} -O -m compileall -d ${PREFIX}/bin -f ${STAGEDIR}${PREFIX}/bin
+	${PYTHON_CMD} -O -m compileall -d ${PYTHON_SITELIBDIR} -f ${STAGEDIR}${PYTHON_SITELIBDIR}
+
 do-test:
 	@cd ${WRKSRC}/tests && ${SETENV} ${TEST_ENV} scons LINKLIBS=-lm
 
diff --git a/devel/nanopb/pkg-plist b/devel/nanopb/pkg-plist
index 0b29c100778a..8015a0a1967a 100644
--- a/devel/nanopb/pkg-plist
+++ b/devel/nanopb/pkg-plist
@@ -1,3 +1,5 @@
+bin/__pycache__/nanopb_generator%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+bin/__pycache__/nanopb_generator%%PYTHON_EXT_SUFFIX%%.pyc
 bin/nanopb_generator
 bin/nanopb_generator.py
 bin/protoc-gen-nanopb
@@ -13,9 +15,21 @@ lib/libprotobuf-nanopb.a
 lib/libprotobuf-nanopb.so
 lib/libprotobuf-nanopb.so.0
 %%PYTHON_SITELIBDIR%%/nanopb/__init__.py
+%%PYTHON_SITELIBDIR%%/nanopb/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/nanopb/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
 %%PYTHON_SITELIBDIR%%/nanopb/generator/__init__.py
+%%PYTHON_SITELIBDIR%%/nanopb/generator/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/nanopb/generator/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/nanopb/generator/__pycache__/nanopb_generator%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/nanopb/generator/__pycache__/nanopb_generator%%PYTHON_EXT_SUFFIX%%.pyc
 %%PYTHON_SITELIBDIR%%/nanopb/generator/nanopb_generator.py
 %%PYTHON_SITELIBDIR%%/nanopb/generator/proto/__init__.py
+%%PYTHON_SITELIBDIR%%/nanopb/generator/proto/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/nanopb/generator/proto/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/nanopb/generator/proto/__pycache__/_utils%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/nanopb/generator/proto/__pycache__/_utils%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/nanopb/generator/proto/__pycache__/nanopb_pb2%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/nanopb/generator/proto/__pycache__/nanopb_pb2%%PYTHON_EXT_SUFFIX%%.pyc
 %%PYTHON_SITELIBDIR%%/nanopb/generator/proto/_utils.py
 %%PYTHON_SITELIBDIR%%/nanopb/generator/proto/nanopb.proto
 %%PYTHON_SITELIBDIR%%/nanopb/generator/proto/nanopb_pb2.py



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408041724.474HOTvi069594>