Using python23 to develop an extension for an application that has python22 embedded

John Underwood johnbunderwood at yahoo.ca
Wed Apr 7 08:38:27 EDT 2004


On Tue, 6 Apr 2004 22:02:49 +1000 (EST), Andrew MacIntyre
<andymac at bullseye.apana.org.au> wrote:

>On Mon, 5 Apr 2004, John Underwood wrote:
>
>> Since I do have python23.dll and python23_d.dll (from a successful
>> build of 2.3), can I use these to develop an extension for the
>> aforementioned commercial application if I stay away from any new
>> features in 2.3 (but not in 2.2)?
>
>You can do the development, but you won't be able to directly distribute
>the resulting extension because it will have been linked with python23.dll
>when it needs to be linked with python22.dll.
>
>To make things easier to fudge later, you make sure that your extension is
>Distutils'ified from the beginning.
>
>You can then use another compiler supported by the Distutils (MS CL
>non-optimising compiler, MinGW, Borland etc) to build the distributable
>extension in either a Python 2.2 or 2.3 installation, without risking
>mixing C runtime library mismatches (VS.NET uses a different CRT than
>VS6 I understand).  If using a 2.3 installation, you'll need to substitute
>a 2.2 import library when building the final distributable version.
>
>The Distutils setup.py script can then provide the installation harness.

Thanks for the advice. I have a Borland compiler that I'll try with
Disutils.




More information about the Python-list mailing list