git: c56303179f80 - main - devel/py-pylint-venv: Correct version in python metadata

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 06 Nov 2022 19:53:57 UTC
The branch main has been updated by yuri:

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

commit c56303179f80954e3c317be9c45c157a8aec9aff
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-11-06 19:09:22 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-11-06 19:53:48 +0000

    devel/py-pylint-venv: Correct version in python metadata
---
 devel/py-pylint-venv/Makefile | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/devel/py-pylint-venv/Makefile b/devel/py-pylint-venv/Makefile
index fac086d0ab2d..0e3d993ff234 100644
--- a/devel/py-pylint-venv/Makefile
+++ b/devel/py-pylint-venv/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	pylint-venv
-PORTVERSION=	2.3.0
+DISTVERSION=	2.3.0
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -18,8 +19,20 @@ USE_PYTHON=	distutils autoplist
 
 NO_ARCH=	yes
 
+POST_PLIST+=		fix-plist
+
 # upstream stopped providing setup.py
 post-patch:
 	@${ECHO_CMD} 'import setuptools; setuptools.setup()' > ${WRKSRC}/setup.py
 
+post-install:
+	@cd ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} && \
+		${REINPLACE_CMD} \
+			-e 's|^Version:.*|Version: ${DISTVERSION}|' \
+			pylint_venv-0.0.0-py${PYTHON_VER}.egg-info/PKG-INFO && \
+		${MV} pylint_venv-0.0.0-py${PYTHON_VER}.egg-info pylint_venv-${DISTVERSION}-py${PYTHON_VER}.egg-info
+
+fix-plist:
+	${REINPLACE_CMD} -e 's|0\.0\.0|${DISTVERSION}|' ${TMPPLIST}
+
 .include <bsd.port.mk>