This seems to be a python.mk problem with the pep517 framework, but I just happened to notice it in this port first. sed: /usr/ports/textproc/py-pyphen/work-py39/stage/opt/lib/python3.9/site-packages/pyphen-0.13.0.dist-info/RECORD: No such file or directory The RECORD file is actually in stage/usr/local/... instead. It seems PREFIX is at least partially ignored for pep517.
CC'd vishwin@ for a pep517 look.
It's using ${PYTHONPREFIX_SITELIBDIR}, which includes ${PREFIX} by default.
(In reply to Charlie Li from comment #2) Yes. But 'make stage' did not install to PREFIX. It installed to LOCALBASE. Just as a check, I reverted to distutils, and 'make stage' succeeds and it installs to PREFIX.
What is the output of sys.prefix when run in the Python interpreter used during stage?
Created attachment 240056 [details] v1 Try this
(In reply to Charlie Li from comment #4) sys.prefix is /usr/local as expected (that is what LOCALBASE is set to).
(In reply to John Hein from comment #6) That makes 'make stage PREFIX=/whatever' work now, and the files are in the correct location (under PREFIX) in stage/. I'll try a few more ports to verify this in the next day or two. But that seems like the right fix.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9fbe5f4d774c1f818ec604a438356311f3bc76ee commit 9fbe5f4d774c1f818ec604a438356311f3bc76ee Author: Charlie Li <vishwin@FreeBSD.org> AuthorDate: 2023-02-10 20:04:58 +0000 Commit: Charlie Li <vishwin@FreeBSD.org> CommitDate: 2023-02-25 17:35:32 +0000 python.mk: explicitly pass ${PREFIX} to ${PEP517_INSTALL_CMD} Otherwise the stage prefix is ${PYTHONBASE} by default. Reported by: John Hein <jcfyecrayz[at]liamekaens[point]com> PR: 269472 Mk/Uses/python.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Committed, thanks!