[Ns-developers] Python Bindings for optional ns-3 features
Raj Bhattacharjea
raj.b at gatech.edu
Fri Mar 20 10:27:20 PDT 2009
On Fri, Mar 20, 2009 at 1:07 PM, Gustavo Carneiro <gjcarneiro at gmail.com> wrote:
> 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?...
I WAS trying to solve a very specific problem in ns-3-dev regarding
the python bindings....which I can't replicate anymore!
Sorry for the noise. In any case, it still might be desireable to
selectively turn off each optional feature. Is this possible?
Gustavo, I might be mailing you privately if I run into some more snags...
--
Raj Bhattacharjea
Georgia Institute of Technology
School of Electrical and Computer Engineering
Ph.D. Candidate
Systems Analyst
404.894.2955
More information about the Ns-developers
mailing list