python extension changes

12 views
Skip to first unread message

t.r.marsh

unread,
Feb 25, 2014, 4:11:33 AM2/25/14
to s2p...@googlegroups.com
Hi,

I have made a few changes to the s2plot python extension as listed in the attached git log. The main ones are:

1) A fix to a path in the installation script which allows it pretty much to install

2) Support for the function s2funuva plus an example script based upon the C code

3) Bug fixes for the functions ns2line and ns2vf4n.


I have also managed to get the python extension to work with the PRC writer module, although in this one case I could only fix it by changing part of the C-code build. It seems that from within the Python extension when the s2prcwriter.so module is loaded, it does not know where to find various libraries. I tried adding them to the list of libraries used to build the python module, but this didn't work. Instead I could get everything to work by adding these libraries to the statement used to build s2prcwriter.so inside build-prc-module.csh, i.e..

$S2MODMAKER -o ${S2PLOT_PRCDRIVER}.so s2prc.o ./newprc/*.o -L${S2PATH}/${S2KERNEL} -ls2plot -L${S2HARUDIR}/lib${S2LBITS} -lhpdf -lz -lstdc++

where I add in the hpdf, z anc c++ libraries (the latter needed since S2MODMAKER used gcc not g++). I don't understand why I couldn't just add the libraries to the Python extension build, which would seem similar to the way the C examples are linked, but I don't pretend to understand the linker. The C-code examples continue to work with the above statement. I can only verify it works under linux however.

I detail this one instance since it is the single case where one could argue for a change to the C-distribution. However, I don't think it would be a big difficulty if you didn't want to change it because I have added the modified build-prc-module.csh to my version of python-s2plot and have added instructions on how to re-build s2prcwriter.so using it. It is a 2 minute job to do this.

I was waiting for your approval before putting this back into the public domain on github for people to be able to download, so let me know if you are OK with this. Once its there, then it will be the place to go to see what has changed.

Tom

changes.txt

David Barnes

unread,
Feb 27, 2014, 8:07:22 AM2/27/14
to s2p...@googlegroups.com
Please go ahead Tom.

I'd like to get S2PLOT onto github so we can then make easy patches like you suggest for the build-prc script. However Michail Vidiassov has been doing some work on a cake version of S2PLOT so I'd prefer to release that version when it's ready rather than the 3.2.1.

 - David.
Reply all
Reply to author
Forward
0 new messages