[Bro-Dev] Broccoli Python bindings

Jonathan Siwek jsiwek at ncsa.illinois.edu
Mon Nov 8 10:43:48 PST 2010


> One question here for clarification: above you write that CMake
> delegates to setup.py; however your Wiki page mentions in the
> pysubnettree section:
> 
> * Will probably have a thin CMake script to build extension and
> install module+extension
> * Keeping the setup.py around may be useful for packagers... not sure
> 
> That sounds like replacing setup.py with CMake (rather than
> combining the two). So, I was wondering which of the two options
> you're planing to follow?

Yeah, I vacillated over the weekend and found that it's pretty easy to have CMake completely handle the build/install of Python extensions, but...

> I'd prefer to keep using the setup.py in both cases, as that's the
> standard way to build Python extensions and thus probably more
> robust.

Yes, distutils would probably be the more standard/robust way if it were a completely independent component.  But if we want to provide a "unification interface" to have it built as part of a larger Bro source distribution via CMake, then it would be even less standard to have CMake delegate to distutils rather than do it itself.  It definitely "feels" like I would be abusing CMake by mixing it with a completely different build system.

Maybe one way to go is to provide both a CMake build system and a distutils one (separated), so that people that need the extra robustness (e.g. developers/packagers) can still use the setup.py while people that just want to build Bro from source can follow our established CMake method.  Not quite sure what the best option is for that use-case yet.

- Jon



More information about the bro-dev mailing list