Implements the Python SDK with all 9 contract methods, 8 exception classes, type definitions, asyncio wrappers, and subprocess fallback. Changes: - Add Python wrapper module with extract, extract_text, extract_markdown, extract_stream, search, get_metadata, hash, classify, verify_receipt - Add exception hierarchy: PdftractError base class with 7 subclasses - Add dataclass type definitions: Document, Page, Span, Block, Match, Fingerprint, Classification, Metadata - Add asyncio module with async wrappers for 4 long-running methods - Add subprocess fallback for when native module fails to import - Add conformance test runner under tests/test_conformance.py - Update pyproject.toml with dynamic version from Cargo Closes: pdftract-2nu0s
42 lines
1.4 KiB
TOML
42 lines
1.4 KiB
TOML
[build-system]
|
|
requires = ["maturin>=1.0,<2.0"]
|
|
build-backend = "maturin"
|
|
|
|
[project]
|
|
name = "pdftract"
|
|
dynamic = ["version"]
|
|
description = "PDF text extraction library with robust encoding detection"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = {text = "MIT OR Apache-2.0"}
|
|
keywords = ["pdf", "text-extraction", "encoding-detection"]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Programming Language :: Rust",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
"Topic :: Text Processing :: Linguistic",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/jedarden/pdftract"
|
|
Documentation = "https://github.com/jedarden/pdftract"
|
|
Repository = "https://github.com/jedarden/pdftract"
|
|
Issues = "https://github.com/jedarden/pdftract/issues"
|
|
|
|
[tool.maturin]
|
|
features = ["pyo3/extension-module"]
|
|
# Strip symbols from the final wheel for smaller size
|
|
strip = true
|
|
# Use abi3 for forward compatibility across Python 3.11+
|
|
python-source = "python"
|
|
# Include license files in the wheel
|
|
license-files = ["../../LICENSE-MIT", "../../LICENSE-APACHE"]
|
|
# Dynamic version from Cargo.toml
|
|
version-provider = "cargo"
|