
Jergoen brought this thread to my attention via python-dev...
Sent: Tuesday, 22 April 2008 6:18 AM Right now setuptools on Windows x64 with 64-bits Python 2.5 is (partially) broken.
The error shown is:
Cannot find Python executable C:\Python25\python.exe
when running easy_install. The phrase comes from launcher.c which is compiled via MingW to cli.exe and gui.exe. Both of these are present in the setuptools repository and are 32-bits only for all I can determine
FYI, there isn't really a concept of "32-bits only" - 32bit programs will run on 64bit windows just fine, as you are seeing - but yes, the fact they are 32bit is probably relevant.
(using file). I have not thoroughly checked it yet (due to being written in Unix-C, even though it's aimed at Windows), but my guess is it's using some API calls which fail on 64-bits Windows. I see there's a mingw-64 toolkit on the 'net nowadays. Has anyone tried this yet? Is it indeed an API issue?
I suspect that the issue is that a 32bit cli.exe or gui.exe is attempting to LoadLibrary a 64bit executable and failing (specifically, loadable_exe() in launcher.c) The bdist_wininst command in distutils recently faced a similar problem. The solution (which IIRC was part of http://bugs.python.org/issue2513) was to have 64bit specific executables and to use them when appropriate (and bdist_wininst also supported cross-compilation so you can generate the 64bit executables on a 32bit platform, and although quite simple, it isn't a requirement). As mentioned on the python-dev thread, you will also want to modify setuptools to use the result of distutils.util.get_platform() in the generated filenames, and it's also likely you will need to modify other parts of setuptools to use that platform name when looking for dependencies etc. Looking at the recent history of bdist_wininst.py should offer more clues. My experience with setuptools is very limited so I hope I haven't missed the point... Cheers, Mark