Skip to content

Commit

Permalink
(fix) byte to string
Browse files Browse the repository at this point in the history
  • Loading branch information
MementoRC committed Dec 27, 2023
1 parent 70487e7 commit ed53aca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ def has_c_libraries(self):
)

extension.extra_compile_args = [
str(subprocess.check_output(['pkg-config', '--cflags-only-I', 'libsecp256k1'])) # noqa S603
subprocess.check_output(['pkg-config', '--cflags-only-I', 'libsecp256k1']).strip().decode('utf-8') # noqa S603
]
extension.extra_link_args = [
str(subprocess.check_output(['pkg-config', '--libs-only-L', 'libsecp256k1'])), # noqa S603
str(subprocess.check_output(['pkg-config', '--libs-only-l', 'libsecp256k1'])), # noqa S603
subprocess.check_output(['pkg-config', '--libs-only-L', 'libsecp256k1']).strip().decode('utf-8'), # noqa S603
subprocess.check_output(['pkg-config', '--libs-only-l', 'libsecp256k1']).strip().decode('utf-8'), # noqa S603
]

if os.name == 'nt' or sys.platform == 'win32':
Expand Down
1 change: 0 additions & 1 deletion setup_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def _find_lib():
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[2:], 'secp256k1_ecdh.h'))

except (OSError, subprocess.CalledProcessError):
Expand Down

0 comments on commit ed53aca

Please sign in to comment.