-e git://remote.repo/project/project.git@branch@egg=project
which works great on its own, but when you throw virutalenv in the mix this is where things get a little crazy.
I have my virtualenvs, using virtualenvwrapper, stored in my home in a hidden directory.
~/.virtualenvs
where the project's virtual env would be
~/.virtualenvs/project
and in the virtual env there is a 'src' directory
~/.virutalenvs/project/src
The problem is when I make some changes to a package that my project depends upon, using pip I remove the old version of the package
pip uninstall old_package
and then using pip I install the updated package from Gitorious
pip -e git://remote.repo/package/package.git@branch@egg=package
I get an error stating
You are not currently on a branch, so I cannot use any
'branch
Please specify whcih remote branch you want to use on the command
line and try again (e.g. 'git pull
See git-pull(1) for details.
Complete output from command /usr/bin/git pull -q:
!? This had me running in circles for a couple ours until I realized two things, one if the egg is exploded in 'site-packages' the command 'pip uninstall package' does not remove this exploded directory, two virtualenv stores a full copy of the package source in
~/.virutalenvs/project/src/package
Removing the source code in both of these location allows me to use
pip -e git://remote.repo/package/package.git@branch@egg=package
without the error and all is good with the world. I'm just not sure where the bug is, and haven't filed a ticket yet to get the problem fixed. I'm not sure if the problem is with pip, virtualenv, virtualenvwrapper or our work flow and source control. I just hope this post helps some other folks.
I was havign this issue, but I fixed it by updating to pip 1.0.2
ReplyDeleteI've changed jobs since this post and I can't remember what version of pip was on my old work machine. My new job doesn't use the same workflow, actually new job migrated from Subversion to Perforce... 8-S
ReplyDeleteIt's good to know that the problem has been addressed, thanks!