[Distutils] C extension modules

Tarek Ziadé ziade.tarek at gmail.com
Tue Jan 26 17:32:37 CET 2010


On Mon, Jan 25, 2010 at 11:22 PM, Torsten Mohr <tmohr at s.netic.de> wrote:
> Hello,
>
> i'm not sure if this is the preferred way to get help.  If it is not, can you
> then please tell me how?

That's the best way :)

>
> I write a C++ extension module in which i need to tell if i compile on Linux
> or Windows.  What is the preferred way to do this?

What are you doing exactly with this information ?

>
> Also, i use libjpeg, libtiff and libpng.  Can i portably test for presence and
> version of these libs on Linux, Windows and other OSes?
>
> The documentation on docs.python.org is quite good, but are there some
> additional examples available?

What's usually done is testing for the platform in setup.py to decide which
extensions are going in.

see http://bitbucket.org/kang/python-keyring-lib/src/  and in
particular "extensions.py" used in setup.py

Regards
Tarek

>
>
> Thanks for any hints,
> Torsten.
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig
>



-- 
Tarek Ziadé | http://ziade.org


More information about the Distutils-SIG mailing list