Both perl and python work here (r2849): I build them with cmake. This is the important snippet of our recipe (something like rpm specs): r.macros.cmake_args = ' -DSWORD_BINDINGS=Python,Perl -DLIBDIR=%(libdir)s' r.CMake('%(cmake_args)s', objDir='build') r.Make(dir='build') r.Run('chrpath -d build/bindings/swig/perl/blib/arch/auto/Sword/Sword.so') r.MakeInstall(dir='build') # Only python bindings atm until r.PythonSetup('install', dir='build/bindings/swig/python/')
I tested the following perl and python scripts: #!/usr/bin/perl use Sword; my $mgr = new Sword::SWMgr(); my $neu = $mgr->getModule("GerNeUe"); my $key = new Sword::SWKey("Genesis 1:1"); $neu->setKey($key); print $neu->renderText(),"\n"; #!/usr/bin/python import Sword mgr = Sword.SWMgr() neu = mgr.getModule("GerNeUe") key = Sword.SWKey("Genesis 1:1") neu.setKey(key) print (neu.renderText()) On Mon, Jul 8, 2013 at 7:26 AM, Greg Hellings <greg.helli...@gmail.com> wrote: > > > > On Sun, Jul 7, 2013 at 3:20 PM, Peter von Kaehne <ref...@gmx.net> wrote: >> >> sword-tools/modules/crossreferences/xreffix.pl without arguments will test >> loading Perl Sword bindings >> >> and in Python: >> >> Simply run from commandline Python and do "import Sword" and see it fail: >> >> >>> import Sword >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> File "Sword.py", line 26, in <module> >> _Sword = swig_import_helper() >> File "Sword.py", line 18, in swig_import_helper >> import _Sword >> ImportError: /usr/local/lib/python2.7/dist-packages/_Sword.so: undefined >> symbol: u_strFromUTF8_48 > > > I think you're seeing two things: > > 1) You appear to have an older version of the library that is missing those > functions. Not sure how you ended up with it, but that appears to be stale > on your system. > > 2) The Perl bindings are being built, but are not currently being installed > at all, it would appear. I have no idea why this is right now. > > --Greg > >> >> >>> >> >> >> Gesendet: Sonntag, 07. Juli 2013 um 19:06 Uhr >> Von: "Greg Hellings" <greg.helli...@gmail.com> >> An: "SWORD Developers' Collaboration Forum" <sword-devel@crosswire.org> >> Betreff: Re: [sword-devel] SWORD 1.7.0 final stretch >> >> There should be a sample of each in the swig directory tree somewhere. I >> can check in an hour our so, when I get home. >> >> - Greg >> >> On Jul 7, 2013 11:42 AM, "Troy A. Griffitts" <scr...@crosswire.org> wrote: >>> >>> OK guys, >>> >>> I have just updated the autotools stuff and the README files to build the >>> swig bindings for both Perl and Python. Anyone know how to use SWORD with >>> Perl or Python and can let me know if it actually works? >>> >>> Troy >>> >>> >>> >>> On 07/06/2013 03:04 PM, Peter von Kaehne wrote: >>> >>> On Sat, 2013-07-06 at 04:00 +0200, Troy A. Griffitts wrote: >>> >>> Peter, still wondering if we have a problem we need to fix for you. Do >>> our Perl and Python bindings work for other people with a similar >>> configuration as you? >>> >>> I have not heard from anyone that the Perl bindings are working nor have >>> I heard from anyone with any clever ideas why they are not working. >>> >>> From a module making point of view the bindings are a must. But I do not >>> care if they are working in in 1.7 or in a subsequent iteration as long >>> as it is soon enough again. >>> >>> Peter >>> >>> >>> >>> _______________________________________________ >>> sword-devel mailing list: sword-devel@crosswire.org >>> http://www.crosswire.org/mailman/listinfo/sword-devel >>> Instructions to unsubscribe/change your settings at above page >>> >>> >>> _______________________________________________ >>> sword-devel mailing list: sword-devel@crosswire.org >>> http://www.crosswire.org/mailman/listinfo/sword-devel >>> Instructions to unsubscribe/change your settings at above page >> >> >> _______________________________________________ >> sword-devel mailing list: sword-devel@crosswire.org >> http://www.crosswire.org/mailman/listinfo/sword-devel >> Instructions to unsubscribe/change your settings at above page > > > > _______________________________________________ > sword-devel mailing list: sword-devel@crosswire.org > http://www.crosswire.org/mailman/listinfo/sword-devel > Instructions to unsubscribe/change your settings at above page -- Mark Trompell Foresight Linux Xfce Edition Cause your desktop should be freaking cool (and Xfce) _______________________________________________ sword-devel mailing list: sword-devel@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page