mingw?

I'm trying to figure out if I can use mingw to rebuild wxPython from
source, on Win2k with Python 2.2 from python.org.

This page seems to indicate that it's possible:
  http://sebsauvage.net/python/mingw.html

But an earlier post about mingw on this list leaves me in doubt:
  http://aspn.activestate.com/ASPN/Mail/Message/1581946

Ultimately my goal is to rebuild a smaller wxPython sans certain classes
like wxFTP, wxDb*, etc. Possibly even having a little Python util to
help out:
  C:> stripwx.py wxFTP "wxDb*"

And then distribute my app as a "normal windows app".

Should I go with VC++ or mingw? If mingw, do I need to rebuild Python as
well? Most importantly, who has actually done this? :slight_smile:

···

--
Chuck
http://ChuckEsterbrook.com

Chuck Esterbrook wrote:

I'm trying to figure out if I can use mingw to rebuild wxPython from source, on Win2k with Python 2.2 from python.org.

This page seems to indicate that it's possible:
  sebsauvage.net : Writing C/C++ Python extensions without Microsoft Visual C++

But an earlier post about mingw on this list leaves me in doubt:
  ActiveState Community - Boosting coder and team productivity with ready-to-use open source languages and tools.

I tried it in the past, but building the wxWindows DLL was terribly slow compileing, and crapped out during the link with an out of virtual memory error. IIRC that box had 256M RAM, but was running win98 so it didn't use it too effectivly...

In theory it should work. (I'd like to live in Theory, it sounds like a nice place! :wink: ) You just need to ensure that all the C++ parts (wxWindows, wxPython and any add-ons) are built with the same compiler. wxPython's setup.py will also need some tweaking in order for it to work as currenlty it is assuming VC++ flags and such.

Ultimately my goal is to rebuild a smaller wxPython sans certain classes like wxFTP, wxDb*, etc. Possibly even having a little Python util to help out:
  C:> stripwx.py wxFTP "wxDb*"

And then distribute my app as a "normal windows app".

Should I go with VC++ or mingw?

If you can get mingw32 to work there is probably no reason not to use it, other than VC++ producing slightly smaller and faster optimized code on average, from what I hear.

If mingw, do I need to rebuild Python as well?

I don't think so. There is a web page somewhere about making extensions with mingw32 that work with the stock Python.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Here's a link <http://starship.python.net/crew/kernr/mingw32/Notes.html&gt; that deals with using mingw to compile DLLs for Python. It can be done. I wrote a couple of DLLs that allowed me to talk to USB 1.1 using this technique. Unfortunately this one's from 1999. I had a newer link somewhere, but have since lost it. I'll update you all if I can find it again.

                                 DDay

Chuck Esterbrook wrote:

I'm trying to figure out if I can use mingw to rebuild wxPython from source, on Win2k with Python 2.2 from python.org.
This page seems to indicate that it's possible:
  sebsauvage.net : Writing C/C++ Python extensions without Microsoft Visual C++
But an earlier post about mingw on this list leaves me in doubt:
  ActiveState Community - Boosting coder and team productivity with ready-to-use open source languages and tools.

I tried it in the past, but building the wxWindows DLL was terribly slow compileing, and crapped out during the link with an out of virtual memory error. IIRC that box had 256M RAM, but was running win98 so it didn't use it too effectivly...

In theory it should work. (I'd like to live in Theory, it sounds like a nice place! :wink: ) You just need to ensure that all the C++ parts (wxWindows, wxPython and any add-ons) are built with the same compiler. wxPython's setup.py will also need some tweaking in order for it to work as currenlty it is assuming VC++ flags and such.

Ultimately my goal is to rebuild a smaller wxPython sans certain classes like wxFTP, wxDb*, etc. Possibly even having a little Python util to help out:
  C:> stripwx.py wxFTP "wxDb*"
And then distribute my app as a "normal windows app".
Should I go with VC++ or mingw?

If you can get mingw32 to work there is probably no reason not to use it, other than VC++ producing slightly smaller and faster optimized code on average, from what I hear.

If mingw, do I need to rebuild Python as well?

I don't think so. There is a web page somewhere about making extensions with mingw32 that work with the stock Python.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

David Day
Oasis Semiconductor, Inc.
201 Jones Road
Waltham MA 02451
dday@oasissemi.com

Tel: 781/647-5925
Fax: 781/894-4179

···

At 04:26 PM 5/5/2003 -0700, you wrote:

Hmm - certainly a nice approach. One - maybe stupid - question though.
Why are you so concerned about size ? Will the application be downloaded ?
I just packed an application using wxPython and Twisted. The resulting self
extracting installer (including a installation wizard ala installshield) was
only 5mb. That includes everything to actually run the software.
Is it actually worth the effort (and time) spent just to reduce that to maybe
25% less ?

Just a thought. No critics. I concur with the notion of only packing what you
need and not do it like i.e. MS Word where I have the impression they copied
the whole development tree on the cd, just to not miss a file :slight_smile:

  UC

···

On Monday 05 May 2003 02:51 pm, Chuck Esterbrook wrote:

I'm trying to figure out if I can use mingw to rebuild wxPython from
source, on Win2k with Python 2.2 from python.org.

This page seems to indicate that it's possible:
  sebsauvage.net : Writing C/C++ Python extensions without Microsoft Visual C++

But an earlier post about mingw on this list leaves me in doubt:
  ActiveState Community - Boosting coder and team productivity with ready-to-use open source languages and tools.

Ultimately my goal is to rebuild a smaller wxPython sans certain classes
like wxFTP, wxDb*, etc. Possibly even having a little Python util to
help out:
  C:> stripwx.py wxFTP "wxDb*"

And then distribute my app as a "normal windows app".

Should I go with VC++ or mingw? If mingw, do I need to rebuild Python as
well? Most importantly, who has actually done this? :slight_smile:

--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417

Hmm - certainly a nice approach. One - maybe stupid - question
though. Why are you so concerned about size ? Will the application be
downloaded ? I just packed an application using wxPython and Twisted.
The resulting self extracting installer (including a installation
wizard ala installshield) was only 5mb. That includes everything to
actually run the software. Is it actually worth the effort (and time)
spent just to reduce that to maybe 25% less ?

For shareware, yes. Plenty of shareware apps with lots of functionality
clock in at less than 2.5 MB. Having a program that is twice as large
will be a disadvantage.

And I'm hoping that I can cut it down to something more like 50%. :slight_smile:

Just a thought. No critics. I concur with the notion of only packing
what you need and not do it like i.e. MS Word where I have the
impression they copied the whole development tree on the cd, just to
not miss a file :slight_smile:

Understood.

···

On Monday 05 May 2003 06:07 pm, Uwe C. Schroeder wrote:

--
Chuck
http://ChuckEsterbrook.com