git: 3fa264288044 - main - devel/py-flufl.i18n: fix stage

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Tue, 17 Mar 2026 06:52:04 UTC
The branch main has been updated by vishwin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3fa264288044c2720891dfa74e677793db6015c5

commit 3fa264288044c2720891dfa74e677793db6015c5
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2026-03-17 06:50:17 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2026-03-17 06:50:17 +0000

    devel/py-flufl.i18n: fix stage
    
    staging still breaks because PEP517_INSTALL_CMD and USE_PYTHON=autoplist
    do not handle the period (.) name normalisation bit that hatchling
    implements properly. For now, use a hack that allows correct packaging
    until PR 270358/review D46236 is committed, at which point the hack
    becomes a no-op.
    
    Pointy-hat to: vishwin
    With hat: python
    PR: 293773
---
 devel/py-flufl.i18n/Makefile                   | 15 +++++++++++++++
 devel/py-flufl.i18n/files/patch-pyproject.toml | 14 --------------
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/devel/py-flufl.i18n/Makefile b/devel/py-flufl.i18n/Makefile
index 1142f6d62c8f..64ad05d759f8 100644
--- a/devel/py-flufl.i18n/Makefile
+++ b/devel/py-flufl.i18n/Makefile
@@ -21,4 +21,19 @@ USE_PYTHON=	autoplist pep517 pytest
 
 NO_ARCH=	yes
 
+# remove the following blocks after setuptools/python.mk update
+# incorporating the period (.) portion of name normalisation
+# https://packaging.python.org/en/latest/specifications/name-normalization/
+# https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
+PEP517_INSTALL_CMD=	${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} \
+		${BUILD_WRKSRC}/dist/${PORTNAME:tl:C|[-_.]+|_|g}-${DISTVERSION}*.whl && \
+		${CP} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/flufl_i18n-${DISTVERSION}.dist-info/RECORD \
+		${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/flufl.i18n-${DISTVERSION}.dist-info/RECORD
+
+pre-install:
+	${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/flufl.i18n-${DISTVERSION}.dist-info
+
+post-install:
+	${RM} -r ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/flufl.i18n-${DISTVERSION}.dist-info
+
 .include <bsd.port.mk>
diff --git a/devel/py-flufl.i18n/files/patch-pyproject.toml b/devel/py-flufl.i18n/files/patch-pyproject.toml
deleted file mode 100644
index bd17e88eca82..000000000000
--- a/devel/py-flufl.i18n/files/patch-pyproject.toml
+++ /dev/null
@@ -1,14 +0,0 @@
-remove after setuptools/python.mk update incorporating the period (.) portion of name normalisation
-
-https://packaging.python.org/en/latest/specifications/name-normalization/
-https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
-
---- pyproject.toml.orig	2020-02-02 00:00:00 UTC
-+++ pyproject.toml
-@@ -1,5 +1,5 @@
- [project]
--name = 'flufl.i18n'
-+name = 'flufl-i18n'
- authors = [
-     {name = 'Barry Warsaw', email = 'barry@python.org'},
- ]