[Distutils] Distutilizing wxPython

Robin Dunn robin@alldunn.com
Sat Oct 7 16:08:02 2000


I'm finally going to the effort to convert to using distutils for wxPython.
So far, so good, I have the core extension module being built for win32.
One problem that I ran into is that the resource compiler needs to have
the -I and -D flags passed to it.  The little patch below did the trick for
me.

One problem/question I have at this point is that the secondary extension
modules need to link with the implib produced when linking the core
extension module.  Is there a way to determine before setup() is called
where that library will be put so I can add that directory to the
library_dirs for the other Extensions?  (For example,
"build/temp.win32-1.5/Release/src/")



Index: msvccompiler.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/msvccompiler.py,v
retrieving revision 1.42
diff -c -r1.42 msvccompiler.py
*** msvccompiler.py     2000/09/27 02:08:14     1.42
--- msvccompiler.py     2000/10/07 20:00:47
***************
*** 313,319 ****
                      input_opt = src
                      output_opt = "/fo" + obj
                      try:
!                         self.spawn ([self.rc] +
                                      [output_opt] + [input_opt])
                      except DistutilsExecError, msg:
                          raise CompileError, msg
--- 313,319 ----
                      input_opt = src
                      output_opt = "/fo" + obj
                      try:
!                         self.spawn ([self.rc] + pp_opts +
                                      [output_opt] + [input_opt])
                      except DistutilsExecError, msg:
                          raise CompileError, msg


--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org     Java give you jitters?
http://wxPROs.com        Relax with wxPython!