Skip to content

Commit 12b8c35

Browse files
committed
docs: use PyPI ref directly
Fixes docstrfmt Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 8ec7ae2 commit 12b8c35

2 files changed

Lines changed: 84 additions & 61 deletions

File tree

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ repos:
4444
- id: docstrfmt
4545
args: ["-l", "120"]
4646
additional_dependencies: ["sphinx>=9.1"]
47-
exclude: ^docs/index\.rst$ # https://github.com/LilSpazJoekp/docstrfmt/issues/176
4847
- repo: https://github.com/astral-sh/ruff-pre-commit
4948
rev: aab412d509121cb5f7533134b7e67f9fab59c682 # frozen: v0.16.4
5049
hooks:

docs/index.rst

Lines changed: 84 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,133 @@
1-
*****
2-
build
3-
*****
1+
#######
2+
build
3+
#######
44

55
A simple, correct `Python packaging <https://packaging.python.org/>`_ **build frontend**.
66

7-
build reads your project's `pyproject.toml configuration file <https://packaging.python.org/en/latest/specifications/pyproject-toml/>`_ and invokes **build backends** to create `distribution packages <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_—the files you upload to `PyPI <https://pypi.org/>`_ or install with pip. It focuses solely on building packages and does not manage dependencies or virtual environments.
7+
build reads your project's `pyproject.toml configuration file
8+
<https://packaging.python.org/en/latest/specifications/pyproject-toml/>`_ and invokes **build backends** to create
9+
`distribution packages <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ (the files you
10+
upload to PyPI_ or install with pip_). It focuses solely on building packages and does not manage dependencies or
11+
virtual environments.
812

9-
Mission Statement
10-
=================
13+
*******************
14+
Mission Statement
15+
*******************
1116

12-
Many Python tools combine multiple capabilities into one project. For example, pip_ both installs packages and can build them. While convenient, this tight coupling isn't always desirable. Some users need standalone build tools for custom environments (outside PyPI_), or they manage packages themselves (like Linux distributions do).
17+
Many Python tools combine multiple capabilities into one project. For example, pip_ both installs packages and can build
18+
them. While convenient, this tight coupling isn't always desirable. Some users need standalone build tools for custom
19+
environments (outside PyPI_), or they manage packages themselves (like Linux distributions do).
1320

14-
This project fills that gap by providing a standalone build tool following modern Python packaging standards for how build tools communicate with backends and how ``pyproject.toml`` defines build requirements.
21+
This project fills that gap by providing a standalone build tool following modern Python packaging standards for how
22+
build tools communicate with backends and how ``pyproject.toml`` defines build requirements.
1523

1624
We keep dependencies minimal to make build easy to install and use in restricted environments.
1725

18-
Differences from other tools
19-
=============================
26+
******************************
27+
Differences from other tools
28+
******************************
2029

21-
Thanks to standardization, all compliant build frontends produce the same outputs (`source distributions <https://packaging.python.org/en/latest/specifications/source-distribution-format/>`_ and `wheels <https://packaging.python.org/en/latest/specifications/binary-distribution-format/>`_) from the same project. The differences are mainly in scope, dependencies, and extra features.
30+
Thanks to standardization, all compliant build frontends produce the same outputs (`source distributions
31+
<https://packaging.python.org/en/latest/specifications/source-distribution-format/>`_ and `wheels
32+
<https://packaging.python.org/en/latest/specifications/binary-distribution-format/>`_) from the same project. The
33+
differences are mainly in scope, dependencies, and extra features.
2234

2335
``uv build``
24-
------------
36+
============
2537

26-
`uv build <https://docs.astral.sh/uv/>`_ is essentially equivalent to ``python -m build --installer=uv``. Both follow packaging standards. build offers features like ``--config-json`` for passing complex nested configuration to backends, and the pip installer works on systems that don't have pre-compiled uv wheels.
38+
`uv build <https://docs.astral.sh/uv/>`_ is essentially equivalent to ``python -m build --installer=uv``. Both follow
39+
packaging standards. build offers features like ``--config-json`` for passing complex nested configuration to backends,
40+
and the pip installer works on systems that don't have pre-compiled uv wheels.
2741

2842
``setup.py sdist bdist_wheel``
29-
-------------------------------
43+
==============================
3044

31-
build is the modern equivalent of ``setup.py sdist bdist_wheel``, supporting any backend — not just `setuptools <https://setuptools.pypa.io/>`_.
45+
build is the modern equivalent of ``setup.py sdist bdist_wheel``, supporting any backend — not just `setuptools
46+
<https://setuptools.pypa.io/>`_.
3247

3348
``hatch build``
34-
---------------
49+
===============
3550

36-
`hatch build <https://hatch.pypa.io/>`_ is the build command from the Hatch project management tool. It provides a convenient wrapper around the build process as part of the larger Hatch ecosystem for managing Python projects, while build is a standalone tool focused solely on building.
51+
`hatch build <https://hatch.pypa.io/>`_ is the build command from the Hatch project management tool. It provides a
52+
convenient wrapper around the build process as part of the larger Hatch ecosystem for managing Python projects, while
53+
build is a standalone tool focused solely on building.
3754

