From 70487e79c41bf7d3f5722e6738a14a4e7b812aac Mon Sep 17 00:00:00 2001 From: memento Date: Tue, 26 Dec 2023 17:58:47 -0600 Subject: [PATCH] (fix) path to headers found? --- setup_support.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup_support.py b/setup_support.py index 41e9a8613..a85b25c6b 100644 --- a/setup_support.py +++ b/setup_support.py @@ -67,10 +67,11 @@ def _find_lib(): # raises CalledProcessError if pkg-config is not installed or the lib does not exists subprocess.check_output(['pkg-config', '--exists', 'libsecp256k1']) # noqa S603 - includes = str(subprocess.check_output(['pkg-config', '--cflags-only-I', 'libsecp256k1'])) # noqa S603 + includes = subprocess.check_output(['pkg-config', '--cflags-only-I', 'libsecp256k1']) # noqa S603 + includes = includes.strip().decode('utf-8') print(f'libsecp256k1 found, using system library: {includes}', file=sys.stderr) - return os.path.exists(os.path.join(includes[0][2:], 'secp256k1_ecdh.h')) + return os.path.exists(os.path.join(includes[2:], 'secp256k1_ecdh.h')) except (OSError, subprocess.CalledProcessError): print('libsecp256k1 not found, falling back to bundled version', file=sys.stderr)