electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 82746c20fb667fb0f8aed4aaa07a45e9e8248f8d
parent 6a7d50d5c5143d7d98aa76c911766f353322197f
Author: ThomasV <thomasv@gitorious>
Date:   Sun, 25 Jan 2015 08:14:25 +0100

update packaging scripts

Diffstat:
Acontrib/make_android | 39+++++++++++++++++++++++++++++++++++++++
Acontrib/make_packages | 40++++++++++++++++++++++++++++++++++++++++
Dmake_packages | 57---------------------------------------------------------
3 files changed, 79 insertions(+), 57 deletions(-)

diff --git a/contrib/make_android b/contrib/make_android @@ -0,0 +1,39 @@ +#!/usr/bin/python + + +if __name__ == '__main__': + import sys, re, shutil, os, hashlib + import imp + os.chdir(os.path.dirname(os.path.realpath(__file__))) + os.chdir('..') + + 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() + + + os.system('rm -rf dist/e4a-%s'%version) + os.mkdir('dist/e4a-%s'%version) + shutil.copyfile("electrum",'dist/e4a-%s/e4a.py'%version) + shutil.copytree("packages",'dist/e4a-%s/packages'%version) + shutil.copytree("lib",'dist/e4a-%s/lib'%version) + os.mkdir('dist/e4a-%s/gui'%version) + for n in ['android.py']: + shutil.copy("gui/%s"%n,'dist/e4a-%s/gui'%version) + open('dist/e4a-%s/gui/__init__.py'%version,'w').close() + + os.chdir("dist") + # create the zip file + os.system( "zip -r e4a-%s.zip e4a-%s"%(version, version) ) + os.system( "rm -rf e4a-%s"%(version) ) + + # change filename because some 3G carriers do not allow users to download a zip file... + e4a_name = "e4a-%s.zip"%version + e4a_name2 = e4a_name.replace(".","") + os.system( "mv %s %s"%(e4a_name, e4a_name2) ) + print "dist/%s "%e4a_name2 + + diff --git a/contrib/make_packages b/contrib/make_packages @@ -0,0 +1,40 @@ +#!/usr/bin/python + +import sys, re, shutil, os, hashlib +import imp +import getpass + +if __name__ == '__main__': + + os.chdir(os.path.dirname(os.path.realpath(__file__))) + os.chdir('..') + + 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() + + # os.system("python mki18n.py") + os.system("pyrcc4 icons.qrc -o gui/qt/icons_rc.py") + os.system("python setup.py sdist --format=zip,gztar") + + _tgz="Electrum-%s.tar.gz"%version + _zip="Electrum-%s.zip"%version + + os.chdir("dist") + password = getpass.getpass("Password:") + for f in os.listdir("."): + os.system( "gpg --sign --armor --detach --passphrase \"%s\" %s"%(password, f) ) + + md5_tgz = hashlib.md5(file(_tgz, 'r').read()).digest().encode('hex') + md5_zip = hashlib.md5(file(_zip, 'r').read()).digest().encode('hex') + os.chdir("..") + + print "" + print "Packages are ready:" + print "dist/%s "%_tgz, md5_tgz + print "dist/%s "%_zip, md5_zip + print "To make a release, upload the files to the server, and update the webpages in branch gh-pages" + diff --git a/make_packages b/make_packages @@ -1,57 +0,0 @@ -#!/usr/bin/python - -from lib.version import ELECTRUM_VERSION as version - -if __name__ == '__main__': - import sys, re, shutil, os, hashlib - - if not ( os.path.exists('packages')): - print "The packages directory is missing." - sys.exit() - - # os.system("python mki18n.py") - os.system("pyrcc4 icons.qrc -o gui/qt/icons_rc.py") - os.system("python setup.py sdist --format=zip,gztar") - - _tgz="Electrum-%s.tar.gz"%version - _zip="Electrum-%s.zip"%version - - - # android - os.system('rm -rf dist/e4a-%s'%version) - os.mkdir('dist/e4a-%s'%version) - shutil.copyfile("electrum",'dist/e4a-%s/e4a.py'%version) - shutil.copytree("packages",'dist/e4a-%s/packages'%version) - shutil.copytree("lib",'dist/e4a-%s/lib'%version) - os.mkdir('dist/e4a-%s/gui'%version) - for n in ['android.py']: - shutil.copy("gui/%s"%n,'dist/e4a-%s/gui'%version) - open('dist/e4a-%s/gui/__init__.py'%version,'w').close() - - os.chdir("dist") - # create the zip file - os.system( "zip -r e4a-%s.zip e4a-%s"%(version, version) ) - os.system( "rm -rf e4a-%s"%(version) ) - - # change filename because some 3G carriers do not allow users to download a zip file... - e4a_name = "e4a-%s.zip"%version - e4a_name2 = e4a_name.replace(".","") - os.system( "mv %s %s"%(e4a_name, e4a_name2) ) - - import getpass - password = getpass.getpass("Password:") - for f in os.listdir("."): - os.system( "gpg --sign --armor --detach --passphrase \"%s\" %s"%(password, f) ) - - md5_tgz = hashlib.md5(file(_tgz, 'r').read()).digest().encode('hex') - md5_zip = hashlib.md5(file(_zip, 'r').read()).digest().encode('hex') - md5_android = hashlib.md5(file(e4a_name2, 'r').read()).digest().encode('hex') - os.chdir("..") - - print "" - print "Packages are ready:" - print "dist/%s "%_tgz, md5_tgz - print "dist/%s "%_zip, md5_zip - print "dist/%s "%e4a_name2, md5_android - print "To make a release, upload the files to the server, and update the webpages in branch gh-pages" -