pylibrlp

Python3 wrapper for librlp
git clone git://git.defalsify.org/pylibrlp.git
Log | Files | Refs | LICENSE

commit 0b751a79243e71bf14420ec9db8a929ad0e8a703
parent a796450e1d22e39c829d7a0059abef2113bd22be
Author: nolash <dev@holbrook.no>
Date:   Sun, 11 Apr 2021 15:13:38 +0200

Add librlp include path hack

Diffstat:
Mrlpstream/__init__.py | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/rlpstream/__init__.py b/rlpstream/__init__.py @@ -1,9 +1,20 @@ # standard imports +import os +import logging import ctypes import ctypes.util +logg = logging.getLogger().getChild('rlpstream.init') + +script_dir = os.path.dirname(__file__) + LIBRLP_RLP_MAX_LIST_DEPTH = 1024 + __path_librlp = ctypes.util.find_library('rlp') -librlp = ctypes.CDLL(__path_librlp) +if __path_librlp == None: + __path_librlp = os.path.join(script_dir, '..', 'rlp.cpython-39-x86_64-linux-gnu.so') + +logg.debug('using librlp path {}'.format(__path_librlp)) +librlp = ctypes.CDLL(__path_librlp)