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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poetry_multiproject_plugin-1.0.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file poetry_multiproject_plugin-1.0.2.tar.gz.

File metadata

File hashes

Hashes for poetry_multiproject_plugin-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a348d85dc02e6c56b6cd556a890038d6a8f8f7ac9bf0596d682c391ee355834a
MD5 c8a66922851d8674b26614efba853f35
BLAKE2b-256 8cfcfbcbf80c7ed1c88d1e19630dfdc5e12bfe0622bb126f2e1b45f0878f7763

See more details on using hashes here.

File details

Details for the file poetry_multiproject_plugin-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_multiproject_plugin-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 68cf2821f0b4349c62a77acfa08fae6dc3dd381540e68d7789c5b2031dcfe561
MD5 fdadfc72a8b773cddbcce83919166e67
BLAKE2b-256 b579d921a030e6912f5c743fe409bf2f20a2d2bc32274ef8a333da55f1a255da

See more details on using hashes here.

Supported by

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