git: 68adcd60ca6a - main - devel/py-astroid: Convert to USE_PYTHON=pep517

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 21 Mar 2023 19:26:41 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=68adcd60ca6adf3dd74e429d9713fb4e764cdd1e

commit 68adcd60ca6adf3dd74e429d9713fb4e764cdd1e
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:42:29 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:20:30 +0000

    devel/py-astroid: Convert to USE_PYTHON=pep517
    
    - Bump PORTREVISION for dependency and package change
---
 devel/py-astroid/Makefile                   | 8 ++++----
 devel/py-astroid/files/patch-pyproject.toml | 9 +++++++++
 devel/py-astroid/files/setup.py             | 3 ---
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/devel/py-astroid/Makefile b/devel/py-astroid/Makefile
index 018616714ed8..6240f3381ee2 100644
--- a/devel/py-astroid/Makefile
+++ b/devel/py-astroid/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	astroid
 PORTVERSION=	2.13.3
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,11 +12,13 @@ WWW=		https://github.com/PyCQA/astroid
 LICENSE=	LGPL21+
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=62.6:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0.37.1:devel/py-wheel@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}lazy-object-proxy>=1.4.0:devel/py-lazy-object-proxy@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}wrapt>=1.14<2:devel/py-wrapt@${PY_FLAVOR}
 
 USES=		python:3.7+
-USE_PYTHON=	autoplist concurrent distutils pytest
+USE_PYTHON=	autoplist concurrent pep517 pytest
 
 NO_ARCH=	yes
 
@@ -31,7 +34,4 @@ RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}typed-ast>=1.4.0<2.0:devel/py-typed-ast@${P
 RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.0.0:devel/py-typing-extensions@${PY_FLAVOR}
 .endif
 
-post-patch:
-	@${CP} ${FILESDIR}/setup.py ${WRKSRC}/
-
 .include <bsd.port.post.mk>
diff --git a/devel/py-astroid/files/patch-pyproject.toml b/devel/py-astroid/files/patch-pyproject.toml
new file mode 100644
index 000000000000..66883c748c70
--- /dev/null
+++ b/devel/py-astroid/files/patch-pyproject.toml
@@ -0,0 +1,9 @@
+--- pyproject.toml.orig	2023-01-20 20:32:36 UTC
++++ pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["setuptools~=62.6", "wheel~=0.37.1"]
++requires = ["setuptools>=62.6", "wheel>=0.37.1"]
+ build-backend = "setuptools.build_meta"
+ 
+ [project]
diff --git a/devel/py-astroid/files/setup.py b/devel/py-astroid/files/setup.py
deleted file mode 100644
index 606849326a40..000000000000
--- a/devel/py-astroid/files/setup.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from setuptools import setup
-
-setup()