aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Li <vishwin@FreeBSD.org>2023-01-14 01:30:42 +0000
committerCharlie Li <vishwin@FreeBSD.org>2023-02-26 03:14:17 +0000
commit18982c467f6ce3109f1e71198274eeac45f35297 (patch)
tree2f276cd47689ea44e9a51cda90b2b2f918c53a4a
parentc3dd65404e108ffcc60527badeab4f7fc895a5c9 (diff)
python.mk: PEP-517 data_files support
data_files was not initially supported in the framework under the guise that PyPA through setuptools deprecated the practice. However, other build backends like flit still support (and advertise as a "newer" feature) data_files, and certain packages continue to install operating system-specific files like man pages using Python's packaging system. This expands RECORD parsing to account for any data_files beyond entry_points installed to bin/. It is limited to certain directories in hier(7) listed under /usr/local to prevent wheels from installing files to arbitrary locations. Tested by: yasu (first pass) Differential Revision: https://reviews.freebsd.org/D38050
-rw-r--r--Mk/Uses/python.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index ec86003565ee..4e264234772e 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -872,6 +872,12 @@ do-install:
@cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD}
@${SED} -e 's|^|${PYTHONPREFIX_SITELIBDIR}/|' \
-e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../bin/|bin/|' \
+ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../include/|include/|' \
+ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../lib/|lib/|' \
+ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../libdata/|libdata/|' \
+ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../libexec/|libexec/|' \
+ -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}
. endif