-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsetup.py
58 lines (47 loc) · 1.72 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""setuptools config for wallycore """
from setuptools import setup
from setuptools import Distribution
import os
import platform
import subprocess
from distutils.command.build_clib import build_clib as _build_clib
class Distr(Distribution):
def has_c_libraries(self):
return True
class build_clib(_build_clib):
def run(self):
abs_path = os.path.dirname(os.path.abspath(__file__)) + '/'
for cmd in ('./tools/autogen.sh',
'./configure --enable-swig-python',
'make'):
subprocess.check_call(cmd.split(' '), cwd=abs_path)
if platform.system() == 'Darwin':
cmd = 'cp src/.libs/libwallycore.dylib src/.libs/libwallycore.so'
subprocess.check_call(cmd.split(' '), cwd=abs_path)
setup(
name='wallycore',
version='0.4.0',
description='libwally Bitcoin library',
long_description='Python bindings for the libwally Bitcoin library',
url='https://github.com/ElementsProject/libwally-core',
author='Jon Griffiths',
author_email='[email protected]',
license='MIT',
zip_safe=False,
libraries=[('wallycore',{'sources':['include/wally_core.h']})],
cmdclass={
'build_clib': build_clib,
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
],
keywords='Bitcoin wallet BIP32 BIP38 BIP39 secp256k1',
packages=['wallycore'],
package_dir={'':'src/swig_python'},
data_files=[('', ['src/.libs/libwallycore.so'])] ,
)