@@ -72,44 +72,40 @@ that the project should be built (e.g., no setup.py/setup.cfg or other
7272build 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
8079There is an existing, legacy source tree format involving
8180``setup.py ``. We don't try to specify it further; its de facto
8281specification 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
8684Projects can select their build backend using the optional ``build-backend ``
8785key. 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
9692used to perform the build (see :ref: `build-system-interface ` for details).
9793This 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
109105which acts like::
110106
111- import flit.api
112- backend = flit.api
107+ import example_backend.build
108+ backend = example_backend.build.backend
113109
114110Formally, the string should satisfy this grammar::
115111
@@ -140,17 +136,14 @@ Projects may still wish to include a ``setup.py`` for compatibility with tools
140136that 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
148143The 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