question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding github dependency

See original GitHub issue

In the docs (https://poetry.eustace.io/docs/cli/#add) I see that you can add git dependency but when I tried this I got an error.

I’ve run this command poetry add --git https://github.com/karantan/ansible@v2.6.0.1 ansible and I got the following error:

Updating dependencies
Resolving dependencies... (47.5s)
                                                                                                                                                 
[CalledProcessError]                                                                                                              
Command '['git', '--git-dir', '/var/folders/fk/39r4_x312jnb1qz_pv27jg280000gn/T/pypoetry-git-ansibletxy4by9n/.git', '--work-tree', '/var/fold  
ers/fk/39r4_x312jnb1qz_pv27jg280000gn/T/pypoetry-git-ansibletxy4by9n', 'checkout', 'master']' returned non-zero exit status 1.                 
                                                                                                                                                 
add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...

So how can I install my ansible package that is tagged with v2.6.0.1?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

70reactions
narimancommented, Oct 25, 2018

Seems like the syntax is actually supposed to be poetry add ansible --git https://github.com/karantan/ansible.

There no difference.

Im still trying to figure out how to specify the tag or a sha.

Unfortunately, there’s no way to do it via CLI, but you can manually add an entry into your pyproject.toml like this:

[tool.poetry.dependencies]
python = "^3.6"
ansible = { git = "https://github.com/ansible/ansible.git", branch = "devel" }
# or
ansible = { git = "https://github.com/ansible/ansible.git", tag = "v2.6.6" }
# or
ansible = { git = "https://github.com/ansible/ansible.git", rev = "e5664c4" }

It should work.

67reactions
sdispatercommented, Jul 13, 2019

The add command will be improved in the next 1.0.0 release (see https://github.com/sdispater/poetry/pull/1221). For instance, to use the original example, it will now be possible with the following syntax:

poetry add git+https://github.com/karantan/ansible.git@v2.6.0.1
Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I have linked dependencies in a git repo?
You can do this with submodules in git. In your repository, do: git submodule add path_to_repo path_where_you_want_it.
Read more >
GitHub dependencies
A dependency manager for .NET with support for NuGet packages and git repositories.
Read more >
Git and Project Dependencies | Atlassian Git Tutorial
Dependencies are an important aspect of software development. Allows you to manage the versions of other libraries used by your code. Read and...
Read more >
Adding package dependencies to your app - Apple Developer
Add a package dependency. To add a package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and...
Read more >
Secure at every step: How GitHub's dependency graph is ...
GitHub's dependency graph identifies all upstream dependencies and public downstream dependents of a repository or package by parsing manifest ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found