* ci: add PyPI trusted publishing, abi3 wheels, bump to 0.2.1 Adds publish-pypi.yml mirroring the npm/crates.io pattern: triggers on Cargo.toml version change, builds wheels for 5 platforms via maturin, publishes with OIDC trusted publishing (no tokens). workflow_dispatch serves as a manual fallback for the first run after the PyPI project transfer. Enables pyo3 abi3-py38 so one wheel per platform covers CPython >=3.8 (previous manual uploads were cp312-only). Bumps version to 0.2.1 since PyPI already has 0.2.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * ci(pypi): guard dispatch to main, support partial-release repair Review feedback: trusted publishing doesn't match on branch, so workflow_dispatch needed an explicit main-ref guard. Manual dispatch now always rebuilds and publishes with skip-existing so a release that failed after uploading only some wheels can be completed by re-running. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * ci(pypi): version PyPI package from pyproject.toml, not Cargo.toml Decouple the Python package version from the crate version, matching how npm publishing keys off napi/package.json: bump [project] version in pyproject.toml manually and CI publishes on merge. Reverts the Cargo.toml bump so this PR no longer triggers a crates.io release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: remove accidentally committed uv.lock Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): tolerate missing version key in parent pyproject.toml The first merge of this workflow has a parent commit where pyproject.toml still used dynamic = ["version"], so the old-version read would KeyError and the auto-publish would never fire. Treat a missing key as a change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
58 lines
1.1 KiB
TOML
58 lines
1.1 KiB
TOML
[package]
|
|
name = "pdf-inspector"
|
|
version = "0.1.4"
|
|
edition = "2021"
|
|
autobins = false
|
|
authors = ["Firecrawl Team"]
|
|
description = "Fast PDF inspection, classification, and text extraction with smart scanned vs text-based detection"
|
|
license = "MIT"
|
|
repository = "https://github.com/firecrawl/pdf-inspector"
|
|
|
|
[lib]
|
|
name = "pdf_inspector"
|
|
crate-type = ["lib", "cdylib"]
|
|
|
|
[dependencies]
|
|
# Python bindings
|
|
pyo3 = { version = "0.25", features = ["extension-module", "abi3-py38"], optional = true }
|
|
|
|
# PDF parsing
|
|
lopdf = { version = "0.41.0", features = ["rayon"] }
|
|
|
|
# Error handling
|
|
thiserror = "2.0"
|
|
|
|
# Parallel processing
|
|
rayon = "1.10"
|
|
|
|
# Logging
|
|
log = "0.4"
|
|
env_logger = "0.11"
|
|
|
|
# Text processing
|
|
regex = "1.10"
|
|
once_cell = "1.19"
|
|
unicode-normalization = "0.1"
|
|
|
|
# TrueType font parsing (for Identity-H CID font cmap extraction)
|
|
ttf-parser = "0.25"
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3.3"
|
|
|
|
[features]
|
|
default = []
|
|
python = ["pyo3"]
|
|
|
|
[[bin]]
|
|
name = "pdf2md"
|
|
path = "src/bin/pdf2md.rs"
|
|
|
|
[[bin]]
|
|
name = "detect-pdf"
|
|
path = "src/bin/detect_pdf.rs"
|
|
|
|
[[bin]]
|
|
name = "dump_ops"
|
|
path = "src/bin/dump_ops.rs"
|