dangerzone/pyproject.toml
Alexis Métaireau 42a9b6f2f7
build: Update pyproject.toml to follow standards
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
2025-03-26 16:22:16 +01:00

117 lines
2.2 KiB
TOML

[project]
requires-python = ">=3.9,<3.13"
name = "dangerzone"
version = "0.8.1"
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",
"platformdirs",
"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",]
dynamic = ["readme", "classifiers"]
classifiers = [
"Programming Language :: Python",
"Intended Audience :: End Users/Desktop",
"Operating System :: OS Independent",
"Topic :: Security",
]
[dependency-groups]
# Dependencies installed inside the container
container = [
"pymupdf",
]
debian = [
"pymupdf (>=1.24.11, <1.25)",
]
# Dependencies required only for development
dev = [
"httpx",
]
# Dependencies required for linting the code.
lint = [
"click",
"mypy",
"ruff",
"types-colorama",
"types-pyside2",
"types-markdown",
"types-pygments",
"types-requests",
]
# Dependencies required for packaging the code on various platforms.
package = [
"cx-freeze",
"doit",
"jinja2-cli",
"pywin32",
"pyinstaller",
"setuptools",
]
test = [
"pytest",
"pytest-cov",
"pytest-mock",
"pytest-qt",
"pytest-rerunfailures",
"pytest-subprocess",
"strip-ansi",
"numpy (>=2.0, <3.0)" # for python 3.9 compatibility
]
[project.optional-dependencies]
# Dependencies required for testing the code.
# XXX Shoul we keep ?
[project.scripts]
dangerzone = 'dangerzone:main'
dangerzone-cli = 'dangerzone:main'
[tool.doit]
verbosity = 3
[tool.ruff.lint]
select = [
# isort
"I",
]
[tool.setuptools.dynamic]
readme = {file = "README.md"}
[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"