Browse Source

Revert "use `pip install -t` in make_packages to aggregate packages."

This reverts commit 29b66e1279.
283
ThomasV 9 years ago
parent
commit
23341e59ec
  1. 48
      contrib/make_packages
  2. 2
      gui/kivy/tools/buildozer.spec

48
contrib/make_packages

@ -3,16 +3,6 @@
import sys, re, shutil, os, hashlib import sys, re, shutil, os, hashlib
import imp import imp
import getpass import getpass
import subprocess
def recurse_into(target, ext, func):
# traverse root directory, and list directories as dirs and files as files
for root, dirs, files in os.walk(target):
for dfile in files:
if dfile.endswith(ext):
print('Running {} on file: {}'.format(func, dfile))
func(os.path.join(root, dfile))
if __name__ == '__main__': if __name__ == '__main__':
@ -22,26 +12,34 @@ if __name__ == '__main__':
version = v.ELECTRUM_VERSION version = v.ELECTRUM_VERSION
print "version", version print "version", version
# install dependencies into 'packages' directory # copy dependencies into 'packages' directory
deps = ['slowaes>=0.1a1', deps = [
'ecdsa>=0.9', 'aes',
'ecdsa',
'pbkdf2', 'pbkdf2',
'requests', 'requests', # note: requests-2.5.1 is needed to build with pyinstaller
'qrcode', 'qrcode',
'protobuf', 'google/protobuf',
'dnspython', 'dns',
'six'] 'six',
]
popen = subprocess.Popen # don't use /usr/lib
target = os.path.join(d, 'packages') sys.path = ['/usr/local/lib/python2.7/dist-packages']
for module in deps: for module in deps:
subprocess.call('pip install {} -t {}'.format(module, target), shell=True) f, pathname, descr = imp.find_module(module)
target = 'packages/' + module + descr[0]
# recurse into dir and run func on extensions if os.path.exists(target):
recurse_into(target, '.pyc', os.unlink) continue
d = os.path.dirname(target)
if d and not (os.path.exists(d)):
os.makedirs(d)
if descr[0]:
shutil.copy(pathname, target)
else:
shutil.copytree(pathname, target, ignore=shutil.ignore_patterns('*.pyc'))
# fix google/__init__.py needed by pyinstaller # fix google/__init__.py needed by pyinstaller
n = d + '/packages/google/__init__.py' n = 'packages/google/__init__.py'
if not os.path.exists(n): if not os.path.exists(n):
os.system("echo \# do not remove>%s"%n) os.system("echo \# do not remove>%s"%n)

2
gui/kivy/tools/buildozer.spec

@ -90,7 +90,7 @@ android.add_jars = lib/android/zbar.jar
# (str) python-for-android branch to use, if not master, useful to try # (str) python-for-android branch to use, if not master, useful to try
# not yet merged features. # not yet merged features.
#android.branch = master android.branch = master
# (str) OUYA Console category. Should be one of GAME or APP # (str) OUYA Console category. Should be one of GAME or APP
# If you leave this blank, OUYA support will not be enabled # If you leave this blank, OUYA support will not be enabled

Loading…
Cancel
Save