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,29 +1,31 @@ PORTNAME= merkletools DISTVERSION= 1.0.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Tools for working with Merkle trees 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 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 rm-tests-from-plist: @${REINPLACE_CMD} '/\/tests\//d' ${TMPPLIST} .include 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"):