git: 5f62aaa3d4c8 - main - textproc/py-atoml: Update version in setup.py automatically

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=5f62aaa3d4c877c0e6d3b4e89b29e904eb4a1601

commit 5f62aaa3d4c877c0e6d3b4e89b29e904eb4a1601
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-11-01 13:27:18 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-11-01 13:41:51 +0000

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

diff --git a/textproc/py-atoml/Makefile b/textproc/py-atoml/Makefile
index 4d5bd973a4ff..4a0bf58d205e 100644
--- a/textproc/py-atoml/Makefile
+++ b/textproc/py-atoml/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/textproc/py-atoml/files/setup.py b/textproc/py-atoml/files/setup.py
index 95c58e86aea1..d1601330afcc 100644
--- a/textproc/py-atoml/files/setup.py
+++ b/textproc/py-atoml/files/setup.py
@@ -9,7 +9,7 @@ with codecs.open('README.md', encoding="utf-8") as fp:
 
 setup_kwargs = {
     'name': 'atoml',
-    'version': '1.0.3',
+    'version': '%%PORTVERSION%%',
     'description': 'Yet another style preserving TOML library',
     'long_description': long_description,
     'license': 'MIT',