Python extensions on Win32

Discussion in 'Python' started by Cliff Wells, Sep 26, 2006.

  1. Cliff Wells

    Cliff Wells Guest

    For various sundry reasons, I find myself needing to deliver a
    Windows-based Python app. I also chose Python 2.5 for this platform.

    The app has several requirements, all of which are available for Python
    2.5/Win32 except one: pycurl. So I decided to try building the source
    but as it turns out, building C programs on Windows isn't nearly as
    straightforward as on Linux, so I'm a bit lost.

    I've downloaded the free Visual C++ Studio 2005, the pycurl sources (and
    the requisite curl libs, etc), but pycurl insists I don't have a C
    compiler compatible with VC++ 2003 (which I'm assuming is what Python
    2.5 is built with).

    So, for anyone who might know:

    1) Is VC++ 2005 compatible with VC++ 2003? If not, how can someone
    acquire VC++ 2003 (aside from thepiratebay.org)? The Microsoft site
    seems to be a dead end here unless you've put out for a spendy MSDN
    subscription.

    2) If it is compatible, is there some specific incantation needed (env
    variables, etc) to make pycurl use it?

    3) If this is a dead-end, will mingw32 work instead (the error message
    from pycurl implies it might, but I have doubts)? Or will this only
    work with the cygwin version of Python?

    4) How much alcohol will be required to forget all this when I'm done?


    Thanks,
    Cliff

    --
     
    Cliff Wells, Sep 26, 2006
    #1
    1. Advertising

  2. Cliff Wells schrieb:
    > 1) Is VC++ 2005 compatible with VC++ 2003?


    No. If you know very well how the extension module is written,
    and what precisely the incompatibilities are, you may get away
    with linking to msvcr8.dll, anyway.

    > If not, how can someone
    > acquire VC++ 2003 (aside from thepiratebay.org)? The Microsoft site
    > seems to be a dead end here unless you've put out for a spendy MSDN
    > subscription.


    As you say, getting it from MSDN is one option; another is to get
    a used copy from Ebay. There used to be a free (as in beer) version
    of the compiler binaries; some people use that.

    > 2) If it is compatible, is there some specific incantation needed (env
    > variables, etc) to make pycurl use it?


    If you set the environment variables MSSdk and DISTUTILS_USE_SDK,
    the distutils will use the compiler "cl.exe" in the PATH, regardless
    of whether the resulting binary would work.

    > 3) If this is a dead-end, will mingw32 work instead (the error message
    > from pycurl implies it might, but I have doubts)? Or will this only
    > work with the cygwin version of Python?


    No, the mingw binaries work fine with the pydotorg binaries of Python
    2.5.

    > 4) How much alcohol will be required to forget all this when I'm done?


    You shouldn't forget it. Instead, you should write your experience
    into "the Web", so that others have a flatter learning curve.

    Regards,
    Martin
     
    =?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?=, Sep 26, 2006
    #2
    1. Advertising

  3. Cliff Wells

    Steve Holden Guest

    Martin v. Löwis wrote:
    > Cliff Wells schrieb:

    [...]
    >>4) How much alcohol will be required to forget all this when I'm done?

    >
    >
    > You shouldn't forget it. Instead, you should write your experience
    > into "the Web", so that others have a flatter learning curve.
    >

    After which worthy effort I'll be happy to provide enough beer to erase
    the experience from your mind, at least temporarily. The other way to
    forget it is to turn 50 ...

    regards
    Steve
    --
    Steve Holden +44 150 684 7255 +1 800 494 3119
    Holden Web LLC/Ltd http://www.holdenweb.com
    Skype: holdenweb http://holdenweb.blogspot.com
    Recent Ramblings http://del.icio.us/steve.holden
     
    Steve Holden, Sep 26, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Axel Diener
    Replies:
    0
    Views:
    353
    Axel Diener
    Feb 11, 2004
  2. Ishwor

    win32 extensions for Python 2.4

    Ishwor, Dec 7, 2004, in forum: Python
    Replies:
    0
    Views:
    288
    Ishwor
    Dec 7, 2004
  3. Srijit Kumar Bhadra

    Memory mapped File (Python win32 extensions)

    Srijit Kumar Bhadra, Mar 17, 2005, in forum: Python
    Replies:
    1
    Views:
    420
    Thomas Heller
    Mar 17, 2005
  4. Matthew
    Replies:
    1
    Views:
    309
    Jim Sizelove
    Apr 12, 2005
  5. Mudcat
    Replies:
    4
    Views:
    1,113
    John Machin
    Apr 21, 2005
Loading...

Share This Page