tchanges for new toolchain - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 07c5f026394cf1f666a6f9b2bb4cd6b0daa53273 (DIR) parent f061fe047d9a6ac82ccca5e6d0911b7e088bf2f0 (HTM) Author: akshayaurora <akshayaurora@gmail.com> Date: Wed, 1 Jun 2016 01:56:34 +0530 changes for new toolchain Diffstat: M gui/kivy/Makefile | 5 +++-- M gui/kivy/main_window.py | 8 ++++---- M gui/kivy/nfc_scanner/scanner_andro… | 2 +- M gui/kivy/tools/buildozer.spec.samp… | 2 +- M lib/bitcoin.py | 4 +++- M lib/util.py | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) --- (DIR) diff --git a/gui/kivy/Makefile b/gui/kivy/Makefile t@@ -1,4 +1,5 @@ PYTHON = python + # needs kivy installed or in PYTHONPATH .PHONY: theming apk clean t@@ -17,11 +18,11 @@ prepare: fi apk: @make prepare - @-cd ../..; buildozer android debug deploy run + @-cd ../..; buildozer android_new debug deploy run @make clean release: @make prepare - @-cd ../..; buildozer android release + @-cd ../..; buildozer android_new release @make clean clean: # Cleaning up (DIR) diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py t@@ -310,7 +310,7 @@ class ElectrumWindow(App): return from jnius import autoclass from android import activity - PythonActivity = autoclass('org.renpy.android.PythonActivity') + PythonActivity = autoclass('org.kivy.android.PythonActivity') Intent = autoclass('android.content.Intent') intent = Intent("com.google.zxing.client.android.SCAN") intent.putExtra("SCAN_MODE", "QR_CODE_MODE") t@@ -334,7 +334,7 @@ class ElectrumWindow(App): return from jnius import autoclass from android import activity - PythonActivity = autoclass('org.renpy.android.PythonActivity') + PythonActivity = autoclass('org.kivy.android.PythonActivity') IntentIntegrator = autoclass('com.google.zxing.integration.android.IntentIntegrator') integrator = IntentIntegrator(PythonActivity.mActivity) def on_qr_result(requestCode, resultCode, intent): t@@ -370,7 +370,7 @@ class ElectrumWindow(App): if platform == 'android': # move activity to back from jnius import autoclass - python_act = autoclass('org.renpy.android.PythonActivity') + python_act = autoclass('org.kivy.android.PythonActivity') mActivity = python_act.mActivity mActivity.moveTaskToBack(True) t@@ -394,7 +394,7 @@ class ElectrumWindow(App): if platform == 'android': from android import activity from jnius import autoclass - PythonActivity = autoclass('org.renpy.android.PythonActivity') + PythonActivity = autoclass('org.kivy.android.PythonActivity') mactivity = PythonActivity.mActivity self.on_new_intent(mactivity.getIntent()) activity.bind(on_new_intent=self.on_new_intent) (DIR) diff --git a/gui/kivy/nfc_scanner/scanner_android.py b/gui/kivy/nfc_scanner/scanner_android.py t@@ -17,7 +17,7 @@ from android import activity BUILDVERSION = autoclass('android.os.Build$VERSION').SDK_INT NfcAdapter = autoclass('android.nfc.NfcAdapter') -PythonActivity = autoclass('org.renpy.android.PythonActivity') +PythonActivity = autoclass('org.kivy.android.PythonActivity') JString = autoclass('java.lang.String') Charset = autoclass('java.nio.charset.Charset') locale = autoclass('java.util.Locale') (DIR) diff --git a/gui/kivy/tools/buildozer.spec.sample b/gui/kivy/tools/buildozer.spec.sample t@@ -31,7 +31,7 @@ version.filename = %(source.dir)s/lib/version.py #version = 1.9.8 # (list) Application requirements -requirements = openssl, pil, plyer==master, kivy==master +requirements = hostpython2, android, openssl, pycrypto, pil, plyer, kivy==master # (str) Presplash of the application #presplash.filename = %(source.dir)s/gui/kivy/theming/splash.png (DIR) diff --git a/lib/bitcoin.py b/lib/bitcoin.py t@@ -208,7 +208,9 @@ def i2o_ECPublicKey(pubkey, compressed=False): ############ functions from pywallet ##################### def hash_160(public_key): - md = hashlib.new('ripemd160') + #md = hashlib.new('ripemd') + from Crypto.Hash import RIPEMD + md = RIPEMD.new() md.update(sha256(public_key)) return md.digest() (DIR) diff --git a/lib/util.py b/lib/util.py t@@ -210,7 +210,7 @@ def android_ext_dir(): def android_data_dir(): import jnius - PythonActivity = jnius.autoclass('org.renpy.android.PythonActivity') + PythonActivity = jnius.autoclass('org.kivy.android.PythonActivity') return PythonActivity.mActivity.getFilesDir().getPath() + '/data' def android_headers_path():