From 0239578a621306f32a13433e8369104bb5a60f05 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Mon, 13 Nov 2023 22:42:34 +0100 Subject: [PATCH] Setup: fix orjson import on frozen py3.8 (#2458) orjson has a .py entry point that imports `from .orjson` (from the DLL), which does not work on 3.8 if the DLL is not in the same folder as the .py. The changed import system in 3.9+ seems to allow this. Excluding it from libraries.zip will put both files into the same folder. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 73b3477b623..0d2da0bb181 100644 --- a/setup.py +++ b/setup.py @@ -620,7 +620,7 @@ def find_lib(lib, arch, libc): "excludes": ["numpy", "Cython", "PySide2", "PIL", "pandas"], "zip_include_packages": ["*"], - "zip_exclude_packages": ["worlds", "sc2"], + "zip_exclude_packages": ["worlds", "sc2", "orjson"], # TODO: remove orjson here once we drop py3.8 support "include_files": [], # broken in cx 6.14.0, we use more special sauce now "include_msvcr": False, "replace_paths": ["*."],