forked from Electron-Cash/Electron-Cash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
78 lines (70 loc) · 2.47 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env python3
import io
import re
from setuptools import setup, find_packages
import sys
with io.open('./common.sh') as f:
contents = f.read()
name_match = re.search(r"^ *compact_name *= *['\"]([^'\"]*)['\"]", contents, re.M)
if name_match:
compact_name=name_match.group(1)
else:
raise RuntimeError("Unable to find compact_name in ./common.sh")
formal_name_match = re.search(r"^ *xcode_target *= *['\"]([^'\"]*)['\"]", contents, re.M)
if formal_name_match:
formal_name=formal_name_match.group(1)
else:
raise RuntimeError("Unable to find xcode_target in ./common.sh")
del name_match, formal_name_match, contents
version_py = './{}/electroncash/version.py'.format(compact_name)
with io.open(version_py, encoding='utf8') as version_file:
version_match = re.search(r"^ *PACKAGE_VERSION *= *['\"]([^'\"]*)['\"]", version_file.read(), re.M)
if version_match:
version = version_match.group(1)
else:
raise RuntimeError("Unable to find PACKAGE_VERSION in {}.".format(version_py))
del version_match, version_py
with io.open('README.rst', encoding='utf8') as readme:
long_description = readme.read()
setup(
name=compact_name, # comes from common.sh
version=version,
description='A Bitcoin Cash SPV Wallet',
long_description=long_description,
author='Calin Culianu',
author_email='[email protected]',
license='MIT license',
package_data={'': ["*.json", "*.po", "*.mo", "*.pot", "*.txt", "locale/*", "locale/*/*", "locale/*/*/*", "wordlist/*.txt", "*.png"]},
include_package_data=True,
packages=find_packages(
exclude=[
'docs', 'tests',
'windows', 'macOS', 'linux',
'iOS', 'android',
'django'
]
),
classifiers=[
'Development Status :: 1 - Planning',
'License :: OSI Approved :: MIT license',
],
install_requires=[
'certifi', 'chardet', 'dnspython', 'ecdsa>=0.9', 'idna',
'jsonrpclib-pelix', 'protobuf',
'pyaes>=0.1a1',
'PySocks>=1.6.6', 'qrcode', 'requests', 'six', 'stem==1.8.0',
'urllib3<1.24', 'python-dateutil==2.6.1', 'pathvalidate==2.3.1'
],
options={
'app': {
'formal_name': formal_name, # comes from common.sh
'bundle': 'com.c3-soft'
},
# Mobile deployments
'ios': {
'app_requires': [
'rubicon-objc==0.2.10'
]
},
}
)