Skip to content

Commit 9586739

Browse files
committed
No longer use Poetry as a build backend but poetry-core instead
1 parent bd6373d commit 9586739

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

docs/docs/faq.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ So, in your `pyproject.toml` file, add this section if it does not already exist
4242

4343
```toml
4444
[build-system]
45-
requires = ["poetry>=0.12"]
46-
build-backend = "poetry.masonry.api"
45+
requires = ["poetry-core>=1.0.0"]
46+
build-backend = "poetry_core.masonry.api"
4747
```
4848

4949
And use a `tox.ini` configuration file similar to this:

docs/docs/pyproject.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -274,16 +274,22 @@ If you publish you package on PyPI, they will appear in the `Project Links` sect
274274
[PEP-517](https://www.python.org/dev/peps/pep-0517/) introduces a standard way
275275
to define alternative build systems to build a Python project.
276276

277-
Poetry is compliant with PEP-517 so if you use Poetry to manage your Python
278-
project you should reference it in the `build-system` section of the `pyproject.toml`
279-
file like so:
277+
Poetry is compliant with PEP-517, by providing a lightweight core library,
278+
so if you use Poetry to manage your Python project you should reference
279+
it in the `build-system` section of the `pyproject.toml` file like so:
280280

281281
```toml
282282
[build-system]
283-
requires = ["poetry>=0.12"]
284-
build-backend = "poetry.masonry.api"
283+
requires = ["poetry_core>=1.0.0"]
284+
build-backend = "poetry_core.masonry.api"
285285
```
286286

287287
!!!note
288288

289289
When using the `new` or `init` command this section will be automatically added.
290+
291+
292+
!!!note
293+
294+
If your `pyproject.toml` file still references `poetry` directly as a build backend,
295+
you should update it to reference `poetry_core` instead.

poetry/layouts/layout.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_version():
3838
[tool.poetry.dev-dependencies]
3939
"""
4040

41-
BUILD_SYSTEM_MIN_VERSION = "0.12"
41+
BUILD_SYSTEM_MIN_VERSION = "1.0.0"
4242
BUILD_SYSTEM_MAX_VERSION = None
4343

4444

@@ -109,8 +109,8 @@ def generate_poetry_content(self):
109109
if BUILD_SYSTEM_MAX_VERSION is not None:
110110
build_system_version += ",<" + BUILD_SYSTEM_MAX_VERSION
111111

112-
build_system.add("requires", ["poetry" + build_system_version])
113-
build_system.add("build-backend", "poetry.masonry.api")
112+
build_system.add("requires", ["poetry_core" + build_system_version])
113+
build_system.add("build-backend", "poetry_core.masonry.api")
114114

115115
content.add("build-system", build_system)
116116

pyproject.toml

+2-5
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,8 @@ poetry = "poetry.console:main"
7575

7676

7777
[build-system]
78-
requires = ["intreehooks"]
79-
build-backend = "intreehooks:loader"
80-
81-
[tool.intreehooks]
82-
build-backend = "poetry.masonry.api"
78+
requires = ["poetry_core>=1.0.0a3"]
79+
build-backend = "poetry_core.masonry.api"
8380

8481

8582
[tool.isort]

0 commit comments

Comments
 (0)