Platform-specific compile flags in

Nikita the Spider NikitaTheSpider at
Mon Mar 5 03:48:57 CET 2007

Hi all,
I'm a newbie when it comes to distributing C-based Python modules. I'm 
just now sharing my first with the rest of the world (it's actually V. 
Marangozov's shared memory module for IPC) and I've learned that the 
module needs a different set of compile flags for Linux than for my Mac. 
My question is this: is there a convention or standard that says where 
platform-specific compile flags should reside? I could put them in, OTOH I know that within the .C file I can add something like 
#ifdef __FreeBSD__
#include <machine/param.h>  /* for system definition of PAGE_SIZE */

That works, but for maximum Python programmer-friendliness I should 
perhaps put the complexity in rather than in a .C file.

Opinions appreciated.

PS - The module in question is here; Linux users must remove the tuple 
"('HAVE_UNION_SEMUN', None)" from

Whole-site HTML validation, link checking and more

More information about the Python-list mailing list