mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 09:52:37 +02:00

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
27 lines
839 B
Python
27 lines
839 B
Python
#!/usr/bin/env python3
|
|
import os
|
|
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": packages,
|
|
"excludes": ["test", "tkinter"],
|
|
"include_files": [("share", "share"), ("LICENSE", "LICENSE")],
|
|
"include_msvcr": True,
|
|
}
|
|
},
|
|
executables=[
|
|
Executable("install/windows/dangerzone.py", base="Win32GUI", icon="share/dangerzone.ico"),
|
|
Executable("install/windows/dangerzone-cli.py", base=None, icon="share/dangerzone.ico"),
|
|
],
|
|
)
|