2018-10-30 16:23:12 +00:00
|
|
|
#!/usr/bin/env python3
|
2015-01-10 18:52:30 +03:00
|
|
|
|
2021-09-23 21:15:33 +00:00
|
|
|
from setuptools import setup,Extension
|
2021-07-29 14:20:44 +00:00
|
|
|
from subprocess import run,PIPE
|
2019-02-06 10:33:36 +00:00
|
|
|
|
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')
|
2017-07-07 16:09:28 +03:00
|
|
|
|
2021-09-23 21:15:33 +00:00
|
|
|
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'],
|
2021-09-23 21:15:33 +00:00
|
|
|
)])
|