git: 47f752537748 - main - devel/py-hatch: Allow build with py-hatchling 1.22.0+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 31 Mar 2024 03:40:03 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=47f75253774882868bd64f6f2f7b0d19d9384dcb

commit 47f75253774882868bd64f6f2f7b0d19d9384dcb
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-03-31 03:06:29 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-03-31 03:06:29 +0000

    devel/py-hatch: Allow build with py-hatchling 1.22.0+
    
    - Bump PORTREVISION for package change
    
    Obtained from:  https://github.com/pypa/hatch/commit/5271279ae85a45ef42ce91bba3b226133ed92e71
---
 devel/py-hatch/Makefile              |  3 ++-
 devel/py-hatch/files/patch-hatchling | 24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/devel/py-hatch/Makefile b/devel/py-hatch/Makefile
index 93dcde8cb4de..920b78a1cb22 100644
--- a/devel/py-hatch/Makefile
+++ b/devel/py-hatch/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	hatch
 PORTVERSION=	1.9.4
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -15,7 +16,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0.3.0:devel/py-hatch-vcs@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}hatchling>=1.21.0:devel/py-hatchling@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}click>=8.0.6:devel/py-click@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}hatchling>=0<1.22.0:devel/py-hatchling@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}httpx>=0.22.0:www/py-httpx@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}hyperlink>=21.0.0:www/py-hyperlink@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}keyring>=23.5.0,1:security/py-keyring@${PY_FLAVOR} \
diff --git a/devel/py-hatch/files/patch-hatchling b/devel/py-hatch/files/patch-hatchling
new file mode 100644
index 000000000000..72e4ae40dcd8
--- /dev/null
+++ b/devel/py-hatch/files/patch-hatchling
@@ -0,0 +1,24 @@
+Obtained from:	https://github.com/pypa/hatch/commit/5271279ae85a45ef42ce91bba3b226133ed92e71
+
+--- pyproject.toml.orig	2020-02-02 00:00:00 UTC
++++ pyproject.toml
+@@ -39,7 +39,7 @@ dependencies = [
+ ]
+ dependencies = [
+   "click>=8.0.6",
+-  "hatchling<1.22",
++  "hatchling",
+   "httpx>=0.22.0",
+   "hyperlink>=21.0.0",
+   "keyring>=23.5.0",
+--- src/hatch/cli/build/__init__.py.orig	2020-02-02 00:00:00 UTC
++++ src/hatch/cli/build/__init__.py
+@@ -57,7 +57,7 @@ def build(app: Application, location, targets, hooks_o
+     from hatch.config.constants import AppEnvVars
+     from hatch.utils.fs import Path
+     from hatch.utils.structures import EnvVars
+-    from hatchling.builders.constants import BuildEnvVars
++    from hatchling.builders.constants import EDITABLES_REQUIREMENT, BuildEnvVars
+     from hatchling.builders.plugin.interface import BuilderInterface
+ 
+     path = str(Path(location).resolve()) if location else None