Skip to content

Add support for project-specific "default"/"self" configuration #8083

@BEllis

Description

@BEllis
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

As a developer, I am wanting to have some poetry plugins loaded only for certain projects I have on my development machine and may also want to change other poetry settings between projects (i.e. do or don't create virtual environments).

I propose that poetry will look for a .poetry directory in the current working directory, if present, it will use this over the default system config location. I'd expect POETRY_CONFIG_PATH env var to take precedence over the .poetry

It could be initialized by running a new init self command, something like

poetry self init

Running this command would create a .poetry directory in the current working directory and generate the necessary default files (config.toml, pyproject.toml, poetry.lock)

This would enable me as a developer to do the following,

poetry self init
poetry self add my-poetry-plugin

and by including the .poetry directory in git, it would mean the dependency/usage of a poetry plugin would be automatically picked up by other developers (though they would probably still need to run poetry self install, not sure if this can happen implicitly elsewhere TBD)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementationsstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions