This is the mail archive of the
mailing list for the Cygwin project.
[OT] Avoiding symlinks when launching cygwin apps from win32 apps [was Re: [1.5][gcc-3.4.4] python-2.5.4 distutils failed to compile c files]
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 08 May 2009 12:43:01 +0100
- Subject: [OT] Avoiding symlinks when launching cygwin apps from win32 apps [was Re: [1.5][gcc-3.4.4] python-2.5.4 distutils failed to compile c files]
- References: <firstname.lastname@example.org>
[ Subject changed, and OT tagged because this is really becoming about windows
command shell programming techniques. ]
Joe Pham wrote:
> Dave Korn writes:
>> What about calling distutils.Ccompiler.set_executables() in your
>> script that invokes distutils?
> I probably could, but I'd have to do that for each and every package that I need to build.
Well, there's always the Windows-way-of-interposing-by-symlink: put a .bat
file in your %PATH% ahead of or even alongside the executable. If you just
invoke "gcc", and there's a "gcc.bat" and a "gcc.exe" (which happens to be a
non-executable symlink, but let that pass for now) both in the same directory
in PATH, the .bat file will win. And can then invoke the actual
(differently-named) exe passing through all the command-line args.
To prevent the .bat from interfering with normal Cygwin operation, I'd
recommend you add an extra (new) directory to the front of your windows PATH
and put the .bat file(s) there, rather than shoving them alongside in /bin.
(Aren't you going to have hideous nightmares in this whole thing anyway when
windows python passes windows-style paths to cygwin gcc? Well, it should
mostly work, but don't expect to get anything useful if you're generating
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html