Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Feb 2023 17:15:15 GMT
From:      Charlie Li <vishwin@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 4ed59043fe8e - main - devel/mercurial: convert to PEP-517
Message-ID:  <202302251715.31PHFFIE040622@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by vishwin:

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

commit 4ed59043fe8e453e31ed8a08e0d0d7ac1eb3a709
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2023-02-25 17:10:40 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2023-02-25 17:10:40 +0000

    devel/mercurial: convert to PEP-517
    
    While here, remove dead code:
    - bytecode is now handled by the trigger
    - Python 2 has not been supported for some time
    - __modulepolicy__.py is part of the wheel
    
    Also use ${PYTHONPREFIX_SITELIBDIR} for strip path
---
 devel/mercurial/Makefile  | 10 +++++++---
 devel/mercurial/pkg-plist |  5 -----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/devel/mercurial/Makefile b/devel/mercurial/Makefile
index 5ef27804bd58..731e87eaf3fe 100644
--- a/devel/mercurial/Makefile
+++ b/devel/mercurial/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	mercurial
 PORTVERSION=	6.3.2
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	https://www.mercurial-scm.org/release/
 
@@ -10,9 +11,12 @@ WWW=		https://www.mercurial-scm.org/
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cpe python:3.7+ shebangfix
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+
+USES=		cpe python shebangfix
 SHEBANG_FILES=	contrib/hgweb.fcgi hgweb.cgi
-USE_PYTHON=	autoplist distutils
+USE_PYTHON=	autoplist pep517
 
 OPTIONS_DEFINE=		CA_BUNDLE DATA DOCS NLS FREEBSD
 OPTIONS_DEFAULT=	CA_BUNDLE DATA
@@ -62,7 +66,7 @@ PKGNAMEPREFIX=		${PYTHON_PKGNAMEPREFIX}
 post-install:
 	${INSTALL_MAN} ${WRKSRC}/doc/*.1 ${STAGEDIR}${PREFIX}/man/man1/
 	${INSTALL_MAN} ${WRKSRC}/doc/*.5 ${STAGEDIR}${PREFIX}/man/man5/
-	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/ -name '*.so' -exec ${STRIP_CMD} {} +
+	${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/ -name '*.so' -exec ${STRIP_CMD} {} +
 
 post-install-DATA-on:
 .for d in hgsh vim
diff --git a/devel/mercurial/pkg-plist b/devel/mercurial/pkg-plist
index 147e99370cc0..5cbff357edfd 100644
--- a/devel/mercurial/pkg-plist
+++ b/devel/mercurial/pkg-plist
@@ -1,8 +1,3 @@
-%%PYTHON_SITELIBDIR%%/mercurial/__modulepolicy__.py
-%%PYTHON2%%%%PYTHON_SITELIBDIR%%/mercurial/__modulepolicy__.pyc
-%%PYTHON2%%%%PYTHON_SITELIBDIR%%/mercurial/__modulepolicy__.pyo
-%%PYTHON3%%%%PYTHON_SITELIBDIR%%/mercurial/__pycache__/__modulepolicy__.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
-%%PYTHON3%%%%PYTHON_SITELIBDIR%%/mercurial/__pycache__/__modulepolicy__.cpython-%%PYTHON_SUFFIX%%.pyc
 %%DATA%%%%DATADIR%%/contrib/bash_completion
 %%DATA%%%%DATADIR%%/contrib/casesmash.py
 %%DATA%%%%DATADIR%%/contrib/check-code.py



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302251715.31PHFFIE040622>