If a port uses shebangfix on .py files without utilizing/pulling in python it'll silently fail.
for me it failed noisily when preparing a security/openvpn-devel patch, https://cgit.freebsd.org/ports/commit/security/openvpn-devel?id=bb24536ac02a721fdc6657a2ff5e43c0c71ae54e did complain in stage-qa here with Error: '/usr/local/bin/python' is an invalid shebang you need USES=shebangfix for 'share/examples/openvpn/sample-scripts/totpauth.py' Although it had replaced the original /usr/bin/python3 with /usr/local/bin/python (and default LOCALBASE).
Same here updating print/paps with meson: USES+= shebangfix SHEBANG_FILES= scripts/src-to-paps --- ===> Staging for paps-0.8.0 ===> Generating temporary packing list [ 0% 1/1] /usr/local/bin/meson install --no-rebuild Installing src/paps to /usr/home/nunotex/Work/freebsd/ports/main/print/paps/work/stage/usr/local/bin Stripping target 'src/paps'. Installing /usr/home/nunotex/Work/freebsd/ports/main/print/paps/work/paps-0.8.0/src/paps.1 to /usr/home/nunotex/Work/freebsd/ports/main/print/paps/work/stage/usr/local/man/man1 Installing /usr/home/nunotex/Work/freebsd/ports/main/print/paps/work/paps-0.8.0/misc/pango_markup.outlang to /usr/home/nunotex/Work/freebsd/ports/main/print/paps/work/stage/usr/local/share/paps Installing /usr/home/nunotex/Work/freebsd/ports/main/print/paps/work/paps-0.8.0/scripts/src-to-paps to /usr/home/nunotex/Work/freebsd/ports/main/print/paps/work/stage/usr/local/bin ====> Compressing man pages (compress-man) ====> Running Q/A tests (stage-qa) Error: '/usr/local/bin/python' is an invalid shebang you need USES=shebangfix for 'bin/src-to-paps' *** Error code 1 --- Any workaround?
(...) Fixed by adding python to USES.
The workaround is to use python:env unless the port actually depends on python