diff --git a/setup.py b/setup.py index 40564ca28c4e00c1a94699a201caaa8bc5b06bba..a612a5437a7e56eccbaf304a9afefe65472f5239 100644 --- a/setup.py +++ b/setup.py @@ -26,13 +26,6 @@ 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) libEGL_path = "" @@ -43,7 +36,13 @@ if sys.platform == "win32": libEGL_path = os.path.join(os.path.dirname(path), "libEGL.dll") if 'CONDA_DEFAULT_ENV' in os.environ: - # Check if we are in Conda env + # Check if we are in Conda env + schemas = os.path.join(site.getsitepackages()[1], "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))) + path = QtCore.QCoreApplication.libraryPaths()[0] libEGL_path = os.path.join(path, "Scripts", "libEGL.dll") libsodium_path = os.path.join(path, "Scripts", "libsodium.dll") @@ -64,18 +63,26 @@ elif sys.platform == "darwin": else: libsodium_path = "" print(QtCore.QCoreApplication.libraryPaths()) + schemas = os.path.join(site.getsitepackages()[0], "jsonschema", "schemas") + for f in onlyfiles: + zipincludes.append((os.path.join(schemas, f), os.path.join("jsonschema", "schemas", f))) + + onlyfiles = [ f for f in listdir(schemas) if isfile(join(schemas,f)) ] # Check if we are in Conda env if 'CONDA_ENV_PATH' in os.environ: libsodium_path = os.path.join(os.environ['CONDA_ENV_PATH'], "lib", "libsodium.so.13") includefiles.append((libsodium_path, "libsodium.so.13")) + print("Includes : ") print(includes) print("Excludes : ") print(exclude) print("Include files : ") print(includefiles) +print("Zip files : ") +print(zipincludes) print("Packages : ") print(packages) print(sys.path)