djinni icon indicating copy to clipboard operation
djinni copied to clipboard

Minimal example for python-out on linux

Open jhennrich opened this issue 6 years ago • 1 comments

Please provide a minimal example or at least some explanation how to use the python-branch on other systems than OSX. I have zero experience with OSX and no device available to run the examples. I ran the run_djinni.sh script which generated the python, cffi and cwrapper files. But I am not sure how to replace the Make target ./build_py/cffi/libtextsort_py.dylib. Can you please point me in the right direction?

jhennrich avatar Jul 11 '18 09:07 jhennrich

Yeah, unfortunately the Python functionality was an experiment which never got fully productized or integrated with the rest of Djinni. That's why it's still on a branch, and also why the build is very manual and platform-specific. I'd love to see it improved, but haven't had time to tackle it myself.

The generated Python code is based on CFFI, so that's where I'd suggest you look for guidance. Examples of builds for other CFFI modules should be applicable to a Djinni-generated module, and you can probably find better and more portable ways to package the code than we use in our example and tests.

To answer your specific question about the dylib, that's a dynamic library which contains the generated C++ code and bridging layer. On Linux I'd assume there should be a .so which serves a similar purpose.

artwyman avatar Jul 11 '18 23:07 artwyman