- Notifications
You must be signed in to change notification settings - Fork3.1k
Closed
Description
- Pip version: 9.0.1
- Python version: 2.7
- Operating system: Linux (SUSE Tumbleweed)
Description:
If I pip install -e against a git repo with no remotes then pip freeze will error when reporting the version for that package because it claims to not know the repo location.
What I've run:
clark@morbo:~/tmp$ virtualenv testenvNew python executable in /home/clark/tmp/testenv/bin/python2Also creating executable in /home/clark/tmp/testenv/bin/pythonInstalling setuptools, pip, wheel...done.clark@morbo:~/tmp$ testenv/bin/pip --versionpip 9.0.1 from /home/clark/tmp/testenv/lib/python2.7/site-packages (python 2.7)clark@morbo:~/tmp$ testenv/bin/pip install -e git/git-reviewObtaining file:///home/clark/tmp/git/git-reviewCollecting requests>=1.1 (from git-review==1.25.1.dev52) Using cached requests-2.18.4-py2.py3-none-any.whlCollecting idna<2.7,>=2.5 (from requests>=1.1->git-review==1.25.1.dev52) Using cached idna-2.6-py2.py3-none-any.whlCollecting urllib3<1.23,>=1.21.1 (from requests>=1.1->git-review==1.25.1.dev52) Using cached urllib3-1.22-py2.py3-none-any.whlCollecting certifi>=2017.4.17 (from requests>=1.1->git-review==1.25.1.dev52) Using cached certifi-2017.7.27.1-py2.py3-none-any.whlCollecting chardet<3.1.0,>=3.0.2 (from requests>=1.1->git-review==1.25.1.dev52) Using cached chardet-3.0.4-py2.py3-none-any.whlInstalling collected packages: idna, urllib3, certifi, chardet, requests, git-review Running setup.py develop for git-reviewSuccessfully installed certifi-2017.7.27.1 chardet-3.0.4 git-review idna-2.6 requests-2.18.4 urllib3-1.22clark@morbo:~/tmp$ testenv/bin/pip freezeComplete output from command git config --get-regexp remote\..*\.url:----------------------------------------Error when trying to get requirement for VCS system Command "git config --get-regexp remote\..*\.url" failed with error code 1 in /home/clark/tmp/git/git-review, falling back to uneditable formatCould not determine repository location of /home/clark/tmp/git/git-reviewcertifi==2017.7.27.1chardet==3.0.4## !! Could not determine repository locationgit-review==1.25.1.dev52idna==2.6requests==2.18.4urllib3==1.22
What I expect
It is perfectly valid to have a git repo with no remotes. That just means the current repo is canonical. Instead of erroring pip should use the file location as the location of the repo. Something like:
git+file:///path/to/package/repository