From 4d9f729654be67bb3ec8f7bf8a311ced512c9ad4 Mon Sep 17 00:00:00 2001 From: deeplow Date: Fri, 5 Aug 2022 10:22:43 +0100 Subject: [PATCH] fix win build failure due to package autodiscovery Setuptools was trying to autodiscover packages with an error described in #178 [1]. Adding the packages arg to setup() solves it. In the future we may want to centralize the package list in a pyproject.toml, once it goes out of beta in setuptools [2]. Fixes #178 [1]: https://github.com/freedomofpress/dangerzone/issues/178 [2]: https://setuptools.pypa.io/en/latest/userguide/package_discovery.html?highlight=package%20discovery#package-discovery-and-namespace-packages --- setup-windows.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup-windows.py b/setup-windows.py index 2f28fd6..70cce3d 100644 --- a/setup-windows.py +++ b/setup-windows.py @@ -5,14 +5,16 @@ from cx_Freeze import setup, Executable with open("share/version.txt") as f: version = f.read().strip() +packages = ["dangerzone", "dangerzone.gui"] setup( name="dangerzone", version=version, description="Take potentially dangerous PDFs, office documents, or images and convert them to a safe PDF", + packages=packages, options={ "build_exe": { - "packages": ["dangerzone", "dangerzone.gui"], + "packages": packages, "excludes": ["test", "tkinter"], "include_files": [("share", "share"), ("LICENSE", "LICENSE")], "include_msvcr": True,