Skip to content

Commit e1e2b3f

Browse files
committed
Remove PEP migration leftovers and refresh examples
1 parent 71d702b commit e1e2b3f

2 files changed

Lines changed: 14 additions & 24 deletions

File tree

‎source/specifications/build-system-interface.rst‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ The project's build system is configured in the
1616
Terminology
1717
===========
1818

19-
A *source tree* is something like a VCS checkout. We need a standard
20-
interface for installing from this format, to support usages like
21-
``pip install some-directory/``.
19+
A *source tree* is something like a VCS checkout.
2220

2321
A *source distribution* is a static snapshot representing a particular
2422
release of some source code, like ``lxml-3.4.4.tar.gz``. Source
@@ -262,11 +260,10 @@ For example, they might support some syntax like ``--package-config CC=gcc``.
262260
In case a user provides duplicate string-keys, build frontends SHOULD
263261
combine the corresponding string-values into a list of strings.
264262
Build frontends MAY also provide arbitrary other mechanisms
265-
for users to place entries in this dictionary. For example, ``pip``
266-
might choose to map a mix of modern and legacy command line arguments
267-
like::
263+
for users to place entries in this dictionary. For example, a frontend
264+
might map command line arguments like::
268265

269-
pip install \
266+
build-tool build \
270267
--package-config CC=gcc \
271268
--global-option="--some-global-option" \
272269
--build-option="--build-option1" \

‎source/specifications/pyproject-toml.rst‎

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,44 +72,40 @@ that the project should be built (e.g., no setup.py/setup.cfg or other
7272
build configuration files, and no ``[project]`` table).
7373

7474
.. _pyproject-build-system-build-backend:
75-
.. _build-system-interface-source-trees:
7675

7776
``build-backend``
7877
-----------------
7978

8079
There is an existing, legacy source tree format involving
8180
``setup.py``. We don't try to specify it further; its de facto
8281
specification is encoded in the source code and documentation of
83-
``distutils``, ``setuptools``, ``pip``, and other tools. We'll refer
84-
to it as the ``setup.py``\-style.
82+
``setuptools``, ``pip``, and other tools.
8583

8684
Projects can select their build backend using the optional ``build-backend``
8785
key. Here's an example of how it would look::
8886

8987
[build-system]
90-
# Defined by PEP 518:
9188
requires = ["flit"]
92-
# Defined by this specification:
93-
build-backend = "flit.api:main"
89+
build-backend = "flit.buildapi"
9490

9591
``build-backend`` is a string naming a Python object that will be
9692
used to perform the build (see :ref:`build-system-interface` for details).
9793
This is formatted following the same ``module:object`` syntax as an
9894
:ref:`entry point <entry-points>`. For instance, if the string is
99-
``"flit.api:main"`` as in the example above, this object would be looked up by executing the
100-
equivalent of::
95+
``"flit.buildapi"`` as in the example above, this object would
96+
be looked up by executing the equivalent of::
10197

102-
import flit.api
103-
backend = flit.api.main
98+
import flit.buildapi
99+
backend = flit.buildapi
104100

105-
It's also legal to leave out the ``:object`` part, e.g. ::
101+
It's also legal to specify an object within a module, e.g. ::
106102

107-
build-backend = "flit.api"
103+
build-backend = "example_backend.build:backend"
108104

109105
which acts like::
110106

111-
import flit.api
112-
backend = flit.api
107+
import example_backend.build
108+
backend = example_backend.build.backend
113109

114110
Formally, the string should satisfy this grammar::
115111

@@ -140,17 +136,14 @@ Projects may still wish to include a ``setup.py`` for compatibility with tools
140136
that do not use the build system interface specification.
141137

142138
.. _pyproject-build-system-backend-path:
143-
.. _build-system-interface-in-tree-build-backends:
144139

145140
``backend-path``
146141
----------------
147142

148143
The optional ``backend-path`` key can be used as follows::
149144

150145
[build-system]
151-
# Defined by PEP 518:
152146
requires = ["flit"]
153-
# Defined by this specification:
154147
build-backend = "local_backend"
155148
backend-path = ["backend"]
156149

0 commit comments

Comments
 (0)