Making python module using Borland C++ 5

Rami Saarinen rs55862 at NOSPAMyahoo.com
Tue Apr 8 09:12:55 EDT 2003


Anders J. Munch wrote:

>>I am trying to build a simple module for python (2.1.1) using the 
>>Borland C++ Builder 5.
> 
> 
> Piece of cake with distutils, assuming you're just writing an
> ordinary extension module, and not trying to embed Python in your
> application.
> 
> Just write a setup.py and run it with --compiler=bcpp.

(Sorry if this comes duplicated, but I sent a message over an hour ago 
and it still has not shown up..)

Yes, I did use the "python setup.py build" thingy when using vc++. I did 
not know about the compiler option which is good to know. Thanks Anders.

However, the thing is that eventually I'd be using a custom python 2.1 
that has its' own python21.lib and includes. I am pretty sure that there 
  is no distutils for that installation so I need to learn to do it by 
hand. I'd like to do it using normal python installation just to be on 
the safe side. Currently I have made the CLIPS 6.2 as static library and 
use it along with python21.lib.

The module (in C) is very simple (adapted form the embedding.. docs), 
providing only three functions to python. I bet my pants off, that there 
is some really simple solution for this. 8|

So to summarize:

* I'm using 2 static libs python21.lib and clips.lib
* one dead-simple c-file - the module - to work as glue between clips 
and python.
* The compiler is Borland C++ builder 5 on WinXP.

--
Rami Saarinen





More information about the Python-list mailing list