git: 5cfc1413ac3c - main - python.mk: privatise PYMAGICTAG

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Thu, 19 Jun 2025 18:50:15 UTC
The branch main has been updated by vishwin:

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

commit 5cfc1413ac3cec6225bd7ca53a7658e3949f70a6
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2025-06-19 18:48:45 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2025-06-19 18:48:45 +0000

    python.mk: privatise PYMAGICTAG
    
    Used as a command to populate the correct tag for bytecode files
    according to PEP 3147 under USE_PYTHON=py3kplist. Not for general
    use.
    
    Event: Kitchener-Waterloo Hackathon 202506
---
 Mk/Uses/python.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index aba9c48df38c..bffb94c62e04 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -816,7 +816,7 @@ add-plist-pymod:
 # When Python version is 3.2+ we rewrite all the filenames
 # of TMPPLIST that end with .py[co], so that they conform
 # to PEP 3147 (see https://www.python.org/dev/peps/pep-3147/)
-PYMAGICTAG=		${PYTHON_CMD} -c 'import sys; print(sys.implementation.cache_tag)'
+_PYMAGICTAG=		${PYTHON_CMD} -c 'import sys; print(sys.implementation.cache_tag)'
 _USES_stage+=	935:add-plist-python
 add-plist-python:
 	@${AWK} '\
@@ -825,7 +825,7 @@ add-plist-python:
 		/^@dirrmtry / {d = substr($$0, 11); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \
 		{print} \
 		' \
-		pc="__pycache__" mt="$$(${PYMAGICTAG})" pyo="opt-1.pyc" \
+		pc="__pycache__" mt="$$(${_PYMAGICTAG})" pyo="opt-1.pyc" \
 		${TMPPLIST} > ${TMPPLIST}.pyc_tmp
 	@${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST}
 .    endif # ${PYTHON_REL} >= 30200 && defined(_PYTHON_FEATURE_PY3KPLIST)