[parted-devel] Call for organization

Anant Narayanan anant at kix.in
Sat Dec 9 18:33:13 CET 2006


Hi Otavio,

> Anant, I just don't see why is bad to use something to make our work
> easier?

I do agree SWIG makes our job easier, but its just too huge a dependency
for something low-level like libparted. The bottomline is I am not
comfortable with using a third-party tool to generate code for us.

I may be a little selfish here; but at Gentoo we take python for
granted; and it seems as an overkill to demand SWIG just to be able to
generate bindings for libparted.

> If it can't be SWIG, no problem, we can choose another tool for it or
> even write something that grab a description file and write the code
> for us or something like it. If it'll be one-to-one mapping it
> shouldn't be impossible to do.

Now this is something I would love to do. We can come up with a way of
defining functions and data types and generating code out of it. But
that must be written by us, and we should be in control of what's going
on. The build process for the bindings must be transparent and ideally
require no more dependencies than libparted does.

> Looks very impressive to me the http://www.swig.org/tutorial.html and
> simple to maintain and extend. Why do you think that is too bad to
> have swig being used for it?

Well like I said, it's really not good to depend on SWIG for something
this fundamental. Basically we hand over control to SWIG and if
something goes wrong with SWIG, we're helpless. It's also a little
difficult to debug: we get a segfault and we don't know how to find out
whether its a bug in our interface or in SWIG itself. I'm all for making
our own code generation system, so we have a "definition" file that can
be uniformly used across all language bindings. It'll take us time, but
should be worth it in the long run.

Of course, just my 2 cents. I'm not ruling out SWIG; so if everyone
feels that's the way to go; no problem. It's just that I've had
not-so-good experiences with SWIG before  ;)

David, a link to pyparted sources would be helpful. How did you go about
doing the one-to-one mapping?

Cheers,

- Anant



More information about the parted-devel mailing list