chore: name the extra after its dependency; keep README install section minimal

This commit is contained in:
Ray 2026-07-19 16:21:36 +08:00
parent 472d871ac3
commit 74c8f7b271
4 changed files with 3 additions and 5 deletions

View file

@ -153,8 +153,6 @@ A unified `PageIndexClient` powers both local self-hosted and cloud-managed mode
pip install pageindex
```
Local-mode image extraction uses PyMuPDF (AGPL-licensed) and is an optional extra: `pip install "pageindex[images]"`. Without it, local indexing is text-only.
### Quick start
```python

View file

@ -816,7 +816,7 @@ def get_page_tokens(pdf_path, model=None, pdf_parser="PyPDF2"):
page_list.append((page_text, token_length))
return page_list
elif pdf_parser == "PyMuPDF":
import pymupdf # optional dependency: pip install pageindex[images]
import pymupdf # optional dependency: pip install pageindex[pymupdf]
if isinstance(pdf_path, BytesIO):
pdf_stream = pdf_path
doc = pymupdf.open(stream=pdf_stream, filetype="pdf")

View file

@ -56,7 +56,7 @@ class PdfParser:
if not _warned_no_pymupdf:
logging.getLogger(__name__).warning(
"PyMuPDF is not installed; skipping image extraction. "
'Install with: pip install "pageindex[images]"')
'Install with: pip install "pageindex[pymupdf]"')
_warned_no_pymupdf = True
return {}

View file

@ -35,7 +35,7 @@ typing-extensions = ">=4.9.0"
pydantic = ">=2.5.0,<3.0.0"
[tool.poetry.extras]
images = ["pymupdf"]
pymupdf = ["pymupdf"]
[tool.poetry.group.dev.dependencies]
pytest = ">=7.0"