• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

poetry/H03-May-2022-46,37835,507

LICENSEH A D04-Oct-20211.1 KiB2117

PKG-INFOH A D04-Oct-20214 KiB7765

README.mdH A D04-Oct-20212.4 KiB4636

pyproject.tomlH A D04-Oct-20212.7 KiB12399

setup.pyH A D03-May-20224.5 KiB6759

README.md

1# Poetry Core
2[![PyPI version](https://img.shields.io/pypi/v/poetry-core)](https://pypi.org/project/poetry-core/)
3[![Python Versions](https://img.shields.io/pypi/pyversions/poetry-core)](https://pypi.org/project/poetry-core/)
4[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
6[![](https://github.com/python-poetry/poetry-core/workflows/Tests/badge.svg)](https://github.com/python-poetry/poetry-core/actions?query=workflow%3ATests)
7
8A [PEP 517](https://www.python.org/dev/peps/pep-0517/) build backend implementation developed for
9[Poetry](https://github.com/python-poetry/poetry). This project is intended to be a light weight, fully compliant,
10self-contained package allowing PEP 517 compatible build frontends to build Poetry managed projects.
11
12## Usage
13In most cases, the usage of this package is transparent to the end-user as it is either made use by Poetry itself
14or a PEP 517 frontend (eg: `pip`).
15
16In order to enable the use `poetry-core` as your build backend, the following snippet must be present in your
17project's `pyproject.toml` file.
18
19```toml
20[build-system]
21requires = ["poetry-core"]
22build-backend = "poetry.core.masonry.api"
23```
24
25Once this is present, a PEP 517 frontend like `pip` can build and install your project from source without the need
26for Poetry or any of it's dependencies.
27
28```shell
29# install to current environment
30pip install /path/to/poetry/managed/project
31
32# build a wheel package
33pip wheel /path/to/poetry/managed/project
34```
35
36## Why is this required?
37Prior to the release of version `1.1.0`, Poetry was a build as a project management tool that included a PEP 517
38build backend. This was inefficient and time consuming in majority cases a PEP 517 build was required. For example,
39both `pip` and `tox` (with isolated builds) would install Poetry and all dependencies it required. Most of these
40dependencies are not required when the objective is to simply build either a source or binary distribution of your
41project.
42
43In order to improve the above situation, `poetry-core` was created. Shared functionality pertaining to PEP 517 build
44backends, including reading lock file, `pyproject.toml` and building wheel/sdist, were implemented in this package.  This
45makes PEP 517 builds extremely fast for Poetry managed packages.
46