mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00

This now follows [PEP 517](https://peps.python.org/pep-0517/) and [PEP 621](https://peps.python.org/pep-0621/) to define the metadata of the project, as well as its dependencies. As a result, the toolchain now uses [uv](https://github.com/astral-sh/uv) instead of [poetry](https://python-poetry.org/). The build-backend has been switched to [Hatch](https://hatch.pypa.io/latest/). Fixes #677
100 lines
2 KiB
TOML
100 lines
2 KiB
TOML
[project]
|
|
requires-python = ">=3.9,<3.13"
|
|
name = "dangerzone"
|
|
version = "0.8.0"
|
|
description = "Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs"
|
|
authors = [
|
|
{ name = "Freedom of the Press Foundation", email = "info@freedom.press" },
|
|
{ name = "Micah Lee", email = "micah.lee@theintercept.com" }, ]
|
|
license = { text = "AGPL-3.0"}
|
|
|
|
dependencies = [
|
|
"appdirs",
|
|
"click",
|
|
"colorama",
|
|
"markdown",
|
|
"packaging",
|
|
"pymupdf (>=1.23.3, <1.24.0)", # The version in Fedora 39
|
|
"pyside6 (>=6.7.1, < 6.8)",
|
|
"pyxdg; sys_platform == 'linux'",
|
|
"requests",]
|
|
|
|
[dependency-groups]
|
|
# Dependencies installed inside the container
|
|
container = [
|
|
"pymupdf",
|
|
]
|
|
|
|
# Dependencies required only for development
|
|
dev = [
|
|
"httpx",
|
|
]
|
|
|
|
# Dependencies required for linting the code.
|
|
lint = [
|
|
"mypy",
|
|
"types-colorama",
|
|
"types-pyside2",
|
|
"types-markdown",
|
|
"types-pygments",
|
|
"types-requests",
|
|
"ruff",
|
|
]
|
|
|
|
# Dependencies required for packaging the code on various platforms.
|
|
package = [
|
|
"setuptools",
|
|
"cx-freeze",
|
|
"pywin32",
|
|
"pyinstaller",
|
|
"doit",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
# Dependencies required for testing the code.
|
|
test = [
|
|
"pytest",
|
|
"pytest-cov",
|
|
"pytest-mock",
|
|
"pytest-qt",
|
|
"pytest-rerunfailures",
|
|
"pytest-subprocess",
|
|
"strip-ansi",
|
|
]
|
|
|
|
[project.scripts]
|
|
dangerzone = 'dangerzone:main'
|
|
dangerzone-cli = 'dangerzone:main'
|
|
|
|
[tool.doit]
|
|
verbosity = 3
|
|
|
|
[tool.doit.tasks.build_image]
|
|
# DO NOT change this to 'true' for release artifacts, else we risk building
|
|
# images that are a few days behind. See also: docs/developer/doit.md
|
|
use_cache = false
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
# isort
|
|
"I",
|
|
]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = [
|
|
"dangerzone",
|
|
]
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = [
|
|
"dangerzone/*",
|
|
"share/*",
|
|
"qubes/*",
|
|
"install/linux/press.freedom.dangerzone.*",
|
|
"README.md",
|
|
]
|
|
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|