Skip to content

add possibility to set the pyproject TOML from a custom path when running a command #7039

@DavidVujic

Description

@DavidVujic
  • 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

I think it would be a nice idea to make it possible for a Poetry command (the built-ins or from a plugin) to pass in the path to the actual pyproject.toml file.

Something like:

poetry build --path my_project/in/a/subfolder/pyproject.toml

This would be useful for scenarios when you have more than one project in a repository. With such a feature, you could run build commands from the repo top folder, instead of navigating down the directory structure.

I see two steps here:

  1. make it possible to set the pyproject property of the poetry instance. A command could then do:
self.poetry.pyproject = PyProjectTOML(custom_path)
  1. add a command option. The closest at hand would probably be the build command.

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