tadd pbkdf2 dependency - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 31226b8a34c92b3e6c71cf4fab7c56bf73fe54e0 (DIR) parent 10e5ec56a1ab7ffb6eee78b9fe7a0470bc373988 (HTM) Author: ThomasV <thomasv@gitorious> Date: Thu, 5 Jun 2014 16:19:13 +0200 add pbkdf2 dependency Diffstat: M electrum | 10 ---------- M lib/bitcoin.py | 28 +++++++++++++++++++++++++--- M setup.py | 2 +- 3 files changed, 26 insertions(+), 14 deletions(-) --- (DIR) diff --git a/electrum b/electrum t@@ -26,16 +26,6 @@ import sys import time import traceback -try: - import ecdsa # todo: 'ecdsa' imported but unused -except ImportError: - sys.exit("Error: python-ecdsa does not seem to be installed. Try 'sudo pip install ecdsa'") - -try: - import aes # todo: 'aes' imported but unused -except ImportError: - sys.exit("Error: AES does not seem to be installed. Try 'sudo pip install slowaes'") - is_local = os.path.dirname(os.path.realpath(__file__)) == os.getcwd() is_android = 'ANDROID_DATA' in os.environ (DIR) diff --git a/lib/bitcoin.py b/lib/bitcoin.py t@@ -17,12 +17,34 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. - -import hashlib, base64, ecdsa, re +import hashlib +import base64 +import re +import sys import hmac -import aes + + +try: + import ecdsa +except ImportError: + sys.exit("Error: python-ecdsa does not seem to be installed. Try 'sudo pip install ecdsa'") + +try: + import aes +except ImportError: + sys.exit("Error: AES does not seem to be installed. Try 'sudo pip install slowaes'") + +try: + import pbkdf2 +except ImportError: + sys.exit("Error: pbkdf2 does not seem to be installed. Try 'sudo pip install pbkdf2'") + + + from util import print_error + + # AES encryption EncodeAES = lambda secret, s: base64.b64encode(aes.encryptData(secret,s)) DecodeAES = lambda secret, e: aes.decryptData(secret, base64.b64decode(e)) (DIR) diff --git a/setup.py b/setup.py t@@ -56,7 +56,7 @@ data_files += [ setup( name="Electrum", version=version.ELECTRUM_VERSION, - install_requires=['slowaes', 'ecdsa>=0.9'], + install_requires=['slowaes', 'ecdsa>=0.9', 'pbkdf2'], package_dir={ 'electrum': 'lib', 'electrum_gui': 'gui',