Skip to content

Commit

Permalink
Use a lightweight core library (#2212)
Browse files Browse the repository at this point in the history
* Use poetry-core

* Upgrade dependencies

* No longer use Poetry as a build backend but poetry-core instead

* Use the latest version of poetry-core
  • Loading branch information
sdispater authored Mar 27, 2020
1 parent 8224b16 commit 3b30d2a
Show file tree
Hide file tree
Showing 279 changed files with 273 additions and 15,536 deletions.
4 changes: 2 additions & 2 deletions docs/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ So, in your `pyproject.toml` file, add this section if it does not already exist

```toml
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
```

And use a `tox.ini` configuration file similar to this:
Expand Down
16 changes: 11 additions & 5 deletions docs/docs/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,22 @@ If you publish you package on PyPI, they will appear in the `Project Links` sect
[PEP-517](https://www.python.org/dev/peps/pep-0517/) introduces a standard way
to define alternative build systems to build a Python project.

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

```toml
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
```

!!!note

When using the `new` or `init` command this section will be automatically added.


!!!note

If your `pyproject.toml` file still references `poetry` directly as a build backend,
you should update it to reference `poetry_core` instead.
5 changes: 5 additions & 0 deletions get-poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,13 @@ def expanduser(path):
import os
lib = os.path.normpath(os.path.join(os.path.realpath(__file__), "../..", "lib"))
vendors = os.path.join(lib, "poetry", "_vendor")
current_vendors = os.path.join(
vendors, "py{}".format(".".join(str(v) for v in sys.version_info[:2]))
)
sys.path.insert(0, lib)
sys.path.insert(0, current_vendors)
if __name__ == "__main__":
from poetry.console import main
Expand Down
Loading

0 comments on commit 3b30d2a

Please sign in to comment.