Repository navigation
How can I specify a dependency as a git repository with branch name in pyproject.toml? #4686
Answered
by
rinarakaki
rinarakaki
asked this question in
Q&A
|
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?). |
Answered by
rinarakaki
Oct 16, 2024
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. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now I've figured out that it works with
pip installwithout 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!