Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Mar 2023 08:56:39 +0100
From:      Mathieu Arnold <mat@freebsd.org>
To:        Charlie Li <vishwin@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: 16a6fecb4ff8 - main - python.mk: use script to process RECORD for the first pass
Message-ID:  <20230309075639.uhkun74v7gdwmucb@aching.in.mat.cc>
In-Reply-To: <202303090344.3293i8Q4064024@gitrepo.freebsd.org>
References:  <202303090344.3293i8Q4064024@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--mukgrrl4vrbj64yw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Mar 09, 2023 at 03:44:08AM +0000, Charlie Li wrote:
> The branch main has been updated by vishwin:
>=20
> URL: https://cgit.FreeBSD.org/ports/commit/?id=3D16a6fecb4ff8b051ba1b2382=
67b7cd15b19cda75
>=20
> 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
>=20
>     python.mk: use script to process RECORD for the first pass
>    =20
>     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.
>    =20
>     References: https://packaging.python.org/en/latest/specifications/rec=
ording-installed-packages/#the-record-file [0]
> ---
>  Mk/Uses/python.mk | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>=20
> 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}-${PORTVE=
RSION}.dist-info/RECORD >> ${_PYTHONPKGLIST}

Any script that is used by the framework must be put in Mk/scripts.  The
scripts in Tools are user contributed and not supported.

> +	@${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}-${PORTVE=
RSION}.dist-info/RECORD >> ${_PYTHONPKGLIST}
> +		${_PYTHONPKGLIST}
>  .    endif
>  .  endif # defined(_PYTHON_FEATURE_PEP517)
> =20
>=20

--=20
Mathieu Arnold

--mukgrrl4vrbj64yw
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQITBAABCgB9FiEE9XJBpJetWizkEBUef2IOCp6dQb4FAmQJkTdfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY1
NzI0MUE0OTdBRDVBMkNFNDEwMTUxRTdGNjIwRTBBOUU5RDQxQkUACgkQf2IOCp6d
Qb78TAv+M0OzLdlDSlF3khv1DLxXWJQc60ZDR3Tp0ARSfT3WrwuQPDjTdz5lsfjS
6EYdAku3GmRulo3XYFLkhvrOSEu3Zwl67shI1UAx1907Ms8npjelw7o8o6XQWW7O
/f1QbUK6T0xUZDbndogYBtayiu/iiAJCeKBpEjG6Lsc72GX5YxGy96b8t5ahjZxc
DbBubMIHcxSRgouJ/sS4P8H4maSyFRVJe3IE/fCdi56LDQsBAd+whoAn6YpPDsh2
Js6ybLY1ipAeAJHHddwUMSzxtga+F6ncLTC6OXEVwVUPKkBr8AgNBmnYP3WLGXKK
fz9sLfBye1lavjdgMfAxQWJ8mjmL2yXe07Jg1LT2M47/Kt2qbxiNhFsODOA73Uqr
/3ShhSYLAzb0yx0U5DOS0IYB99r5d4iNp/M1cNfe7EJakW/uzXzuemWrhefutGjN
QQBj8UG6VA+NK2ntsqree3L1CyDVxF4dbglSa13yA+nJyF5ngJ5ffsep0EFHsv68
VBtrhkHp
=FcTK
-----END PGP SIGNATURE-----

--mukgrrl4vrbj64yw--



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