3855
``flit build``
39-
--------------
56+
==============
4057

41-
`flit build <https://flit.pypa.io/>`_ is the build command from the Flit project. One important difference: flit-core produces slightly different source distributions when built by flit itself compared to other frontends. Using build (or any standards-compliant frontend) ensures consistent outputs regardless of the backend.
58+
`flit build <https://flit.pypa.io/>`_ is the build command from the Flit project. One important difference: flit-core
59+
produces slightly different source distributions when built by flit itself compared to other frontends. Using build (or
60+
any standards-compliant frontend) ensures consistent outputs regardless of the backend.
4261

4362
``cibuildwheel``
44-
----------------
63+
================
4564

46-
`cibuildwheel <https://cibuildwheel.pypa.io/>`_ is a different kind of tool. While build creates a single wheel for the current platform, cibuildwheel orchestrates building wheels across many platforms and Python versions in CI. It actually calls a build frontend (like build or pip) internally for each platform. Use build to create a pure-Python wheel or a single native wheel; use cibuildwheel when you need to produce native wheels for many platforms.
65+
`cibuildwheel <https://cibuildwheel.pypa.io/>`_ is a different kind of tool. While build creates a single wheel for the
66+
current platform, cibuildwheel orchestrates building wheels across many platforms and Python versions in CI. It actually
67+
calls a build frontend (like build or pip) internally for each platform. Use build to create a pure-Python wheel or a
68+
single native wheel; use cibuildwheel when you need to produce native wheels for many platforms.
4769

48-
Where to start
49-
==============
70+
****************
71+
Where to start
72+
****************
5073

5174
**First time using build?** Start with the :doc:`tutorial/getting-started` to create your first package.
5275

53-
**Need to solve a specific problem?** Check the :doc:`how-to/basic-usage` for common workflows, or browse the how-to guides below for your specific scenario.
76+
**Need to solve a specific problem?** Check the :doc:`how-to/basic-usage` for common workflows, or browse the how-to
77+
guides below for your specific scenario.
5478

55-
**Looking for technical details?** The :doc:`reference/cli` documents all command-line options, and the :doc:`reference/api` covers the Python API.
79+
**Looking for technical details?** The :doc:`reference/cli` documents all command-line options, and the
80+
:doc:`reference/api` covers the Python API.
5681

57-
**Want to understand how it works?** Read :doc:`explanation/how-it-works` to learn about the build process and isolation.
82+
**Want to understand how it works?** Read :doc:`explanation/how-it-works` to learn about the build process and
83+
isolation.
5884

5985
.. toctree::
60-
:caption: Tutorial
61-
:hidden:
86+
:caption: Tutorial
87+
:hidden:
6288

63-
tutorial/getting-started
89+
tutorial/getting-started
6490

6591
.. toctree::
66-
:caption: How-to Guides
67-
:hidden:
92+
:caption: How-to Guides
93+
:hidden:
6894

69-
how-to/install
70-
how-to/basic-usage
71-
how-to/choosing-tools
72-
how-to/ci-cd
73-
how-to/corporate-environments
74-
how-to/config-settings
75-
how-to/troubleshooting
95+
how-to/install
96+
how-to/basic-usage
97+
how-to/choosing-tools
98+
how-to/ci-cd
99+
how-to/corporate-environments
100+
how-to/config-settings
101+
how-to/troubleshooting
76102

77103
.. toctree::
78-
:caption: Reference
79-
:hidden:
104+
:caption: Reference
105+
:hidden:
80106

81-
reference/cli
82-
reference/api
83-
reference/environment-variables
107+
reference/cli
108+
reference/api
109+
reference/environment-variables
84110

85111
.. toctree::
86-
:caption: Explanation
87-
:hidden:
112+
:caption: Explanation
113+
:hidden:
88114

89-
explanation/how-it-works
90-
explanation/build-backends
115+
explanation/how-it-works
116+
explanation/build-backends
91117

92118
.. toctree::
93-
:caption: Development
94-
:hidden:
119+
:caption: Development
120+
:titlesonly:
121+
:hidden:
95122

96-
development/contributing
97-
development/release
98-
Source Code <https://github.com/pypa/build/>
99-
Issue Tracker <https://github.com/pypa/build/issues>
100-
101-
.. toctree::
102-
:caption: Changelog
103-
:hidden:
104-
105-
changelog
123+
development/contributing
124+
development/release
125+
changelog
126+
Source Code <https://github.com/pypa/build/>
127+
Issue Tracker <https://github.com/pypa/build/issues>
106128

107129
.. _pip: https://github.com/pypa/pip
108-
.. _PyPI: https://pypi.org/
130+
109131
.. _pipx: https://github.com/pipxproject/pipx
132+
133+
.. _pypi: https://pypi.org/

0 commit comments

Comments
 (0)