[Distutils] 'virtualenv -p jython' leaves 'pip' non-executable

Tres Seaver tseaver at palladion.com
Wed Jun 3 19:53:56 CEST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Trying to get 'tox -e jython' to work:

- ---------------------------- %< ----------------------------

$ file `which jython`
/home/tseaver/bin/jython: symbolic link to `/opt/jython-2.7.0/bin/jython'

$ /opt/Python-2.7.9/bin/pip --version
pip 7.0.3 from
/opt/Python-2.7.9/lib/python2.7/site-packages/pip-7.0.3-py2.7.egg (python
2.7)

$ /opt/Python-2.7.9/bin/virtualenv --version
13.0.3

$ /opt/Python-2.7.9/bin/tox --version
2.0.2 imported from
/opt/Python-2.7.9/lib/python2.7/site-packages/tox-2.0.2-py2.7.egg/tox/__init__.pyc

$ git clone git at github.com:zopefoundation/zope.event
Cloning into 'zope.event'...
remote: Counting objects: 531, done.
remote: Total 531 (delta 0), reused 0 (delta 0), pack-reused 531
Receiving objects: 100% (531/531), 84.80 KiB, done.
Resolving deltas: 100% (288/288), done.

$ /opt/Python-2.7.9/bin/tox -e jython
GLOB sdist-make: /tmp/zope.event/setup.py
jython create: /tmp/zope.event/.tox/jython
jython inst: /tmp/zope.event/.tox/dist/zope.event-4.0.4.dev0.zip
ERROR: invocation failed (errno 13), args:
[local('/tmp/zope.event/.tox/jython/bin/pip'), 'install',
'/tmp/zope.event/.tox/dist/zope.event-4.0.4.dev0.zip'], cwd: /tmp/zope.event
Traceback (most recent call last):
  File "/opt/Python-2.7.9/bin/tox", line 9, in <module>
    load_entry_point('tox==2.0.2', 'console_scripts', 'tox')()
...
  File "/opt/Python-2.7.9/lib/python2.7/subprocess.py", line 1335, in
_execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

$ ls -laF .tox/jython/bin
total 64
drwxrwxr-x 2 tseaver tseaver  4096 Jun  3 13:40 ./
drwxrwxr-x 6 tseaver tseaver  4096 Jun  3 13:40 ../
- -rw-rw-r-- 1 tseaver tseaver  2208 Jun  3 13:40 activate
- -rw-rw-r-- 1 tseaver tseaver  1264 Jun  3 13:40 activate.csh
- -rw-rw-r-- 1 tseaver tseaver  2477 Jun  3 13:40 activate.fish
- -rw-rw-r-- 1 tseaver tseaver  1137 Jun  3 13:40 activate_this.py
- -rw-rw-r-- 1 tseaver tseaver   255 Jun  3 13:40 easy_install
- -rw-rw-r-- 1 tseaver tseaver   255 Jun  3 13:40 easy_install-2.7
- -rwxrwxr-x 1 tseaver tseaver 15055 Jun  3 13:40 jython*
- -rw-rw-r-- 1 tseaver tseaver   227 Jun  3 13:40 pip
- -rw-rw-r-- 1 tseaver tseaver   227 Jun  3 13:40 pip2
- -rw-rw-r-- 1 tseaver tseaver   227 Jun  3 13:40 pip2.7
lrwxrwxrwx 1 tseaver tseaver     6 Jun  3 13:40 python -> jython*
lrwxrwxrwx 1 tseaver tseaver     6 Jun  3 13:40 python2 -> jython*
lrwxrwxrwx 1 tseaver tseaver     6 Jun  3 13:40 python2.7 -> jython*
- -rw-rw-r-- 1 tseaver tseaver   234 Jun  3 13:40 wheel
- ---------------------------- %< ----------------------------

If I make the 'pip' script executable, then 'tox -e jython' runs:

- ---------------------------- %< ----------------------------
$ chmod a+x .tox/jython/bin/pip

$ tox -e jython
GLOB sdist-make: /tmp/zope.event/setup.py
jython inst-nodeps: /tmp/zope.event/.tox/dist/zope.event-4.0.4.dev0.zip
jython installed: -f
file:///home/tseaver/.pip/wheels,wheel==0.24.0,zope.event==4.0.4.dev0
jython runtests: PYTHONHASHSEED='441626771'
jython runtests: commands[0] | python setup.py -q test -q
warning: no previously-included files matching '*.dll' found anywhere in
distribution
warning: no previously-included files matching '*.pyc' found anywhere in
distribution
warning: no previously-included files matching '*.pyo' found anywhere in
distribution
warning: no previously-included files matching '*.so' found anywhere in
distribution
warning: no previously-included files matching '*.class' found anywhere
in distribution
..
- ----------------------------------------------------------------------
Ran 2 tests in 0.004s

OK
___________________________________ summary
____________________________________
  jython: commands succeeded
  congratulations :)
- ---------------------------- %< ----------------------------

So, leaving tox out of the picture:

- ---------------------------- %< ----------------------------
$ /opt/Python-2.7.9/bin/virtualenv -p jython foobar
Running virtualenv with interpreter /home/tseaver/bin/jython
Cannot find file /opt/jython-2.7.0/Include (bad symlink)
New jython executable in foobar/bin/jython
Installing setuptools, pip, wheel...done.

$ ll foobar/bin/
total 64
drwxrwxr-x 2 tseaver tseaver  4096 Jun  3 13:46 ./
drwxrwxr-x 5 tseaver tseaver  4096 Jun  3 13:45 ../
- -rw-rw-r-- 1 tseaver tseaver  2192 Jun  3 13:46 activate
- -rw-rw-r-- 1 tseaver tseaver  1248 Jun  3 13:46 activate.csh
- -rw-rw-r-- 1 tseaver tseaver  2461 Jun  3 13:46 activate.fish
- -rw-rw-r-- 1 tseaver tseaver  1137 Jun  3 13:46 activate_this.py
- -rw-rw-r-- 1 tseaver tseaver   239 Jun  3 13:46 easy_install
- -rw-rw-r-- 1 tseaver tseaver   239 Jun  3 13:46 easy_install-2.7
- -rwxrwxr-x 1 tseaver tseaver 15055 Jun  3 13:45 jython*
- -rw-rw-r-- 1 tseaver tseaver   211 Jun  3 13:46 pip
- -rw-rw-r-- 1 tseaver tseaver   211 Jun  3 13:46 pip2
- -rw-rw-r-- 1 tseaver tseaver   211 Jun  3 13:46 pip2.7
lrwxrwxrwx 1 tseaver tseaver     6 Jun  3 13:45 python -> jython*
lrwxrwxrwx 1 tseaver tseaver     6 Jun  3 13:45 python2 -> jython*
lrwxrwxrwx 1 tseaver tseaver     6 Jun  3 13:45 python2.7 -> jython*
- -rw-rw-r-- 1 tseaver tseaver   218 Jun  3 13:46 wheel
- ---------------------------- %< ----------------------------

None of the scripts are being marked as executable.  I don't know whether
this is a virtualenv issue, a jython issue, or a setuptools issue.


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJVbz80AAoJEPKpaDSJE9HYg2EP/2sWlshPGokrrhOZYV/8YgcM
IFNa2JlwKNwPefKtQ7VThrIqYHCTo8UuLC+6mv1JFvXIT50dTubOFeLP2ddR9X1f
Ma5kqwlCs+lf1VhqWbA5BIkg+p3GH+l/CImudJOijxF2Lvlx1sHvIOTZwgU1qYvG
cpMAOW5D9rT34oU7SEf6mIGro8cGVa3nEMsp8optU7iOZTzvgQG1nyYknfBJquca
jwjwBOgrxaZkIaYrCyFWspR8sdPaWs+9S4qR7RsXkCWYHbfjtNKObJB4CPw4VdIV
S0M16pz+znrY3nBggrCFzLAyJQje2E5mwNF1BDMKCrWTbUbdLmpbWMdV0//A68kP
yricqNoH5Juw5PVCl5AiP49mIAvBUWipyD57kUVNP4ndlU23DMiC7/ClqS66HSw/
HCiThu50wVwZ4SYX/YOGmPorQKtmntLbLhGx2Oj1f74YoqVtcrTUbqeFG0MIW2W5
EU8IHy3k9n8hVacP9bm0zipUAX5/AJe+vS8eA+14B9pbU690hLK4pQZ8EYM2Dn87
mT7ii9IKgXUElybMWqR5v1w3kwbj/lRZbFqJ59x2cE0Kar1z5P95Eij6GgRP5sBw
6EdtK/35HVOk5K51Wkd7AWfVawSYRV9NoPxFFNcj3l5MqyQI0ewt85KpuYdeHYv3
w/9dWcP6PNXmDxA2VXA6
=eZat
-----END PGP SIGNATURE-----



More information about the Distutils-SIG mailing list