[Nexus-developers] SWIG NeXus interface

Jens Krüger jens.krueger at FRM2.TU-Muenchen.DE
Wed Nov 27 07:58:30 GMT 2002


Hi Mark,  hi Ray,

Am Donnerstag, 21. November 2002 08:27 schrieb Mark Koennecke:
> Dear Ray,
>
> On Wed, 20 Nov 2002, Ray Osborn wrote:
> > On 2002/11/20 7:37, "Mark Koennecke" <Mark.Koennecke at psi.ch> wrote:
> >

I think, after tagging the current release of the distribution and creating a 
branch for bug-fixes for the this release it should be no problem to add the 
SWIG support into the CVS in the development trunk (the same as the main 
trunk). If there is something wrong or worse you may fix  or remove it. It 
would be better to test it from the CVS than create an extra tar.gz or patch 
and you have to add it to the distribution. 

> > Hi Mark,
> > I think that it would be helpful for the other developers to try it out
> > before we release it to the public.  I played around with SWIG, and soon
> > realized that it raises a number of issues, e.g., Python seemed to
> > require the NXhandle pointer to be initialized as a null pointer before
> > the first call to NXopen.  I don't know if you have solved all those
> > problems, but I would like to see what you've done and then discuss how
> > the user will want
>

Add the support for scripting languages with the help of SWIG step by step.
Start with your favourite and some other people may add the support for the 
missing or their prefered language like python, perl, java, ....

>   No I cannot solve all those problems. I do not speak all SWIG's possible
>   scripting languages. I tested with two: mzscheme and Tcl. I especially
>   would like to have a perl specialist look at it, as perl is very popular.
>   I also would want to add a function for retrieving NeXus errors to the
>   interface before I put it anywhere.  But this is a quick job.
>
> > to use it. Why don't you add a swig directory to the CVS server?
>
>   Exactly this is what I wanted. It would be NeXus/nxinter or, if you
>   prefer that, NeXus/swig. Or do you mean as a separate package on the
>   CVS server?
>

We set up a lot of projects with autotools. I suggest to put all stuff around 
NeXus found in the CVS into a distribution. I agreed with you to create a 
standard set of libs and programs and the other may be created with options 
during the run of the configure script, e.g.

configure --with-F9X

or 

configure --with-python

> > I am not experienced in setting up an autoconf installation, but I think
> > we need to have a base installation as default, with other facilities
> > added as options in the configure script.  For example, not everyone
> > needs jnexus so make that an option.  What is considered to be standard
> > and what optional is something we should debate.  How about:
> >
> > Standard
> > --------
> > C + F77 API, test programs, NXbrowse, NXto...
> >
> > Optional
> > --------
> > F90 API, Jnexus, NXdict, NDS (not currently on CVS server)
>

We use the SWIG in a lot of project using the autotools. Our experiences show 
that may a lot of work for the first time to find out the right way to use 
the SWIG with all its options for the different languages. But it should not 
be a real problem to uses it with the autotools. If you may add an additional 
language it would be nice to get informations to the use of SWIG with this 
language.

>   I think the SWIG interface autonconfed would be a great deal of work:
>   you would have to check for SWIG and then scripting languages and give
>   the user an opportunity to select a scripting language. I think we
>   should defer this and concentrate to get autoconf for the main NeXus-API
>   right.
>
>   Dividing the package along the lines indicated seems to be a good idea.
>   There is no problem of putting the NDS on the server. It is known to
>   work both on True64Unix and Linux. I also would add our IDL-API.
>
>
>                       Regards,
>
> 			     Mark
>
>
>
> _______________________________________________
> NeXus-developers mailing list
> NeXus-developers at anl.gov
> http://www.neutron.anl.gov/mailman/listinfo/nexus-developers

If you agreed I would start to add the autotools to the NeXus package. It 
would be nice to rearrange some files and directories to separate the 
additionals from the core of NeXus.

-- 

Jens Krüger

Technische Universität München
ZWE FRM-II
Lichtenberg-Str. 1
D-85747 Garching

Tel: + 49 89 289 14 716
Fax: + 49 89 289 14 666
mailto:jens.krueger at frm2.tu-muenchen.de
http://www.frm2.tu-muenchen.de/





More information about the NeXus-developers mailing list