Skip to content

Support for git refs in poetry add #357

@dmfigol

Description

@dmfigol
  • I have searched the issues of this repo and believe that this is not a duplicate.

Hi!
Thanks for the tool. Migrating from pipenv to poetry.
It would be great to see git refs support in poetry add. Every so often I install packages from Git branches/pull requests. Currently this syntax does not work:

-> % poetry add nornir --git https://github.com/nornir-automation/nornir.git@2.0

Updating dependencies
Resolving dependencies... (0.6s)

[CalledProcessError]
Command '['git', 'clone', 'https://github.com/nornir-automation/nornir.git@2.0', '/var/folders/js/jzwkkbb53nd7ns_53g069nlr0000gn/T/pyp
oetry-git-norniryq5f776b']' returned non-zero exit status 128.

add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...

I have to add it manually in pyproject.toml, but I would love to avoid that:

[tool.poetry.dependencies]
python = "*"
nornir = { git = "https://github.com/nornir-automation/nornir.git", branch = "2.0" }

I don't exclude that requested functionality is already available, but I could find it in the docs.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliRelated to the command linekind/featureFeature requests/implementations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions