[libvoikko] No OSX support in libvoikko.py?
hatapitk at iki.fi
Thu Jan 7 17:20:24 EET 2016
On Thursday 07 January 2016 16:30:31 Sjur Moshagen wrote:
> AFAICS, there is no support for OSX in there, as the filename suffix for
> dynamic libraries on OSX is .dylib. Would the following code be working?
Yes, I think it would.
> class Voikko(object):
> def __getLib():
> if os.name == 'nt':
> fileName = "libvoikko-1.dll"
> elif sys.platform == 'darwin':
> fileName = "libvoikko.1.dylib"
> fileName = "libvoikko.so.1"
> if Voikko._sharedLibrarySearchPath is not None:
> return CDLL(Voikko._sharedLibrarySearchPath +
os.sep + fileName)
> return CDLL(fileName)
> __getLib = staticmethod(__getLib)
> Also, since this is all using a dynamic library, should I also include
> dynamic libraries for all dependencies, like:
This is true as well. Sorry that I missed these. I was in a hurry to get this
thing working on Windows since that was where we urgently needed the 5.0
version to replace the old Finnish spell checker extension that did not work
with 64 bit LibreOffice.
It should not be necessary to link the libraries statically although you can
do that if you want.
I will try to get these fixes committed this week or next week. Thanks for
More information about the Libvoikko