From 815708164765e83424365dabfeffee34995b540b Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Mon, 13 Nov 2023 22:10:30 +0100 Subject: [PATCH] Setup: fix orjson import on frozen py3.8 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 73b3477b623c..0d2da0bb1818 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": ["*."],