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)
This commit is contained in:
parent
da7ccecae7
commit
9aca78ddf6
|
@ -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
|
||||
|
||||
|
|
|
@ -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"):
|
Loading…
Reference in New Issue