From a936dec2ee7186892548a973502bcb4c3384e3ee Mon Sep 17 00:00:00 2001 From: inso <insomniak.fr@gmail.com> Date: Thu, 12 Nov 2015 17:36:17 +0100 Subject: [PATCH] Fix build process --- .travis.yml | 1 + ci/appveyor/build.cmd | 3 ++- setup.py | 17 ++++++++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 86dad7c9..f7ccc54f 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 7c8481da..308be15b 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 2a0c74cb..40564ca2 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 } ############################################################################# -- GitLab