Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Feb 2023 03:15:21 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: 18982c467f6c - main - python.mk: PEP-517 data_files support
Message-ID:  <202302260315.31Q3FLS6093197@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=18982c467f6ce3109f1e71198274eeac45f35297

commit 18982c467f6ce3109f1e71198274eeac45f35297
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2023-01-14 01:30:42 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2023-02-26 03:14:17 +0000

    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
---
 Mk/Uses/python.mk | 6 ++++++
 1 file changed, 6 insertions(+)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302260315.31Q3FLS6093197>