How can I specify a dependency as a git repository with branch name in pyproject.toml? #4686
-
You can do this with poetry with this schema: [tool.poetry.dependencies]
some-package = { git = "https://github.com/some/repository.git", branch = "next" } I tried this syntax below but it didn't work: dependencies = [
"some-package@git+https://github.com/some/repository.git@next",
# or
"some-package@git+https://github.com/some/repository.git#egg=next",
] Can anyone please tell me how to do it correctly? Sorry, but not sure if I'm posting on a right project (https://github.com/pypa/pip or other project is more appropriete?). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Last time I tried that it worked, maybe if you remove the dependencies = [
"some-package @ git+https://github.com/some/repository@next"
] But yeah, The only thing we can advise is that the syntax of the dependency specifier should follow this spec: https://peps.python.org/pep-0440/#direct-references. |
Beta Was this translation helpful? Give feedback.
Now I've figured out that it works with
pip install
without the modification of the format:pip install -e .
but didn't work with with/without the changes you suggested to me, because I was using
setup.py install
:I didn't know that those two install commands treats the same dependency string in different ways.
Thank you anyway for the reply and the referrence!