git: 6fd67057b0f8 - main - devel/py-flit: Update version in setup.py automatically

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=6fd67057b0f8f34b242e75735ad983dd71f3f6e9

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

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

diff --git a/devel/py-flit/Makefile b/devel/py-flit/Makefile
index 42f310684de6..1cbc213ed462 100644
--- a/devel/py-flit/Makefile
+++ b/devel/py-flit/Makefile
@@ -25,6 +25,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-flit/files/setup.py b/devel/py-flit/files/setup.py
index 8c5b91fc0cb5..b30bcfb53e43 100644
--- a/devel/py-flit/files/setup.py
+++ b/devel/py-flit/files/setup.py
@@ -10,7 +10,7 @@ package_data = \
 {'': ['*'], 'flit': ['license_templates/*']}
 
 install_requires = \
-['flit_core >=3.4.0', 'requests', 'docutils', 'tomli', 'tomli-w']
+['flit_core >= %%PORTVERSION%%', 'requests', 'docutils', 'tomli', 'tomli-w']
 
 extras_require = \
 {'doc': ['sphinx', 'sphinxcontrib_github_alt', 'pygments-github-lexers'],
@@ -20,7 +20,7 @@ entry_points = \
 {'console_scripts': ['flit = flit:main']}
 
 setup(name='flit',
-      version='3.4.0',
+      version='%%PORTVERSION%%',
       description='A simple packaging tool for simple packages.',
       author=None,
       author_email='Thomas Kluyver <thomas@kluyver.me.uk>',