3 from lib.version import ELECTRUM_VERSION as version
5 if __name__ == '__main__':
6 import sys, re, shutil, os, hashlib
8 if not ( os.path.exists('aes') and os.path.exists('ecdsa') ):
9 print "aes and ecdsa are missing. copy them locally before."
12 os.system("python mki18n.py")
13 os.system("pyrcc4 icons.qrc -o gui/icons_rc.py")
14 os.system("python setup.py sdist --format=zip,gztar")
16 _tgz="Electrum-%s.tar.gz"%version
17 _zip="Electrum-%s.zip"%version
21 os.system('rm -rf dist/e4a-%s'%version)
22 os.mkdir('dist/e4a-%s'%version)
23 shutil.copyfile("electrum",'dist/e4a-%s/e4a.py'%version)
24 shutil.copytree("ecdsa",'dist/e4a-%s/ecdsa'%version)
25 shutil.copytree("aes",'dist/e4a-%s/aes'%version)
26 shutil.copytree("lib",'dist/e4a-%s/lib'%version)
27 os.mkdir('dist/e4a-%s/gui'%version)
28 for n in ['gui_android.py', 'pyqrnative.py', 'bmp.py']:
29 shutil.copy("gui/%s"%n,'dist/e4a-%s/gui'%version)
30 open('dist/e4a-%s/gui/__init__.py'%version,'w').close()
34 os.system( "zip -r e4a-%s.zip e4a-%s"%(version, version) )
35 os.system( "rm -rf e4a-%s"%(version) )
37 # change filename because some 3G carriers do not allow users to download a zip file...
38 e4a_name = "e4a-%s.zip"%version
39 e4a_name2 = e4a_name.replace(".","")
40 os.system( "mv %s %s"%(e4a_name, e4a_name2) )
43 md5_tgz = hashlib.md5(file('dist/'+_tgz, 'r').read()).digest().encode('hex')
44 md5_zip = hashlib.md5(file('dist/'+_zip, 'r').read()).digest().encode('hex')
45 md5_android = hashlib.md5(file('dist/'+e4a_name2, 'r').read()).digest().encode('hex')
48 print "Packages are ready:"
49 print "dist/%s "%_tgz, md5_tgz
50 print "dist/%s "%_zip, md5_zip
51 print "dist/%s "%e4a_name2, md5_android
52 print "To make a release, upload the files to the server, and update the webpages in branch gh-pages"