Issue2376

classification
Title: Scripts installed through pip are not marked executable
Type: Severity: major
Components: Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: alex.gronholm Nosy List: alex.gronholm, zyasoft
Priority: high Keywords:

Created on 2015-07-06.20:15:58 by alex.gronholm, last changed 2015-08-20.23:32:40 by alex.gronholm.

Messages
msg10140 (view) Author: Alex Grönholm (alex.gronholm) Date: 2015-07-06.20:15:58
Scripts that install to $JYTHON_HOME/bin should be marked executable when they're put there when a distribution is installed by pip. They're not. But easy_install does not have this problem. I suspect this is caused by pip's new behavior of installing everything from wheels.
msg10141 (view) Author: Jim Baker (zyasoft) Date: 2015-07-06.20:41:59
I'm not seeing this behavior, all the scripts I have installed with the bundled 2.7.0 pip wheel are marked as executable, such as

  8 -rwxr-xr-x  1 jbaker  staff     320 May  7 10:28 yolk

It's possible that this is wheel-specific vs not using wheels, but I have 56 scripts installed, all marked executable. Surely some of these are coming from wheels, given the popularity of the format, but I didn't look specifically.

Best to go with your specific example from PyPI to see what's happening, or if this requires running on a specific OS; I'm using OS X 10.10.4
msg10142 (view) Author: Alex Grönholm (alex.gronholm) Date: 2015-07-06.20:54:14
Yes, I forgot to mention that this happens with the latest pip, not the one bundled with Jython. OS is Ubuntu 15.04.
msg10143 (view) Author: Jim Baker (zyasoft) Date: 2015-07-06.20:57:46
OK, sounds like a problem where we need to upstream one or more changes from https://github.com/jythontools/pip - presumably we can find the difference there
msg10145 (view) Author: Alex Grönholm (alex.gronholm) Date: 2015-07-07.00:50:45
I found the culprit:

self.set_mode = (os.name == 'posix')

line 83, _vendor/distlib/script.py

I've located the proper changeset in your pip fork. I'll get this upstreamed.
msg10146 (view) Author: Alex Grönholm (alex.gronholm) Date: 2015-07-07.00:54:42
Hm, I just looked at distlib's source and it seems this has already been fixed upstream, but it hasn't been released yet. I'll bug distlib's author to cut a new release and get it re-vendored to pip.
msg10148 (view) Author: Alex Grönholm (alex.gronholm) Date: 2015-07-08.18:49:10
Ok, there's a new distlib release out now. I'll start bugging pip devs now.
msg10151 (view) Author: Alex Grönholm (alex.gronholm) Date: 2015-07-15.21:14:28
Ok, the new distlib has now been re-vendored into pip. Waiting for a new release.
msg10152 (view) Author: Jim Baker (zyasoft) Date: 2015-07-15.21:26:20
Awesome, thanks for working with the PyPA to make this happen. Looking forward to testing when this vendor update is finalized.
msg10177 (view) Author: Alex Grönholm (alex.gronholm) Date: 2015-08-20.23:32:40
Pip 7.1.1 has been released. I can verify that the problem is gone now.
History
Date User Action Args
2015-08-20 23:32:40alex.gronholmsetstatus: pending -> closed
resolution: fixed
messages: + msg10177
2015-07-15 21:26:20zyasoftsetmessages: + msg10152
2015-07-15 21:14:28alex.gronholmsetmessages: + msg10151
2015-07-08 18:49:11alex.gronholmsetmessages: + msg10148
2015-07-07 00:54:43alex.gronholmsetmessages: + msg10146
2015-07-07 00:50:47alex.gronholmsetstatus: open -> pending
assignee: alex.gronholm
messages: + msg10145
2015-07-06 20:57:46zyasoftsetmessages: + msg10143
2015-07-06 20:54:14alex.gronholmsetmessages: + msg10142
2015-07-06 20:42:00zyasoftsetnosy: + zyasoft
messages: + msg10141
2015-07-06 20:15:58alex.gronholmcreate