git: 4587b45fa2eb - main - devel/py-pdm-pep517: Update version in setup.py automatically

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 01 Nov 2021 13:46:32 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4587b45fa2ebc5518c43fa84fa6cff3b9a79eabf

commit 4587b45fa2ebc5518c43fa84fa6cff3b9a79eabf
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-11-01 13:25:54 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-11-01 13:41:43 +0000

    devel/py-pdm-pep517: Update version in setup.py automatically
---
 devel/py-pdm-pep517/Makefile       | 2 +-
 devel/py-pdm-pep517/files/setup.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/devel/py-pdm-pep517/Makefile b/devel/py-pdm-pep517/Makefile
index 8394f6830235..5b763e3d525e 100644
--- a/devel/py-pdm-pep517/Makefile
+++ b/devel/py-pdm-pep517/Makefile
@@ -18,6 +18,6 @@ USE_PYTHON=	autoplist concurrent distutils
 NO_ARCH=	yes
 
 post-patch:
-	@${CP} ${FILESDIR}/setup.py ${WRKSRC}/
+	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
 
 .include <bsd.port.mk>
diff --git a/devel/py-pdm-pep517/files/setup.py b/devel/py-pdm-pep517/files/setup.py
index b808f83948ae..e7f120b5e1ee 100644
--- a/devel/py-pdm-pep517/files/setup.py
+++ b/devel/py-pdm-pep517/files/setup.py
@@ -16,7 +16,7 @@ EXTRAS_REQUIRE = {
 
 setup_kwargs = {
     'name': 'pdm-pep517',
-    'version': '0.8.5',
+    'version': '%%PORTVERSION%%',
     'description': 'A PEP 517 backend for PDM that supports PEP 621 metadata',
     'long_description': long_description,
     'license': 'MIT',