forked from spesmilo/electrum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
105 lines (91 loc) · 3.52 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/python
# python setup.py sdist --format=zip,gztar
from setuptools import setup, find_packages
import os
import sys
import platform
import imp
if sys.version_info[:3] < (2, 7, 0):
sys.exit("Error: Reddcoin Electrum requires Python version >= 2.7.0...")
usr_share = '/usr/share'
if not os.access(usr_share, os.W_OK):
usr_share = os.getenv("XDG_DATA_HOME", os.path.join(os.path.expanduser("~"), ".local", "share"))
data_files = []
if (len(sys.argv) > 1 and (sys.argv[1] == "sdist")) or (platform.system() != 'Windows' and platform.system() != 'Darwin'):
print "Including all files"
data_files += [
(os.path.join(usr_share, 'applications/'), ['electrum.desktop']),
(os.path.join(usr_share, 'app-install', 'icons/'), ['icons/electrum.png'])
]
if not os.path.exists('locale'):
os.mkdir('locale')
for lang in os.listdir('locale'):
if os.path.exists('locale/%s/LC_MESSAGES/electrum.mo' % lang):
data_files.append((os.path.join(usr_share, 'locale/%s/LC_MESSAGES' % lang), ['locale/%s/LC_MESSAGES/electrum.mo' % lang]))
util = imp.load_source('util', 'lib/util.py')
appdata_dir = util.appdata_dir()
if not os.access(appdata_dir, os.W_OK):
appdata_dir = os.path.join(usr_share, "reddcoin-electrum")
data_files += [
(appdata_dir, ["data/README"]),
(os.path.join(appdata_dir, "cleanlook"), [
"data/cleanlook/name.cfg",
"data/cleanlook/style.css"
]),
(os.path.join(appdata_dir, "sahara"), [
"data/sahara/name.cfg",
"data/sahara/style.css"
]),
(os.path.join(appdata_dir, "dark"), [
"data/dark/name.cfg",
"data/dark/style.css"
])
]
for lang in os.listdir('data/wordlist'):
data_files.append((os.path.join(appdata_dir, 'wordlist'), ['data/wordlist/%s' % lang]))
basedir = os.path.abspath(os.path.dirname(__file__))
def read_file(filename):
f = open(os.path.join(basedir, filename))
try:
return f.read()
finally:
f.close()
VERSION = '1.0.5'
setup(
name="reddcoin-electrum",
version=VERSION,
install_requires=['ecdsa>=0.9', 'pbkdf2', 'requests', 'pyasn1', 'pyasn1-modules',
'qrcode', 'tlslite>=0.4.5', 'numpy', 'SocksiPy-branch'],
packages=['electrum', 'electrum_gui', 'electrum_gui.qt', 'electrum_plugins'],
package_dir={
'electrum': 'lib',
'electrum_gui': 'gui',
'electrum_plugins': 'plugins',
},
scripts=['reddcoin-electrum'],
include_package_data=True,
data_files=data_files,
description="Reddcoin Electrum wallets for desktop",
author="Thomas Voegtlin, Larry Ren",
author_email="[email protected], [email protected]",
maintainer="Larry Ren",
maintainer_email="[email protected]",
license="GNU GPLv3",
url="https://wallet.reddcoin.com",
download_url="https://pypi.python.org/packages/source/l/reddcoin-electrum/reddcoin-electrum-%s.tar.gz" % VERSION,
long_description=read_file('README.rst'),
platforms="All",
classifiers=[
'Environment :: Console',
'Environment :: X11 Applications :: Qt',
'Development Status :: 4 - Beta',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Operating System :: OS Independent',
'Topic :: Office/Business :: Financial',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)