Update to build and distribute >v0.3.12

This commit is contained in:
David Amrhein 2016-08-15 19:19:26 -04:00
parent 7d535ef7d1
commit 6180e1a48b

View file

@ -3,7 +3,9 @@
To create local builds and distributable .msi, run the following command: To create local builds and distributable .msi, run the following command:
python setup_win32.py build bdist_msi python setup_win32.py build bdist_msi
""" """
import opcode
import os import os
import pkg_resources
import sys import sys
from cx_Freeze import setup, Executable from cx_Freeze import setup, Executable
@ -11,8 +13,13 @@ import requests.certs
from lbrynet import __version__ from lbrynet import __version__
wordlist_path = pkg_resources.resource_filename('lbryum', 'wordlist')
base_dir = os.path.abspath(os.path.dirname(__file__)) base_dir = os.path.abspath(os.path.dirname(__file__))
# Allow virtualenv to find distutils of base python installation
distutils_path = os.path.join(os.path.dirname(opcode.__file__), 'distutils')
def find_data_file(filename): def find_data_file(filename):
if getattr(sys, 'frozen', False): if getattr(sys, 'frozen', False):
# The application is frozen # The application is frozen
@ -64,24 +71,56 @@ bdist_msi_options = {
build_exe_options = { build_exe_options = {
'include_msvcr': True, 'include_msvcr': True,
'includes': [], 'includes': [],
'packages': ['Crypto', 'twisted', 'miniupnpc', 'yapsy', 'seccure', 'packages': ['cython',
'bitcoinrpc', 'txjsonrpc', 'requests', 'unqlite', 'lbryum', 'twisted',
'jsonrpc', 'simplejson', 'appdirs', 'six', 'base58', 'googlefinance', 'yapsy',
'ecdsa', 'pbkdf2', 'qrcode', 'jsonrpclib', 'appdirs',
'os', 'cython', 'win32api', 'pkg_resources', 'zope.interface', 'argparse',
'argparse', 'colorama', 'certifi' 'base58',
# 'gmpy', 'wsgiref', 'slowaes', 'dnspython', 'protobuf', 'google', 'google.protobuf' 'colorama',
'cx_Freeze',
'dns',
'ecdsa',
'gmpy',
'googlefinance',
'jsonrpc',
'jsonrpclib',
'lbryum',
'miniupnpc',
'pbkdf2',
'google.protobuf',
'Crypto',
'bitcoinrpc',
'win32api',
'qrcode',
'requests',
'seccure',
'simplejson',
'six',
'aes',
'txjsonrpc',
'unqlite',
'wsgiref',
'zope.interface',
'os',
'pkg_resources'
],
'excludes': ['distutils', 'collections.sys', 'collections._weakref', 'collections.abc',
'Tkinter', 'tk', 'tcl', 'PyQt4'
'zope.interface._zope_interface_coptimizations'],
'include_files': [(distutils_path, 'distutils'), (requests.certs.where(), 'cacert.pem'),
(os.path.join(wordlist_path, 'chinese_simplified.txt'), os.path.join('wordlist', 'chinese_simplified.txt')),
(os.path.join(wordlist_path, 'english.txt'), os.path.join('wordlist', 'english.txt')),
(os.path.join(wordlist_path, 'japanese.txt'), os.path.join('wordlist', 'japanese.txt')),
(os.path.join(wordlist_path, 'portuguese.txt'), os.path.join('wordlist', 'portuguese.txt')),
(os.path.join(wordlist_path, 'spanish.txt'), os.path.join('wordlist', 'spanish.txt'))
], ],
'excludes': ['collections.sys', 'collections._weakref', 'tkinter', 'tk', 'tcl'
'zope.interface._zope_interface_coptimizations', 'matplotlib', 'numpy', 'pillow', 'pandas'],
'include_files': [(requests.certs.where(), 'cacert.pem')],
'namespace_packages': ['zope']} 'namespace_packages': ['zope']}
exe = Executable( exe = Executable(
script=os.path.join('lbrynet', 'lbrynet_daemon', 'LBRYDaemonControl.py'), script=os.path.join('lbrynet', 'lbrynet_daemon', 'LBRYDaemonControl.py'),
# base='Win32GUI', # base='Win32GUI',
icon=os.path.join('packaging', 'windows', 'icons', 'lbry256.ico'), icon=os.path.join('packaging', 'windows', 'icons', 'lbry256.ico'),
# icon=os.path.join('lbry-dark-icon.ico'),
compress=True, compress=True,
shortcutName='lbrynet', shortcutName='lbrynet',
shortcutDir='DesktopFolder', shortcutDir='DesktopFolder',
@ -96,7 +135,6 @@ setup(
url='lbry.io', url='lbry.io',
author='', author='',
keywords='LBRY', keywords='LBRY',
# entry_points={'console_scripts': console_scripts},
data_files=[ data_files=[
('lbrynet/lbrynet_console/plugins', ('lbrynet/lbrynet_console/plugins',
[ [