-e documentation #1589

Closed
evildmp opened this Issue Feb 23, 2014 · 10 comments

Projects

None yet

4 participants

@evildmp

http://pip.readthedocs.org/en/latest/reference/pip_install.html#editable-installs

$ pip install -e git+http://repo/my_project.git#egg=SomeProject

I haven't been able to reproduce this myself, but the reliable @MarkusH2010 notes that it has affected him: apparently, some users (bash 4.2.045 on Arch Linux) will find that their shell interprets #egg=SomeProject as a comment. The solution is to use quotes around git+http://repo/my_project.git#egg=SomeProject.

Also, the @<some-reference> option is not mentioned in this section, though it is in the examples later in the same page: http://pip.readthedocs.org/en/latest/reference/pip_install.html#examples

Would you like a patch addressing the docs for both these issues?

@Ivoz
Python Packaging Authority member

Would love to know how to reproduce -

(tmp-5bb0cabd01dac58)ivo@ivosung tmp-5bb0cabd01dac58$ cat /etc/arch-release 
Arch Linux release
(tmp-5bb0cabd01dac58)ivo@ivosung tmp-5bb0cabd01dac58$ bash --version
GNU bash, version 4.2.45(2)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
(tmp-5bb0cabd01dac58)ivo@ivosung tmp-5bb0cabd01dac58$ pip -V
pip 1.5.2 from /home/ivo/.virtualenvs/tmp-5bb0cabd01dac58/lib/python2.7/site-packages (python 2.7)
(tmp-5bb0cabd01dac58)ivo@ivosung tmp-5bb0cabd01dac58$ uname -a
Linux ivosung 3.12.9-2-ARCH #1 SMP PREEMPT Fri Jan 31 10:22:54 CET 2014 x86_64 GNU/Linux
(tmp-5bb0cabd01dac58)ivo@ivosung tmp-5bb0cabd01dac58$ pip install -e git+https://github.com/Ivoz/calldules.git#egg=calldules
Obtaining calldules from git+https://github.com/Ivoz/calldules.git#egg=calldules
  Updating ./src/calldules clone
  Running setup.py (path:/home/ivo/.virtualenvs/tmp-5bb0cabd01dac58/src/calldules/setup.py) egg_info for package calldules

  Installing extra requirements: 'egg'
Installing collected packages: calldules
  Running setup.py develop for calldules

    Creating /home/ivo/.virtualenvs/tmp-5bb0cabd01dac58/lib/python2.7/site-packages/calldules.egg-link (link to .)
    Adding calldules 1.0 to easy-install.pth file

    Installed /home/ivo/.virtualenvs/tmp-5bb0cabd01dac58/src/calldules
Successfully installed calldules
Cleaning up...
(tmp-5bb0cabd01dac58)ivo@ivosung tmp-5bb0cabd01dac58$ pip list
calldules (1.0, /home/ivo/.virtualenvs/tmp-5bb0cabd01dac58/src/calldules)
pip (1.5.2)
setuptools (2.1)
wsgiref (0.1.2)
@qwcode

the @ option is not mentioned in this section

it is covered in the "VCS Support" section, since it only relates to VCS urls.
http://pip.readthedocs.org/en/latest/reference/pip_install.html#vcs-support

their shell interprets #egg=SomeProject as a comment

never heard of that. if you can give us a way to reproduce, then I'll add a note to the docs.

@evildmp
@qwcode

or pointing back to the VCS section

sure, a link makes sense.

@MarkusH

Hey, looks like there is some strange stuff happening on one of my systems:

$ pip install -e git+https://github.com/django/django.git#egg=Django
--editable=git+https://github.com/django/django.git is not the right format; it must have #egg=Package

Apparently, on another system, Arch too, this works just fine :-/

From what the bash docs say, a single line inline comment requires at least one space before the # character. Which eventually make the above behavior theoretically impossible :-/

@Ivoz
Python Packaging Authority member

I'd suggest trying bash without any config, e.g bash --noprofile --norc, or sh or zsh. It might be something from your own configuration.

@MarkusH

@Ivoz Yeah, apparently bash --noprofile --norc worked. Guess I have to dig through my settings :-/ Thanks.

@qwcode qwcode pushed a commit that closed this issue Mar 4, 2014
@evildmp evildmp fixes #1589 459f026
@qwcode qwcode closed this in 459f026 Mar 4, 2014
@evildmp

I'm with a colleague, and we've just seen the issue that @MarkusH2010 reported, that pip install -e git+https://github.com/evildmp/Arkestra.git@develop#egg=Arkestra won't work unless quotes are used around the git+https://github.com/evildmp/Arkestra.git@develop#egg=Arkestra part.

He's using Mac OS 10.9.2, with zsh.

(arkestra)➜  Arkestra-develop  pip install -e git+https://github.com/evildmp/Arkestra.git@develop#egg=Arkestra
zsh: no matches found: git+https://github.com/evildmp/Arkestra.git@develop#egg=Arkestra
@Ivoz
Python Packaging Authority member

It worked for my zsh:

 ivo·ivosung ~ » mktmpenv 
Running virtualenv with interpreter /usr/bin/python2
New python executable in tmp-4c76f1f0625c287/bin/python2
Also creating executable in tmp-4c76f1f0625c287/bin/python
Installing setuptools, pip...done.
This is a temporary environment. It will be deleted when you run 'deactivate'.
 tmp-4c76f1f0625c287 ivo·ivosung ~/.virtualenvs/tmp-4c76f1f0625c287 » zsh
ivosung% pwd
/home/ivo/.virtualenvs/tmp-4c76f1f0625c287
ivosung% ls  
bin  include  lib  README.tmpenv
ivosung% ./bin/pip install -e git+https://github.com/evildmp/Arkestra.git@develop#egg=Arkestra
Obtaining Arkestra from git+https://github.com/evildmp/Arkestra.git@develop#egg=Arkestra
  Cloning https://github.com/evildmp/Arkestra.git (to develop) to ./src/arkestra
^CCleaning up...
Operation cancelled by user
Storing debug log for failure in /home/ivo/.pip/pip.log
ivosung% zsh --version
zsh 5.0.5 (x86_64-unknown-linux-gnu)
@Ivoz
Python Packaging Authority member

It might be because you have the zsh optionsetopt extendedglob set, which treats # as a character to do extended globbing of stuff.

Try it with unsetopt extendedglob; otherwise you'll need to quote it the string.

http://travisjeffery.com/b/2012/01/zshs-extended-glob-and-octopresss-new-post-script/

EXTENDED_GLOB
Treat the ‘#’, ‘~’ and ‘^’ characters as part of patterns for filename generation, etc. (An initial unquoted ‘~’ always produces named directory expansion.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment