Python extensions on Win32

C

Cliff Wells

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

--
 
?

=?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?=

Cliff said:
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
 
S

Steve Holden

Martin said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top