Skip to content
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

Pip does unnecessary git clone for github dependencies #4996

Closed
gukoff opened this issue Jan 25, 2018 · 5 comments
Closed

Pip does unnecessary git clone for github dependencies #4996

gukoff opened this issue Jan 25, 2018 · 5 comments
Labels
auto-locked Outdated issues that have been locked by automation C: vcs pip's interaction with version control systems like git, svn and bzr type: enhancement Improvements to functionality

Comments

@gukoff
Copy link

gukoff commented Jan 25, 2018

  • Pip version: 9.0.1
  • Python version: 2.7.14
  • Operating system: OSX

Description:

Pip installs github dependencies through git clone. Cloning takes a long time for large projects. For example, the clone part of this command is ~2 minutes:

pip install --no-cache-dir git+https://github.com/django/[email protected]

At the same time, one can download source files via a magic link in seconds flat: https://github.com/django/django/archive/2.0.1.tar.gz. This works for tags, commits and branches. And in case link stops working one can easily fallback to git clone.

Can we make use of this?

@pradyunsg pradyunsg added type: enhancement Improvements to functionality C: vcs pip's interaction with version control systems like git, svn and bzr labels Jan 25, 2018
@pradyunsg
Copy link
Member

It's mostly that currently, there are tools that rely on the fact that pip clones the entire repository. We don't want to break those tools since many projects depend on them and they depend on having the entire history of the project. For more on this discussion, you'd want to look at #2432.

@pradyunsg pradyunsg added the S: awaiting response Waiting for a response/more information label Jan 26, 2018
@ghost
Copy link

ghost commented Jan 26, 2018

Also, this specific optimization has no benefit vs. git clone --depth=1.

@cjerdonek
Copy link
Member

Can we make use of this?

You can. You just have to specify this behavior, e.g.:

$ pip install https://github.com/django/django/archive/2.0.1.tar.gz

@pradyunsg
Copy link
Member

Closing as a duplicate of #2432.

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: vcs pip's interaction with version control systems like git, svn and bzr type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

3 participants