[Distutils] Patches for --compiler option
Lyle Johnson
jlj@cfdrc.com
Fri, 12 May 2000 09:59:15 -0500
> Thanks -- I'll check it in shortly. One problem:
>
> > extra_args.append ('/IMPLIB:' + implib_dir)
> > + self.mkpath (os.path.dirname(implib_dir))
> > # if MSVC
>
> I fixed this bug just before seeing your patch with
>
> self.mkpath(implib_dir)
>
> One of us misunderstands what 'implib_dir' is, and since you're the one
> using Windows, it could well be me. Can you test to see which fix is
> the right one?
The /IMPLIB:name switch to the linker is used to specify the name of an
import library. The variable name "implib_dir" should probably be changed to
"implib_file" because it is the file name of the import library and not a
directory name. Having said that, the correct code snippet is:
implib_file = os.path.join (self.build_temp, \
self.get_ext_libname (extension_name))
extra_args.append ('/IMPLIB:' + implib_file)
self.mkpath (os.path.dirname (implib_file))
I just tested this on two of my projects plus PyXML-0.5.4 and it works
properly.
Lyle