You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def _search_path(path):
mapping = dict()
for file in os.listdir(path):
# Install from PYPI.
if fnmatch.fnmatch(file, '*-info'):
...
# Install from local and available in GitHub.
elif fnmatch.fnmatch(file, '*-link'):
...
# Check .git dir.
git_path = os.path.join(dev_dir, '.git')
...
return mapping
The git directory checking is sufficient for the best case scenario where the package's code is next to the .git directory. However if your package is part of a bigger git repository, the checking fails because git_path doesn't exist.
One of the potential way of solving this issue would be to write a similar logic to what pip does, a subprocess call to git rev-parse --git-dir. See: this line.
If adding pip to the dependencies is not an issue, using pip._internal.vcs.git.Git directly for the full git logic could be another option.
The text was updated successfully, but these errors were encountered:
In
reqs.py:_search_path
The git directory checking is sufficient for the best case scenario where the package's code is next to the
.git
directory. However if your package is part of a bigger git repository, the checking fails becausegit_path
doesn't exist.One of the potential way of solving this issue would be to write a similar logic to what
pip
does, a subprocess call togit rev-parse --git-dir
. See: this line.If adding
pip
to the dependencies is not an issue, usingpip._internal.vcs.git.Git
directly for the full git logic could be another option.The text was updated successfully, but these errors were encountered: