-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
157 lines (141 loc) · 3.66 KB
/
pyproject.toml
File metadata and controls
157 lines (141 loc) · 3.66 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "nuoyi"
dynamic = ["version"]
description = "A simple tool to transform PDF and DOCX to Markdown using marker-pdf"
readme = "README.md"
license = "GPL-3.0-or-later"
authors = [
{ name = "CycleUser", email = "cycleuser@cycleuser.org" }
]
keywords = [
"pdf",
"docx",
"markdown",
"converter",
"ocr",
"document",
"marker-pdf",
"amd",
"radeon",
"directml",
"gpu",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Environment :: X11 Applications :: Qt",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Text Processing :: Markup :: Markdown",
"Topic :: Utilities",
]
requires-python = ">=3.10"
dependencies = [
"marker-pdf>=1.0.0",
"PyMuPDF>=1.23.0",
"python-docx>=0.8.11",
"Pillow>=9.0.0",
]
[project.optional-dependencies]
gui = [
"PySide6>=6.5.0",
]
web = [
"flask>=2.0.0",
]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"build>=1.0.0",
"twine>=4.0.0",
"ruff>=0.1.0",
]
# NVIDIA CUDA support - ensures complete CUDA library installation
# Required for marker-pdf to work properly with GPU acceleration
#
# IMPORTANT: PyTorch 2.10+ installs nvidia-*-cu13 packages, but some libraries
# (surya, transformers) need nvidia-*-cu12 packages for module path discovery.
# This ensures both cu12 and cu13 paths are available.
#
# Install with: pip install nuoyi[cuda]
# Or: pip install nuoyi[all-cuda] for complete installation
cuda = [
# cu12 packages - provide nvidia/cublas/, nvidia/cuda_runtime/, etc. paths
# Required for surya/transformers to find CUDA libraries via import
"nvidia-cublas-cu12>=12.0.0",
"nvidia-cuda-runtime-cu12>=12.0.0",
"nvidia-cufft-cu12>=11.0.0",
"nvidia-cusolver-cu12>=11.0.0",
"nvidia-cusparse-cu12>=12.0.0",
"nvidia-curand-cu12>=10.0.0",
"nvidia-cuda-nvrtc-cu12>=12.0.0",
"nvidia-nvtx-cu12>=12.0.0",
"nvidia-nvjitlink-cu12>=12.0.0",
]
# AMD GPU support - install manually after torch is installed
# pip install torch-directml
# See AMD_GPU_SETUP.md for details
# PDF Engine optional dependencies
mineru = [
"magic-pdf>=1.3.0",
]
docling = [
"docling>=1.0.0",
]
pymupdf = [
"pymupdf4llm>=0.0.17",
]
pdfplumber = [
"pdfplumber>=0.10.0",
]
# All local engines
engines = [
"magic-pdf>=1.3.0",
"docling>=1.0.0",
"pymupdf4llm>=0.0.17",
"pdfplumber>=0.10.0",
]
# Everything (local engines)
all = [
"nuoyi[gui,web,dev,engines]",
]
# Everything with CUDA support
all-cuda = [
"nuoyi[gui,web,dev,engines,cuda]",
]
[project.scripts]
nuoyi = "nuoyi.cli:main"
[project.urls]
Homepage = "https://github.com/cycleuser/NuoYi"
Documentation = "https://github.com/cycleuser/NuoYi#readme"
Repository = "https://github.com/cycleuser/NuoYi.git"
Issues = "https://github.com/cycleuser/NuoYi/issues"
Changelog = "https://github.com/cycleuser/NuoYi/blob/main/CHANGELOG.md"
[tool.hatch.version]
path = "src/nuoyi/__init__.py"
[tool.hatch.build.targets.sdist]
include = [
"/src",
]
[tool.hatch.build.targets.wheel]
packages = ["src/nuoyi"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
[tool.ruff]
target-version = "py39"
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "C4"]
ignore = ["E501"]