add script to copy dependencies in make_packages

This commit is contained in:
ThomasV 2015-02-21 11:43:53 +01:00
parent 7daccf143f
commit 7dbb182a2e
1 changed files with 26 additions and 3 deletions

View File

@ -12,9 +12,32 @@ if __name__ == '__main__':
imp.load_module('electrum', *imp.find_module('../lib'))
from electrum.version import ELECTRUM_VERSION as version
if not ( os.path.exists('packages')):
print "The packages directory is missing."
sys.exit()
# copy dependencies into 'packages' directory
deps = [
'aes',
'ecdsa',
'pbkdf2',
'requests',
'pyasn1',
'pyasn1_modules',
'qrcode',
'socks',
'google/protobuf',
'tlslite',
'dns',
'six',
]
for module in deps:
f, pathname, descr = imp.find_module(module)
target = 'packages/' + module + descr[0]
if os.path.exists(target):
continue
d = os.path.dirname(target)
if d and not (os.path.exists(d)):
os.makedirs(d)
command = "cp -r %s %s"%(pathname, target)
print command
os.system(command)
# os.system("python mki18n.py")
os.system("pyrcc4 icons.qrc -o gui/qt/icons_rc.py")