mmgen-wallet/setup.py

16 lines
577 B
Python
Raw Normal View History

#!/usr/bin/env python3
from setuptools import setup,Extension
2021-07-29 14:20:44 +00:00
from subprocess import run,PIPE
2021-07-29 14:20:44 +00:00
have_msys2 = run(['uname','-s'],stdout=PIPE,check=True).stdout.startswith(b'MSYS_NT')
if have_msys2:
print('MSYS2 system detected')
setup(ext_modules=[Extension(
2016-08-22 14:20:46 +03:00
name = 'mmgen.secp256k1',
sources = ['extmod/secp256k1mod.c'],
2019-11-14 17:19:32 +00:00
libraries = ['secp256k1'] + ([],['gmp'])[have_msys2],
library_dirs = ['/usr/local/lib',r'C:\msys64\mingw64\lib',r'C:\msys64\usr\lib'],
include_dirs = ['/usr/local/include',r'C:\msys64\mingw64\include',r'C:\msys64\usr\include'],
)])