Message233144
> If the same problem exists in setuptools then it'll need to
> get fixed in setuptools (or pip will need to start writing
> it's own console scripts when installing from sdist too).
Will setuptools eventually switch to using distlib also? Currently setuptools has a different problem. Instead of errnously double quoting the EXE path, it doesn't quote it at all. As you can see in the cdb debugger output below, CreateProcessA is called without properly quoting the path to python.exe (register rdx is the 2nd parameter, lpCommandLine).
C:\>cdb "C:\Program Files\Python27\Scripts\test.exe"
[clip]
0:000> bp kernel32!CreateProcessA
0:000> g
Breakpoint 0 hit
kernel32!CreateProcessA:
00000000`77a4acf0 4c8bdc mov r11,rsp
0:000> db @rdx
00000000`00585c40 43 3a 5c 50 72 6f 67 72-61 6d 20 46 69 6c 65 73 C:\Program Files
00000000`00585c50 5c 50 79 74 68 6f 6e 32-37 5c 70 79 74 68 6f 6e \Python27\python
00000000`00585c60 2e 65 78 65 20 22 43 3a-5c 50 72 6f 67 72 61 6d .exe "C:\Program
00000000`00585c70 20 46 69 6c 65 73 5c 50-79 74 68 6f 6e 32 37 5c Files\Python27\
00000000`00585c80 53 63 72 69 70 74 73 5c-74 65 73 74 2d 73 63 72 Scripts\test-scr
00000000`00585c90 69 70 74 2e 70 79 22 00-00 ab ab ab ab ab ab ab ipt.py".........
00000000`00585ca0 ab ab ab ab ab ab ab ab-ab fe ee fe ee fe ee fe ................
00000000`00585cb0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
So test.exe will actually run C:\program.exe, if it exists. For example:
C:\>type program.c
#include <stdio.h>
int main(int argc, char *argv[])
{
int i;
for (i=0; i < argc; i++)
printf("%s\n", argv[i]);
return 0;
}
C:\>dir /b C:\program.exe
program.exe
C:\>"C:\Program Files\Python27\Scripts\test.exe"
C:\Program
Files\Python27\python.exe
C:\Program Files\Python27\Scripts\test-script.py |
|
Date |
User |
Action |
Args |
2014-12-28 01:13:09 | eryksun | set | recipients:
+ eryksun, tim.golden, zach.ware, steve.dower, dstufft, joshuaellinger |
2014-12-28 01:13:09 | eryksun | set | messageid: <1419729189.22.0.785527243229.issue23121@psf.upfronthosting.co.za> |
2014-12-28 01:13:09 | eryksun | link | issue23121 messages |
2014-12-28 01:13:08 | eryksun | create | |
|