include jsonschema.schemas files

This commit is contained in:
Jack 2016-10-16 02:49:19 -04:00
parent 5b15da2c55
commit 62c2539475

View file

@ -2,6 +2,7 @@
import sys import sys
import os import os
import site
from lbrynet import __version__ from lbrynet import __version__
LINUX = 1 LINUX = 1
@ -134,6 +135,10 @@ elif platform == WINDOWS:
# Allow virtualenv to find distutils of base python installation # Allow virtualenv to find distutils of base python installation
distutils_path = os.path.join(os.path.dirname(opcode.__file__), 'distutils') distutils_path = os.path.join(os.path.dirname(opcode.__file__), 'distutils')
schemas = os.path.join(site.getsitepackages()[1], "jsonschema", "schemas")
onlyfiles = [f for f in os.listdir(schemas) if os.path.isfile(os.path.join(schemas, f))]
zipincludes = [(os.path.join(schemas, f), os.path.join("jsonschema", "schemas", f)) for f in onlyfiles]
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
@ -292,7 +297,8 @@ elif platform == WINDOWS:
(os.path.join(wordlist_path, 'portuguese.txt'), os.path.join('wordlist', 'portuguese.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')) (os.path.join(wordlist_path, 'spanish.txt'), os.path.join('wordlist', 'spanish.txt'))
], ],
'namespace_packages': ['zope', 'google']} 'namespace_packages': ['zope', 'google'],
"zip_includes": zipincludes}
tray_app = Executable( tray_app = Executable(
script=os.path.join(app_dir, 'LBRYWin32App.py'), script=os.path.join(app_dir, 'LBRYWin32App.py'),