Skip to main content

Poetry Plugin: Bundle

Poetry

This package is a plugin that allows the bundling of Poetry projects into various formats.

Installation

The easiest way to install the bundle plugin is via the self add command of Poetry.

poetry self add poetry-plugin-bundle

If you used pipx to install Poetry you can add the plugin via the pipx inject command.

pipx inject poetry poetry-plugin-bundle

Otherwise, if you used pip to install Poetry you can add the plugin packages via the pip install command.

pip install poetry-plugin-bundle

Usage

The plugin introduces a bundle command namespace that regroups commands to bundle the current project and its dependencies into various formats. These commands are particularly useful to deploy Poetry-managed applications.

bundle venv

The bundle venv command bundles the project and its dependencies into a virtual environment.

The following command

poetry bundle venv /path/to/environment

will bundle the project in the /path/to/environment directory by creating the virtual environment, installing the dependencies and the current project inside it. If the directory does not exist, it will be created automatically.

By default, the command uses the same Python executable that Poetry would use when running poetry install to build the virtual environment. If you want to use a different one, you can specify it with the --python/-p option:

poetry bundle venv /path/to/environment --python /full/path/to/python
poetry bundle venv /path/to/environment -p python3.8
poetry bundle venv /path/to/environment -p 3.8

Note

If the virtual environment already exists, two things can happen:

  • The python version of the virtual environment is the same as the main one: the dependencies will be synced (updated or removed).
  • The python version of the virtual environment is different: the virtual environment will be recreated from scratch.

You can also ensure that the virtual environment is recreated by using the --clear option:

poetry bundle venv /path/to/environment --clear

--platform option (Experimental)

This option allows you to specify a target platform for binary wheel selection, allowing you to install wheels for architectures/platforms other than the host system.

The primary use case is in CI/CD operations to produce a deployable asset, such as a ZIP file for AWS Lambda and other such cloud providers. It is common for the runtimes of these target environments to be different enough from the CI/CD's runner host such that the binary wheels selected using the host's criteria are not compatible with the target system's.

Supported platform values

The --platform option requires a value that conforms to the Python Packaging Platform Tag format. Only the following "families" are supported at this time:

  • manylinux
  • musllinux
  • macosx

Examples of valid platform tags

This is not a comprehensive list, but illustrates typical examples.

manylinux_2_28_x86_64, manylinux1_x86_64, manylinux2010_x86_64, manylinux2014_x86_64

musllinux_1_2_x86_64

macosx_10_9_x86_64, macosx_10_9_intel, macosx_11_1_universal2, macosx_11_0_arm64

Example use case for AWS Lambda

As an example of one motivating use case for this option, consider the AWS Lambda "serverless" execution environment. Depending upon which Python version you configure for your runtime, you may get different versions of the Linux system runtime. When dealing with pre-compiled binary wheels, these runtime differences can matter. If a shared library from a wheel is packaged in your deployment artifact that is incompatible with the runtime provided environment, then your Python "function" will error at execution time in the serverless environment. The issue arises when the build system that is producing the deployment artifact has a materially different platform from the selected serverless Lambda runtime.

For example, the Python 3.11 Lambda runtime is Amazon Linux 2, which includes the Glibc 2.26 library. If a Python application is packaged and deployed in this environment that contains wheels built for a more recent version of Glibc, then a runtime error will result. This is likely to occur even if the build system is the same CPU architecture (e.g. x86_64) and core platform (e.g. Linux) and there is a package dependency that provides multiple precompiled wheels for various Glibc (or other system library) versions. The "best" wheel in the context of the build system can differ from that of the target execution environment.

Limitations

This is not an actual cross-compiler. Nor is it a containerized compilation/build environment. It simply allows controlling which prebuilt binaries are selected. It is not a replacement for cross-compilation or containerized builds for use cases requiring that.

If there is not a binary wheel distribution compatible with the specified platform, then the package's source distribution is selected. If there are compile/build steps for "extensions" that need to run for the source distribution, then these operations will execute in the context of the host CI/build system. This means that the --platform option has no impact on any extension compile/build operations that must occur during package installation. This feature is only for selecting prebuilt wheels, and not for compiling them from source.

Arguably, in a vast number of use cases, prebuilt wheel binaries are available for your packages and simply selecting them based on a platform other than the host CI/build system is much faster and simpler than heavier build-from-source alternatives.

Metadata

Release files for poetry-plugin-bundle 1.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for poetry-plugin-bundle 1.8.0
File Size Uploaded
poetry_plugin_bundle-1.8.0.tar.gz 25.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for poetry-plugin-bundle 1.8.0
File Interpreter ABI Platform
poetry_plugin_bundle-1.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.7 kB

Release files / poetry_plugin_bundle-1.8.0.tar.gz

Download URL poetry_plugin_bundle-1.8.0.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8524b3536c0c8ebdcf39cefb4488ceec3c4476ca04cc2ec25dd955d3fc95c347
BLAKE2b-256 checksum
How to use checksums
881657242aa3636f9054fc3088ba42a1b9f4364657cac5534558ddbf4db70b50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / poetry_plugin_bundle-1.8.0-py3-none-any.whl

Download URL poetry_plugin_bundle-1.8.0-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5f0221bee45726951e391d95a29d65d52af5629856199637cba1f87c9da9e31
BLAKE2b-256 checksum
How to use checksums
5ea611b3823c2e552af3106a4ffa78e27e5fc37f38bdd035049929547a05d2ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.8.0 This release

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page