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

This is useful to reduce the computation time when creating PDF visual diffs. Here is a comparison of the same operation using python arrays and numpy arrays + lookups: Python arrays: ``` diff took 5.094218431997433 seconds diff took 3.1553626069980965 seconds diff took 3.3721952960004273 seconds diff took 3.2134646750018874 seconds diff took 3.3410625500000606 seconds diff took 3.2893160990024626 seconds ``` Numpy: ``` diff took 0.13705662599750212 seconds diff took 0.05698924000171246 seconds diff took 0.15319590600120137 seconds diff took 0.06126453700198908 seconds diff took 0.12916332699751365 seconds diff took 0.05839455900058965 seconds
79 lines
2.1 KiB
TOML
79 lines
2.1 KiB
TOML
[tool.poetry]
|
|
name = "dangerzone"
|
|
version = "0.8.1"
|
|
description = "Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs"
|
|
authors = ["Freedom of the Press Foundation <info@freedom.press>", "Micah Lee <micah.lee@theintercept.com>"]
|
|
license = "AGPL-3.0"
|
|
# NOTE: See also https://github.com/freedomofpress/dangerzone/issues/677
|
|
include = [
|
|
{ path = "share/*", format = "sdist" },
|
|
{ path = "qubes/*", format = "sdist" },
|
|
{ path = "install/linux/press.freedom.dangerzone.*", format = "sdist" },
|
|
{ path = "README.md", format = "sdist" },
|
|
]
|
|
|
|
[tool.poetry.dependencies]
|
|
python = ">=3.9,<3.14"
|
|
click = "*"
|
|
platformdirs = "*"
|
|
PySide6 = "^6.7.1"
|
|
PyMuPDF = "^1.23.3" # The version in Fedora 39
|
|
colorama = "*"
|
|
pyxdg = {version = "*", platform = "linux"}
|
|
requests = "*"
|
|
markdown = "*"
|
|
packaging = "*"
|
|
|
|
[tool.poetry.scripts]
|
|
dangerzone = 'dangerzone:main'
|
|
dangerzone-cli = 'dangerzone:main'
|
|
|
|
# Dependencies required for packaging the code on various platforms.
|
|
[tool.poetry.group.package.dependencies]
|
|
setuptools = "*"
|
|
cx_freeze = {version = "^7.2.5", platform = "win32"}
|
|
pywin32 = {version = "*", platform = "win32"}
|
|
pyinstaller = {version = "*", platform = "darwin"}
|
|
doit = "^0.36.0"
|
|
jinja2-cli = "^0.8.2"
|
|
|
|
# Dependencies required for linting the code.
|
|
[tool.poetry.group.lint.dependencies]
|
|
click = "*" # Install click so mypy is able to reason about it.
|
|
mypy = "*"
|
|
ruff = "*"
|
|
types-colorama = "*"
|
|
types-PySide2 = "*"
|
|
types-Markdown = "*"
|
|
types-pygments = "*"
|
|
types-requests = "*"
|
|
|
|
# Dependencies required for testing the code.
|
|
[tool.poetry.group.test.dependencies]
|
|
pytest = "^7.1.2"
|
|
pytest-mock = "^3.10.0"
|
|
pytest-qt = "^4.2.0"
|
|
pytest-cov = "^5.0.0"
|
|
strip-ansi = "*"
|
|
pytest-subprocess = "^1.5.2"
|
|
pytest-rerunfailures = "^14.0"
|
|
numpy = "2.0" # bump when we remove python 3.9 support
|
|
|
|
[tool.poetry.group.debian.dependencies]
|
|
pymupdf = "^1.24.11"
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
httpx = "^0.27.2"
|
|
|
|
[tool.doit]
|
|
verbosity = 3
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
# isort
|
|
"I",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["poetry-core>=1.2.0"]
|
|
build-backend = "poetry.core.masonry.api"
|