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
This commit is contained in:
deeplow 2022-08-05 10:22:43 +01:00
parent 80a3543202
commit 4d9f729654
No known key found for this signature in database
GPG key ID: 577982871529A52A

View file

@ -5,14 +5,16 @@ from cx_Freeze import setup, Executable
with open("share/version.txt") as f: with open("share/version.txt") as f:
version = f.read().strip() version = f.read().strip()
packages = ["dangerzone", "dangerzone.gui"]
setup( setup(
name="dangerzone", name="dangerzone",
version=version, version=version,
description="Take potentially dangerous PDFs, office documents, or images and convert them to a safe PDF", description="Take potentially dangerous PDFs, office documents, or images and convert them to a safe PDF",
packages=packages,
options={ options={
"build_exe": { "build_exe": {
"packages": ["dangerzone", "dangerzone.gui"], "packages": packages,
"excludes": ["test", "tkinter"], "excludes": ["test", "tkinter"],
"include_files": [("share", "share"), ("LICENSE", "LICENSE")], "include_files": [("share", "share"), ("LICENSE", "LICENSE")],
"include_msvcr": True, "include_msvcr": True,