Open mflova opened 1 year ago
poetry is already trying to clone submodules - see https://github.com/python-poetry/poetry/blob/2b16b2fcf15da2a69e118a637ab4ee4fcb6a234c/src/poetry/vcs/git/system.py#L21 or https://github.com/python-poetry/poetry/blob/2b16b2fcf15da2a69e118a637ab4ee4fcb6a234c/src/poetry/vcs/git/backend.py#L435, depending on which git client you are using
you'll want to investigate what's going wrong with that
Feature Request
When
poetry
install a dependency from git, let's say:There is no control over the
clone
command that is being applied whenpoetry
clones this repo. Sincepoetry
supports dependencies from different sources (from local folders, from git repos, from pypi...) there is a specific combination that is not working to me.Let's say that we have our main repo
A
. This one depends on a private git repo calledB
. So far, thepyproject.toml
file fromA
would look like:When we do so,
B
will be cloned with no--recursive
flag. At the same time, ifB
depends on any git submodules, let's sayC
, itspyproject.toml
would look like this:However, when we perform
poetry install
onA
repository,poetry
will cloneB
in a non recursive way. ThereforeB
will not be able to install its dependencies as the submoduleC
will be missing.As a solution, I would propose two alternative solutions:
recursive
keyword to those git-based dependenciesgit_args
that would be directly forwarded to thegit clone
command. This could be helpful not also for the recursive problem but also in case the developer wants to control the cloning depth to reduce installation times.