awmatheson commented on PR #27586:
URL: https://github.com/apache/flink/pull/27586#issuecomment-3917050612
I made another patch for the build system so it can use uv and pip. Summary
below. I sent you the patch separately.
**Problem:** The current README instructs `pip install -e ".[sphinx]"`
from `flink-python/`, but that tries to build the full flink-python package
(including apache-beam) which fails on Python 3.12+ due
to missing `pkg_resources`. The `flink-python/pyproject.toml` also has
no `[project]` table, so `uv sync` doesn't work either.
**Fix:** This patch adds a standalone `pyproject.toml` in
`flink-python/docs/` with just the Sphinx dependencies, so the docs can be
built independently:
```bash
cd flink-python/docs
uv sync
make html
```
The Makefile auto-detects `uv` on PATH and uses `uv run` to invoke
Sphinx. If uv isn't available, it falls back to bare `sphinx-build` (the
existing behavior). The `SPHINXBUILD` / `SPHINXPYTHON`
overrides still work for CI or custom setups.
Changes:
- `docs/pyproject.toml` — new, with Sphinx deps in a `[dependency-groups]
dev` group
- `docs/uv.lock` — lockfile for reproducible installs
- `docs/Makefile` — auto-detect uv, use `uv run` for
sphinx-build/sphinx-intl/python
- `docs/README.md` — updated prerequisites with uv (recommended) and pip
fallback
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]