From 00c23254ec206544038e3fd5f6029814a4b3fa2e Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Sun, 8 Nov 2026 22:35:51 +0800 Subject: [PATCH] docs: add flit-core to Package Management intro The intro did not mention a README entry added after it was written, so readers got no advice on it. Co-Authored-By: Claude --- website/data/category_intros/package-management.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/data/category_intros/package-management.md b/website/data/category_intros/package-management.md index 93cf8fb7..e4e2f561 100644 --- a/website/data/category_intros/package-management.md +++ b/website/data/category_intros/package-management.md @@ -12,6 +12,7 @@ How to choose: - C or C++ extension modules: setuptools - Build hooks, or a layout uv-build doesn't expect: Hatchling - Building a Poetry project without Poetry installed: poetry-core +- Taking the version and description from your module: flit_core uv is [a single tool](https://docs.astral.sh/uv/) for Python versions, virtual environments, dependencies, and command-line tools. Start a project with `uv init`, add packages with `uv add`, and run code with `uv run`, which [checks that the lockfile and environment are up to date](https://docs.astral.sh/uv/guides/projects/#running-commands) before every run. The `uv pip` commands are [for projects not ready to move away from pip](https://docs.astral.sh/uv/pip/), not the main interface. @@ -31,4 +32,6 @@ conda manages [packages and environments for any language](https://docs.conda.io setuptools [builds C and C++ extension modules](https://setuptools.pypa.io/en/latest/userguide/ext_modules.html), and Hatch's docs [recommend it](https://hatch.pypa.io/latest/why/#build-backend) for them. Keep its configuration in pyproject.toml and `setup.py` [minimal, if you need one at all](https://setuptools.pypa.io/en/latest/userguide/quickstart.html#setuppy-discouraged), and don't run `setup.py` as a script. +flit_core is Flit's build backend, made for [pure Python packages with no build steps](https://flit.pypa.io/en/latest/rationale.html). List `version` and `description` under `dynamic`, and it [reads them from your module's `__version__` and docstring](https://flit.pypa.io/en/latest/pyproject_toml.html#project-metadata). To start, `flit init` [writes the pyproject.toml](https://flit.pypa.io/en/latest/) for your module. + Whichever tool writes your lockfile, commit it to version control, as [uv](https://docs.astral.sh/uv/guides/projects/#uvlock) and [Poetry](https://python-poetry.org/docs/basic-usage/#committing-your-poetrylock-file-to-version-control) both recommend, so every machine installs the same versions.