Skip to content

Commit 3b30d2a

Browse files
authored
Use a lightweight core library (#2212)
* Use poetry-core * Upgrade dependencies * No longer use Poetry as a build backend but poetry-core instead * Use the latest version of poetry-core
1 parent 8224b16 commit 3b30d2a

File tree

279 files changed

+273
-15536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

279 files changed

+273
-15536
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.

get-poetry.py

+5
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,13 @@ def expanduser(path):
204204
import os
205205
206206
lib = os.path.normpath(os.path.join(os.path.realpath(__file__), "../..", "lib"))
207+
vendors = os.path.join(lib, "poetry", "_vendor")
208+
current_vendors = os.path.join(
209+
vendors, "py{}".format(".".join(str(v) for v in sys.version_info[:2]))
210+
)
207211
208212
sys.path.insert(0, lib)
213+
sys.path.insert(0, current_vendors)
209214
210215
if __name__ == "__main__":
211216
from poetry.console import main

0 commit comments

Comments
 (0)