I have a python monorepo with many packages managed with Poetry.
The packages reference each-other using editable dependencies, e.g:
poetry add --editable ./my-package/
In some narrow cases, like installing on docker, I want to be able to install those projects while ignoring the editable configuration, meaning all dependencies marked as editable will be installed fully, as if they weren't marked as editable.
Is there a way to get that behavior?
Could Poetry plugins be a way to achieve this? if so, what would that look like?
As for today (version 1.7.1, not sure what version this was added in) the poetry install
command supports a --no-directory
flag that excludes directory packages.
From the command line --help
:
--no-directory
Do not install any directory path dependencies; useful to install dependencies without source code, e.g. for caching of Docker layers)