File size: 1,966 Bytes
f66643d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[project]
name = "pdf2zh"
version = "1.9.11"
description = "Latex PDF Translator"
authors = [{ name = "Byaidu", email = "byaidux@gmail.com" }]
license = "AGPL-3.0"
readme = "README.md"
requires-python = ">=3.10,<3.13"
classifiers = [
    "Programming Language :: Python :: 3",
    "Operating System :: OS Independent",
]
dependencies = [
    "requests",
    # for arm64 linux whells
    "pymupdf<1.25.3",
    "tqdm",
    "tenacity",
    "numpy",
    "ollama",
    "xinference-client",
    "deepl",
    "openai>=1.0.0",
    "azure-ai-translation-text<=1.0.1",
    # 5.36 has a bug, webui starts with a white screen
    "gradio<5.36",
    "huggingface_hub",
    "onnx",
    "onnxruntime",
    "opencv-python-headless",
    "tencentcloud-sdk-python-tmt<3.1.129",
    "pdfminer-six==20250416",
    "gradio_pdf>=0.0.21",
    "pikepdf",
    "peewee>=3.17.8",
    "fontTools",
    "babeldoc>=0.1.22, <0.3.0",
    "rich",
    "json-repair",
    "httpx",
    "python-dotenv",
    "Pillow",
    "pydantic_settings",
]

[project.optional-dependencies]
backend = [
    "flask",
    "celery",
    "redis"
]
argostranslate = [
    "argostranslate"
]
mcp = [
    "mcp>=1.6.0",
    "starlette",
]
dev = [
    "black",
    "ruff",
    "pre-commit",
    "pytest",
    "build",
    "bumpver>=2024.1130",
    "respx",
    "torch",
]

[project.urls]
Homepage = "https://github.com/Byaidu/PDFMathTranslate"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project.scripts]
pdf2zh = "pdf2zh.pdf2zh:main"

[tool.ruff]
line-length = 88
target-version = "py312"

[tool.ruff.lint]
select = ["E", "W", "F", "I"]
ignore = ["E203", "E501"]

[tool.black]
line-length = 88
target-version = ["py310", "py311"]



[bumpver]
current_version = "1.9.11"
version_pattern = "MAJOR.MINOR.PATCH[.PYTAGNUM]"

[bumpver.file_patterns]
"pyproject.toml" = [
    'current_version = "{version}"',
    'version = "{version}"'
]
"pdf2zh/__init__.py" = [
    '__version__ = "{version}"'
]