setup.py: specify libsecp256k1 shared object explicitly for Linux

This commit is contained in:
The MMGen Project 2023-11-14 16:01:43 +00:00
commit 37e439c856
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 7 additions and 2 deletions

View file

@ -1 +1 @@
14.0.dev17
14.0.dev18

View file

@ -60,7 +60,12 @@ if platform.system() == 'Windows':
else:
libraries = []
include_dirs = []
extra_objects = []
out = run(['/sbin/ldconfig','-p'],stdout=PIPE,text=True,check=True).stdout.splitlines()
import sys,re
extra_objects = [s.split()[-1] for s in out if re.search(r'libsecp256k1.*\.so$',s)]
if not extra_objects:
print('setup.py: unable to find shared libsecp256k1 library. Is it installed on your system?')
sys.exit(1)
setup(
cmdclass = { 'build_ext': my_build_ext },