Date: Thu, 9 Mar 2023 03:44:08 GMT From: Charlie Li <vishwin@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 16a6fecb4ff8 - main - python.mk: use script to process RECORD for the first pass Message-ID: <202303090344.3293i8Q4064024@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by vishwin: URL: https://cgit.FreeBSD.org/ports/commit/?id=16a6fecb4ff8b051ba1b238267b7cd15b19cda75 commit 16a6fecb4ff8b051ba1b238267b7cd15b19cda75 Author: Charlie Li <vishwin@FreeBSD.org> AuthorDate: 2023-03-09 03:33:57 +0000 Commit: Charlie Li <vishwin@FreeBSD.org> CommitDate: 2023-03-09 03:33:57 +0000 python.mk: use script to process RECORD for the first pass RECORD is a CSV file [0] containing more data than our plist format accepts. The original processing method used sed(1) exclusively, but paths containing quotes, spaces and commas throw it off. Process the CSV properly instead for the first pass. References: https://packaging.python.org/en/latest/specifications/recording-installed-packages/#the-record-file [0] --- Mk/Uses/python.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index d0754dc02097..6e25d0427cb2 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -870,7 +870,9 @@ do-build: do-install: @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} @cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD} - @${SED} -e 's|^|${PYTHONPREFIX_SITELIBDIR}/|' \ + @${PYTHON_CMD} -B ${PORTSDIR}/Tools/scripts/strip_RECORD.py \ + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:C/[-_]+/_/g}-${PORTVERSION}.dist-info/RECORD >> ${_PYTHONPKGLIST} + @${REINPLACE_CMD} -e 's|^|${PYTHONPREFIX_SITELIBDIR}/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../etc/|etc/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../bin/|bin/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../include/|include/|' \ @@ -880,8 +882,7 @@ do-install: -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../man/|man/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../sbin/|sbin/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../share/|share/|' \ - -e 's|\,.*$$||' \ - ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:C/[-_]+/_/g}-${PORTVERSION}.dist-info/RECORD >> ${_PYTHONPKGLIST} + ${_PYTHONPKGLIST} . endif . endif # defined(_PYTHON_FEATURE_PEP517)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303090344.3293i8Q4064024>