Date: Tue, 16 Jan 2024 17:47:51 GMT From: Muhammad Moinur Rahman <bofh@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 9aca78ddf6d2 - main - security/py-merkletools: Refactor Message-ID: <202401161747.40GHlpRs073500@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=9aca78ddf6d269beca776d49945a88e494f4c4ed commit 9aca78ddf6d269beca776d49945a88e494f4c4ed Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2024-01-16 17:45:26 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2024-01-16 17:47:42 +0000 security/py-merkletools: Refactor Before python 3.6 version pysha3 was required as a runtime dependency however after the import of sha3 this can be skipped. Additionally this port has not been updated since 2019 and should be deprecated. Approved by: portmgr (blanket) --- security/py-merkletools/Makefile | 8 +++++--- .../py-merkletools/files/patch-merkletools_____init____.py | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/security/py-merkletools/Makefile b/security/py-merkletools/Makefile index 6f5228efc59b..f4953864d78c 100644 --- a/security/py-merkletools/Makefile +++ b/security/py-merkletools/Makefile @@ -1,6 +1,6 @@ PORTNAME= merkletools DISTVERSION= 1.0.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -11,8 +11,6 @@ WWW= https://github.com/Tierion/pymerkletools LICENSE= MIT -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pysha3>0:security/py-pysha3@${PY_FLAVOR} - USES= python USE_PYTHON= distutils autoplist @@ -20,6 +18,10 @@ NO_ARCH= yesA POST_PLIST= rm-tests-from-plist +post-patch: + @${RM} ${WRKSRC}/requirements.txt ${WRKSRC}/merkletools.egg-info/requires.txt + @${REINPLACE_CMD} -e '/pysha3/d' ${WRKSRC}/setup.py + post-install: @${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/tests diff --git a/security/py-merkletools/files/patch-merkletools_____init____.py b/security/py-merkletools/files/patch-merkletools_____init____.py new file mode 100644 index 000000000000..b8a32413a358 --- /dev/null +++ b/security/py-merkletools/files/patch-merkletools_____init____.py @@ -0,0 +1,14 @@ +--- merkletools/__init__.py.orig 2024-01-16 17:39:29 UTC ++++ merkletools/__init__.py +@@ -1,11 +1,5 @@ import binascii + import hashlib + import binascii +-try: +- import sha3 +-except: +- from warnings import warn +- warn("sha3 is not working!") +- + + class MerkleTools(object): + def __init__(self, hash_type="sha256"):
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401161747.40GHlpRs073500>