Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions pages/common/poetry-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# poetry build

> Build a Poetry package as a tarball and a wheel.
> More information: <https://python-poetry.org/docs/cli/#build>.
- Build the package in the default format (sdist and wheel):

`poetry build`

- Build only the wheel package:

`poetry build --format {{wheel}}`
Copy link
Member

@dmmqz dmmqz Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`poetry build --format {{wheel}}`
`poetry build {{[-f|--format]}} wheel`


- Build only the source distribution (sdist):

`poetry build --format {{sdist}}`
Copy link
Member

@dmmqz dmmqz Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`poetry build --format {{sdist}}`
`poetry build {{[-f|--format]}} sdist`


- Build the package and output to a specific directory:

`poetry build --output {{path/to/directory}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`poetry build --output {{path/to/directory}}`
`poetry build {{[-o|--output]}} {{path/to/directory}}`


- Display help:

`poetry build --help`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`poetry build --help`
`poetry build {{[-h|--help]}}`