Re: PEP394

From: Max Brazhnikov <makc_at_freebsd.org>
Date: Sat, 11 Oct 2025 08:57:34 UTC
On Thu, 9 Oct 2025 23:16:01 -0500 Stephen Montgomery-Smith wrote:
> I am the maintainer of the math/octave port.  It's python function 
> depends upon the existence of the python3 command, saying in 
> ${WRKSRC}/scripts/miscellaneous/python.m on lines 74-75
> 
>      ## PEP394 says Python 3 installs should all provide this command
>      pyexec = "python3";
> 
> I notice that the lang/python3.11 doesn't include python3 as a link to 
> python3.11.
> 
> My guess is that you have discussed this to death, but google didn't dig 
> up for me any of these discussions.
> 
> Right now I am going to do a
> ${REINPLACE_CMD} s+python3+${PYTHON_CMD}+ 
> ${WRKSRC}/scripts/miscellaneous/python.m

You can use BINARY_ALIAS if the port needs python3 during build stage, e.g.
"BINARY_ALIAS=  python3=${PYTHON_VERSION}".
If the port installs scripts with hardcoded python3, than you need "USES+= shebangfix".
See for details:

https://docs.freebsd.org/en/books/porters-handbook/makefiles/#binary-alias
https://docs.freebsd.org/en/books/porters-handbook/uses/#uses-shebangfix

Cheers,
Max