Skip to main content

A Poetry plugin that makes it possible to use relative package includes. Well suited for monorepos containing projects and shared code.

Project description

Poetry Multiproject Plugin

This is a Python Poetry plugin, adding the build-project command.

The command will make it possible to use relative package includes. This feature is very useful for monorepos and when sharing code between projects.

Usage

Navigate to the project folder (where the pyproject.toml file is).

poetry build-project

Installation

This plugin can be installed according to the official Poetry docs.

How is it different from the "poetry build" command?

Poetry does not allow package includes outside of the project root.

# Note the structure of the shared folder: namespace/package

packages = [
    { include = "my_namespace/my_package", from = "../../shared" }
    { include = "my_namespace/my_other_package", from = "../../shared" }
]

An example Monorepo structure:

projects/
  my_app/
    pyproject.toml (including a shared package)

  my_service/
    pyproject.toml (including other shared packages)

shared/
  my_namespace/
    my_package/
      __init__.py
      code.py

    my_other_package/
      __init__.py
      code.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poetry_multiproject_plugin-1.0.2.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page