Skip to main content

A Poetry plugin that makes it possible to build projects with custom TOML files.

Project description

Poetry Multiproject Plugin

This is a Poetry plugin that will make it possible to build projects using custom TOML files.

This is especially useful when structuring code in a Monorepo, containing several projects.

When installed, there will be a new command available: build-project.

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

As I understand it, Poetry doesn't allow to reference code that is outside of the project root.

Something like:

packages = [{ include = "../../../my-package" }]

As an alternative to have a pyproject.toml file in a subfolder, this plugin supports a Monorepo file structure like this:

my-app/
   app.py

my-service/
   app.py

my-package/
   __init__.py
   my_package.py

my-other-package/
   __init__.py
   my_other_package.py

pyproject.toml
my-app.toml
my-service.toml
...

The different TOML files can include different local dependencies. Let's say that my-app imports my-package, and my-service imports my-package only.

my-app and my-service can be built separately and include the local packages needed. By being placed at the workspace root, will not cause any issues with relative paths.

Usage

This plugin depends on a preview of Poetry with functionality for adding custom Plugins. Have a look at the official Poetry preview docs for how to install it.

Install the plugin according to the official Poetry docs.

When installed, there will be a new command available: build-project.

This command will build your project, just like the poetry build command, but with a custom project TOML file.

poetry build-project --t myproject.toml

(use --t or --toml to specify your custom TOML file to use)

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-0.1.2.tar.gz (3.9 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-0.1.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file poetry-multiproject-plugin-0.1.2.tar.gz.

File metadata

  • Download URL: poetry-multiproject-plugin-0.1.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for poetry-multiproject-plugin-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1ffb03e59623fd9b3b121693e5fffeba2dc3c172ba02d2e15a21f4e70eb2efcf
MD5 e2a6f698a02731fe12ae81a140263db7
BLAKE2b-256 4ba9749bc28532b887fd6ff7bcd191fd4af30269deac0e5f692bb3192e944d50

See more details on using hashes here.

File details

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

File metadata

  • Download URL: poetry_multiproject_plugin-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for poetry_multiproject_plugin-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7d70bbcf7bca739744a8390a28059f64fa7ebf7f3d84fe9425f2646d4cbb18cd
MD5 93f8b2521f3bd4879a37c6c420c27d4a
BLAKE2b-256 9ce7a271b6ebdf7e6045f7317fe75eccf87965e467fdf257f00c4e98926b5a20

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