-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The git+file requirement format doesn't seem to work the way documentation says it does #12124
Comments
Can you also check if |
Oh it probably will not, this is basically #10098, unfortunately not fixable until we finish a bunch of deprecations. |
Duplicate of #10098 |
Thanks. Good to know it's a known issue. I would appreciate if it's not given as an example in the documentation: https://pip.pypa.io/en/stable/topics/vcs-support/#git
|
A pull request to temporarily remove the example would be appreciated. (Note the temporary part, we need to make sure to add it back when the issue is resolved) |
In fact, rather than removing it (it's hard to see how to do that in a way that will prompt us to restore it when the underlying issue is fixed...) maybe just add a warning that this example is currently incorrect due to a bug - with a link to the discussion here? |
I'm cooking up a PR |
It does not currently work. See pypa#12124.
Pull request here: #12125 |
It does not currently work. See pypa#12124.
Description
I'm trying to include a dependency in my requirements.txt file which would get my local git repository. I'm using the package @ git+file:// format, as shown here:
https://pip.pypa.io/en/stable/topics/vcs-support/
The git documentation shows the same file:// format: https://git-scm.com/docs/git-clone#_git_urls
But when I use the format
my_package @ git+file:///home/path_to_package/my_package/
I get the following error:
I can get it to install if I use the following format:
my_package @ git+file://dummy_host/home/path_to_package/my_package/
It seems that the host element of the file URI scheme is required, which is not what the documentation says.
Expected behavior
That the git+file URI scheme works as explained in these documents:
https://pip.pypa.io/en/stable/topics/vcs-support/
https://git-scm.com/docs/git-clone#_git_urls
I.e.
my_package @ git+file:///home/path_to_package/my_package/
in requirements.txt and running
pip install -r requirements.txt
installsmy_package
without errors.pip version
pip 23.1.2
Python version
Python 3.11.3
OS
Ubuntu 20.04.6 LTS
How to Reproduce
/home/path_to_package/my_package/
echo "my_package @ git+file:///home/path_to_package/my_package/" > requirements.txt
pip install -r requirements.txt
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: