Skip to content

Allow to specify the source when adding a package #1886

@k4nar

Description

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

Feature Request

Since Poetry 1.0 we can specify the source of package in the pyproject.toml, in order to use another index than PyPI. This is very convenient, but there is no way to specify this when using the poetry add command.

This is especially inconvenient when you're trying to update an existing private dependency with poetry add, as it will erase its source.

My suggestion would be to add a --source option to poetry add, taking the name of a source defined in the pyproject.toml. I don't think adding a package from a source not defined previously should be accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementations

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions