diff --git a/pyproject.toml b/pyproject.toml index 7655c37..9578ab1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ keywords = [ "jupyter", ] requires-python = ">= 3.9" -dependencies = [] # no dependencies! +dependencies = ["sniffio"] [project.optional-dependencies] # For users jupyter = ["jupyter_rfb>=0.4.2"] diff --git a/rendercanvas/__pyinstaller/hook-rendercanvas.py b/rendercanvas/__pyinstaller/hook-rendercanvas.py index 04579aa..c18b7d4 100644 --- a/rendercanvas/__pyinstaller/hook-rendercanvas.py +++ b/rendercanvas/__pyinstaller/hook-rendercanvas.py @@ -8,7 +8,7 @@ binaries = [] # Add modules that are safe to add, i.e. don't pull in dependencies that we don't want. -hiddenimports += ["rendercanvas.offscreen"] +hiddenimports += ["asyncio", "rendercanvas.async", "rendercanvas.offscreen"] # Since glfw does not have a hook like this, it does not include the glfw binary # when freezing. We can solve this with the code below. Makes the binary a bit diff --git a/rendercanvas/__pyinstaller/test_rendercanvas.py b/rendercanvas/__pyinstaller/test_rendercanvas.py index 308c685..8746c11 100644 --- a/rendercanvas/__pyinstaller/test_rendercanvas.py +++ b/rendercanvas/__pyinstaller/test_rendercanvas.py @@ -14,10 +14,12 @@ "rendercanvas.glfw", "rendercanvas.offscreen", "glfw", + "asyncio" ] excluded_modules = [ "PySide6.QtGui", "PyQt6.QtGui", + "trio", ] for module_name in included_modules: importlib.import_module(module_name)