Platform-specific compile flags in setup.py?
Nikita the Spider
NikitaTheSpider at gmail.com
Mon Mar 5 03:48:57 CET 2007
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
setup.py, OTOH I know that within the .C file I can add something like
#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 setup.py rather than in a .C file.
PS - The module in question is here; Linux users must remove the tuple
"('HAVE_UNION_SEMUN', None)" from setup.py:
Whole-site HTML validation, link checking and more
More information about the Python-list