[Distutils] Question concerning dist_utils build_clib command

Martin Field martin.field at ibs.fr
Wed Jul 18 14:12:49 CEST 2007


  I'm writing with what is probably a very simple question about
the build_clib command in distutils. My problem is that I have
part of a library that I am building which should be built with no
optimization (O0) instead of the default O2 (with gcc). After
various attempts, I ended up subclassing the "build_clib" class
so that I could pass the "extra_preargs" argument in the call
to "self.compiler.compile" in the class's "build_libraries" method.
Unfortunately, both O2 (the default) and O0 now appear in
the compilation options and the first (O2!) takes precedence
it seems. I wonder if you have come across this problem and
whether you have a solution?

  I would really appreciate any help that you can give me.

  Many thanks.

Best regards,

Martin Field.

More information about the Distutils-SIG mailing list