[Ns-developers] Python Bindings for optional ns-3 features

Gustavo Carneiro gjcarneiro at gmail.com
Fri Mar 20 10:07:09 PDT 2009


2009/3/20 Raj Bhattacharjea <raj.b at gatech.edu>

> We ship a set of the bindings definition files along with ns-3, and
> keep these files updated and in the trunk of ns-3-dev by using ./waf
> --python-scan.  However, there are some subtle issues that are
> creeping up.  Namely, there are some optional components in ns-3, that
> might cause some code to be #IFDEFed out depending on whether or not
> certain libraries are detected by ./waf configure.  So, for example,
> if "waf configure" detects GTK+ on my system, the bindings I generate
> and check in might not compile on another system where GTK+ is not
> installed.


You are not supposed to ship generated bindings to another system.  Let each
system generate its own python bindings using pybindgen (but no gccxml or
pygccxml needed).  Therefore, I see no problem here.


>
>
> We need to define a minimum set of features for which we'll ship
> bindings code.  We then also need a way to configure ns-3 with all of
> those optional features turned off, which I don't know how to do at
> present; for example, if waf configure finds GTK+, it enables the
> featues that depend on it; I'd like to force waf configure to
> _disable_ those features (or any optional features for that matter)
> using something like ./waf configure --no-gtk
>
> Then for python-scanning, it needs to go something like this:
>
> ./waf configure --no-gtk --no-xml --no-threads --no-rt ...
> ./waf --python-scan
>
> And then check in this set of bindings code which is common to ALL
> ns-3 users.  If users want to enable the optional APIs on their end
> system, they will have to install gccxml, pygccxml, pybindgen, etc. to
> get the full set of bindings code.


It seems to me you are trying to solve a false problem?...

-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert


More information about the Ns-developers mailing list