Open rambo opened 4 years ago
How did you add the dependency?
poetry
just prefixes the dependency with git+
I'm pretty sure I just added the line
REDACTED = {git = "git@gitlab.com:REDACTED.git"}
manually to pyproject.toml, if I just prefix that with ssh://
then poetry install
itself fails with Command '['git', 'clone', 'ssh://git@gitlab.com:REDACTED', '/var/folders/ym/675v9ms93qs0pl79xm2zsgrr0000gn/T/pypoetry-git-REDACTEDdcrj1q5y']' returned non-zero exit status 128.
Edit: just tried adding the dependency again with poetry add git+ssh://git@gitlab.com:REDACTED.git
and ended up with the exact same dependency line in pyproject.toml
as before.
Right.
If conformance with pip
is something favoured by poetry
, all git urls should be regulated.
I will wait for what the maintainers have to say on this before trying to fix anything.
@SanketDG: We would really appreciate your contribution. So go on :+1:
I would suggest you have a look at https://github.com/python-poetry/poetry/blob/bc9acdbcf9082c311ff2545225e00347acf31fd8/poetry/packages/vcs_dependency.py#L83-L88 to get an idea of how to fix it most probably in https://github.com/python-poetry/poetry/blob/bc9acdbcf9082c311ff2545225e00347acf31fd8/poetry/utils/exporter.py#L73-L83
fin swimmer
@finswimmer The issue is not in the exporter, but rather in add
where the protocol information is lost.
But if the ssh://
(with or without git+
prefix) protocol is added back in manually it doesn't work because the git clone
command poetry generates fails.
@SanketDG: As @rambo said, I guess how ssh://
url's are handled by poetry add
are due to the point, that you can easily copy&paste from github, gitlab etc.
I think fixing the output of poetry export
is enough here.
fin swimmer
I thinks fixing the output of
poetry export
is enough here.
Agreed.
-vvv
option).Issue
After exporting with
poetry export -f requirements.txt --without-hashes -o foo.txt
runningpip install -r foo.txt
gives warnings like the one below from private git dependencies.