Poetry: Support for git refs in poetry add

Created on 29 Jul 2018  路  5Comments  路  Source: python-poetry/poetry

  • [x] 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/[email protected]

Updating dependencies
Resolving dependencies... (0.6s)

[CalledProcessError]
Command '['git', 'clone', 'https://github.com/nornir-automation/[email protected]', '/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!

CLI Feature

Most helpful comment

There seems to be no way to specify the branch in poetry add but still this is somehow supported in pyproject.toml?

All 5 comments

There seems to be no way to specify the branch in poetry add but still this is somehow supported in pyproject.toml?

@agronholm yes it seems there are a number of features which are not supported on the command-line add, I'm personally not clear whether it's by design or just awaiting implementation

Just ran into this. This needs to be documented asap - it's really hard to figure out how to add your github repo fork. Please give it a few minutes and update the docs.

Does git dependency support exist in the current stable release or is it being rewritten?

This has been added in #1221 and is currently available in the latest prereleases of the 1.0.0 version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thejohnfreeman picture thejohnfreeman  路  3Comments

Euphorbium picture Euphorbium  路  3Comments

EdgyEdgemond picture EdgyEdgemond  路  3Comments

mozartilize picture mozartilize  路  3Comments

thmo picture thmo  路  3Comments