Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
96 lines (87 loc) · 3.4 KB
/
Copy pathpyproject.toml
File metadata and controls
96 lines (87 loc) · 3.4 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
[build-system]
requires = ["hatchling==1.33.0"] # exact: one commit always builds the same wheel (tools/pin_wheel.py)
build-backend = "hatchling.build"
[project]
name = "pdfintake"
dynamic = ["version"]
description = "Turn scans, phone photos and PDFs into small, searchable PDFs: lossless image-to-PDF, an OCR text layer and lossless shrinking."
readme = "README.md"
requires-python = ">=3.11,<3.15"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "RazorII" }]
keywords = ["pdf", "ocr", "scan", "searchable", "lossless", "tesseract", "image-to-pdf"]
classifiers = [
"Environment :: Console",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Multimedia :: Graphics :: Capture :: Scanners",
"Topic :: Office/Business",
"Topic :: Text Processing",
]
# pdfintake-data-en is the English data wheel (models, font, canary), pinned by URL and sha256.
# The v0.1.0 release hosts it; scripts/dev-install.sh overrides this pin for a local checkout.
# Every runtime range stops below the next major, so a new major reaches no install untested.
# certifi stays open on purpose: its CA roots must stay current.
dependencies = [
"certifi",
"fonttools>=4.68,<5",
"fpdf2==2.9.0",
"numpy>=2.0,<3",
"onnxruntime>=1.31,<2",
"opencv-python-headless<6",
"pdfintake-data-en @ https://github.com/RazorII/pdfintake/releases/download/v0.1.0/pdfintake_data_en-1.0.0-py3-none-any.whl#sha256=25c9bfab9ab7162f41979c665f22601e71f3bee0bac81d3e5f37f3e696be1df6",
"pikepdf>=10.17,<11",
"pillow>=13,<14",
"pillow-heif>=1.8,<2",
"py3langid==0.4.0",
"pyobjc-framework-Quartz>=13,<14; sys_platform == 'darwin'",
"pyobjc-framework-Vision>=13,<14; sys_platform == 'darwin'",
"pypdfium2>=5.14,<6",
"rapidocr>=3.10,<4",
"tesserocr==2.13.0",
]
[project.optional-dependencies]
test = [
"jsonschema",
"pyhanko>=0.29,<0.30",
"pytest>=7",
"uharfbuzz==0.57.0",
]
kit = ["uharfbuzz==0.57.0"]
# Thorough mode (dots.mocr on the GPU): Apple silicon only; elsewhere the extra installs nothing.
thorough = [
"mlx==0.32.3; sys_platform == 'darwin' and platform_machine == 'arm64'",
"tokenizers>=0.23,<0.24; sys_platform == 'darwin' and platform_machine == 'arm64'",
]
kit-thai = ["pythainlp"]
[project.scripts]
pdfintake = "pdfintake.cli:main"
[project.urls]
Homepage = "https://github.com/RazorII/pdfintake"
Issues = "https://github.com/RazorII/pdfintake/issues"
[tool.hatch.version]
path = "src/pdfintake/__init__.py"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/pdfintake"]
[tool.hatch.build.targets.sdist]
exclude = ["/.github", "/claude-plugin"]
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
pythonpath = ["tests"]
addopts = "-ra -p no:cacheprovider"
markers = [
"network: may open sockets beyond loopback; every other test runs with the network blocked (tests/conftest.py)",
"cli_subprocess: starts the pdfintake CLI in a subprocess",
"vision: needs Apple Vision; scripts/release.sh runs pytest -m vision on the release Mac",
"thorough: needs thorough mode's model (dots.mocr) on an Apple-silicon Mac; scripts/thorough-local.sh runs pytest -m thorough before a release",
]