This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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]

[ 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
dependency files.)


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]