question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install -e inconsistent checkout with git url and branch

See original GitHub issue

Hi,

The way pip install -e works is inconsistent when you specify the branch name in a git url.

Look at the following behaviours :

Specifying a branch, example master on pip source repository:

$ pip install -e git+https://github.com/pypa/pip.git@master#egg=pip
$ cd src/pip/
$ git status
HEAD detached at 08ebc0a
nothing to commit, working directory clean

Specifying a branch again, develop from the same repo this time :

$ pip install -e git+https://github.com/pypa/pip.git@develop#egg=pip
$ cd src/pip/
$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working directory clean

I would not expect to have 2 different states for the same command, depending on the branch I specified is the default one or not. Because I specified it in both cases, this should behave in the same way. Any further work with this editable installation becomes dependant on whether I am in the first case, or the second one.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:18 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
cjerdonekcommented, Jul 25, 2018

Hi, if people don’t mind I’m going to assign myself to this issue as it’s something I’ve had my eye on for a while and had put a fair amount of thought into. Also, the refactoring I had been wanting to do before working on this issue (and that I mentioned above) is now pretty much done. (Thank you, @pradyunsg and @xavfernandez for the reviews!)

The main prerequisite to this issue is PR #5623, which I’m still waiting for a review on. The new resolve_revision() method that PR adds will be very useful in addressing this issue.

For this issue, I was planning to address just the fetch_new() (aka “clone”) case as it’s simpler than the update() case and can be addressed separately. The update() case can be addressed in a later PR.

0reactions
uranusjrcommented, Mar 30, 2020

Thanks @deveshks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why #egg=foo when pip-installing from git repo
When installing via git or other VCS urls, you will want to find the tag or hash of the version you need. For...
Read more >
Installing (1.x)
pip install -e 'git+https://github.com/fabric/fabric@v1#egg=fabric'. Or cloning the Git repository and running: $ git checkout v1 $ pip install -e .
Read more >
Troubleshoot pipeline runs - Azure DevOps
My pipeline is failing on a checkout step. If you are using a checkout step on an Azure Repos Git repository in your...
Read more >
User Guide - pip documentation v22.3.1
When installing packages from PyPI, pip requires internet access, which in many corporate environments requires an outbound HTTP proxy server. pip can be ......
Read more >
Installing Ansible
Installing devel from GitHub with pip. Installing devel from GitHub by cloning. Running the devel branch from a clone. Confirming your installation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found