diff --git a/.travis.yml b/.travis.yml index 86dad7c9008deab906bd06440b7492f76a3057c3..f7ccc54f6c3e65228a1ab91ed8fabe3ca0db6dda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,6 +57,7 @@ install: - pip install base58 - pip install quamash - pip install aiohttp + - pip install jsonschema - pip install git+https://github.com/ucoin-io/ucoin-python-api.git - pip install git+https://github.com/Insoleet/pretenders.git@develop - python gen_resources.py diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index 7c8481da39d2363581d28a9d7382279e98a44a39..308be15b301a3bcda38d7210f044d11e95e26864 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -17,6 +17,7 @@ pip install requests pip install base58 pip install git+https://github.com/Insoleet/quamash.git@sockets_only pip install aiohttp +pip install jsonschema pip install git+https://github.com/ucoin-io/ucoin-python-api.git pip install pretenders @@ -27,4 +28,4 @@ python gen_translations.py if %errorlevel% neq 0 exit /b 1 python setup.py build -if %errorlevel% neq 0 exit /b 1 \ No newline at end of file +if %errorlevel% neq 0 exit /b 1 diff --git a/setup.py b/setup.py index 2a0c74cbc703f9621878998287d32ded5805991c..40564ca28c4e00c1a94699a201caaa8bc5b06bba 100644 --- a/setup.py +++ b/setup.py @@ -3,9 +3,11 @@ # source d'inspiration: http://wiki.wxpython.org/cx_freeze -import sys, os, subprocess, multiprocessing +import sys, os, subprocess, multiprocessing, site from cx_Freeze import setup, Executable from PyQt5 import QtCore +from os import listdir +from os.path import isfile, join ############################################################################# # preparation des options @@ -17,11 +19,19 @@ print(os.environ) includes = ["sip", "re", "json", "logging", "hashlib", "os", "urllib", "ucoinpy", "pylibscrypt", "aiohttp", "asyncio", - "quamash"] + "quamash", "jsonschema"] exclude = ['.git'] -packages = ["libnacl", "encodings"] +packages = ["libnacl", "encodings", "jsonschema"] includefiles = [] +zipincludes = [] + +schemas = os.path.join(site.getsitepackages()[0], "jsonschema", "schemas") + +onlyfiles = [ f for f in listdir(schemas) if isfile(join(schemas,f)) ] + +for f in onlyfiles: + zipincludes.append((os.path.join(schemas, f), os.path.join("jsonschema", "schemas", f))) if sys.platform == "win32": app = QtCore.QCoreApplication(sys.argv) @@ -75,6 +85,7 @@ options = {"path": sys.path, "include_files": includefiles, "excludes": exclude, "packages": packages, + "zip_includes": zipincludes } #############################################################################