Registry / devops / poetry-multiproject-plugin

poetry-multiproject-plugin

JSON →
library1.8.4pypypiunverified

A Poetry plugin that enables using relative package includes in multi-project monorepos. It allows a Poetry project to include packages from sibling directories as if they were part of the same project, with support for Poetry v2 and PEP 621. Version 1.8.4 is the latest supporting Python >=3.8,<4.0, under active development with regular releases.

poetry self add poetry-multiproject-plugin
INSTALL
IMPORT
SIG · POETRY-MULTIPROJEC
P
poetry-multiproject-plugin
devopspythonv1.8.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Minimal setup to use the plugin; requires manual pyproject.toml configuration.

# Ensure the plugin is installed: # poetry self add poetry-multiproject-plugin # In your pyproject.toml, add: # [tool.poetry.plugins.poetry] # multiproject-plugin = "poetry_multiproject_plugin.plugin" # Then use relative includes in pyproject.toml: # [tool.poetry] # packages = [ # { include = "../shared_lib", from = ".." }, # ] # Build the project with: # poetry build-project import subprocess import os # Example: run the build command (ensure plugin is configured) subprocess.run(['poetry', 'build-project'], cwd=os.path.dirname(os.path.abspath(__file__)))
Debug
Known issues
breakingPoetry v2 changes: The plugin v1.8.0+ adds support for Poetry v2, but older versions (pre-1.8.0) are incompatible with Poetry v2. Ensure you have at least v1.8.0 if using Poetry 2.
fix
Update plugin to >=1.8.0: poetry self add poetry-multiproject-plugin@latest
affects: >=1.0.0, <1.8.0
breakingPEP 621 support requires v1.8.1+: If your pyproject.toml uses [project] instead of [tool.poetry], you need plugin >=1.8.1. Older versions will fail to parse.
fix
Update to >=1.8.1: poetry self add poetry-multiproject-plugin@latest
affects: <1.8.1
gotchaRelative includes must be listed explicitly in pyproject.toml: The plugin only processes packages declared under [tool.poetry.packages] (or [project] in PEP 621). It does not automatically discover sibling packages.
fix
Explicitly declare each relative package include in your pyproject.toml under 'packages'.
affects: all
gotchaNamespace packages: Use --with-top-namespace to handle top-level namespace imports. If you have a namespace package like 'namespace.submodule', you may need that flag to avoid import aliases with missing module names.
fix
Add the option to build command: poetry build-project --with-top-namespace
affects: >=1.0.0
Errors
Common errors & fixes
AttributeError: 'NoneType' object has no attribute 'group'
The plugin version <1.8.4 fails when importing a module without 'from' (e.g., 'import module') when using --with-top-namespace.
fix
Upgrade to poetry-multiproject-plugin>=1.8.4.
ModuleNotFoundError for relative includes
The relative package is not declared in pyproject.toml under 'packages'.
fix
Add the relative path to [tool.poetry.packages] or [project.urls]? Actually, ensure packages = [{ include = "../shared_lib", from = ".." }] in pyproject.toml.
Poetry command not found: build-project
The plugin is not installed or Poetry's plugin system is not detecting it.
fix
Install using 'poetry self add poetry-multiproject-plugin' and verify with 'poetry plugin show'.
Upgrade
Version history
1.8.4latest on PyPI · released Aug 2, 2025
Audit
Dependencies
poetryrequiredCore dependency; the plugin runs as a Poetry plugin.
Agent activity
6 hits · last 30 days
node
6
Resources
poetry-multiproject-plugin — pip install poetry-multiproject-plugin · libregistry