git: 0b214e0fe9ae - main - textproc/py-tomli-w: Update version in setup.py automatically

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=0b214e0fe9aef5b27c95cd85af651e38e95369d7

commit 0b214e0fe9aef5b27c95cd85af651e38e95369d7
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-11-01 13:28:01 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-11-01 13:41:54 +0000

    textproc/py-tomli-w: Update version in setup.py automatically
---
 textproc/py-tomli-w/Makefile       | 2 +-
 textproc/py-tomli-w/files/setup.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/textproc/py-tomli-w/Makefile b/textproc/py-tomli-w/Makefile
index d074d88b9e8f..f7e7d1f92e5b 100644
--- a/textproc/py-tomli-w/Makefile
+++ b/textproc/py-tomli-w/Makefile
@@ -19,6 +19,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/textproc/py-tomli-w/files/setup.py b/textproc/py-tomli-w/files/setup.py
index bedbff79c68c..6dec69631d48 100644
--- a/textproc/py-tomli-w/files/setup.py
+++ b/textproc/py-tomli-w/files/setup.py
@@ -10,7 +10,7 @@ package_data = \
 {'': ['*']}
 
 setup(name='tomli_w',
-      version='0.4.0',
+      version='%%PORTVERSION%%',
       description="A lil' TOML writer",
       author=None,
       author_email='Taneli Hukkinen <hukkin@users.noreply.github.com>',