ninia / jep

Embed Python in Java
Other
1.27k stars 146 forks source link

Installation ease #496

Open jbaron opened 9 months ago

jbaron commented 9 months ago

Jep is very nice and great working solution to embed Python!!! The only thing (for my use-case) is that installation would be bit of a hassle for users of my JVM libraries.

Is there anything stopping of creating my own Maven artefacts with the prebuilt native shared libraries included?

So rather then my users having to do a pip install with a compile phase, they could just add a Maven dependency. Of course the Python and Numpy shared libraries would need to be available on their system.

bsteffensmeier commented 9 months ago

I can't think of any reason that isn't technically possible. The biggest complication is that the native shared library is specific to a particular OS and python version so if you wanted to provide broad compatibility it would require building and distributing dozens of different native shared libraries and you would have to have some mechanism of identifying which library is needed at runtime.

jbaron commented 9 months ago

Thanks. Indeed for OS I would expect a few variations (win/x86, linux/x86, Mac/arm64). For Python I was hoping that the "Stable Application Binary Interface" would be sufficient. But if not, that would indeed quickly multiply.

bsteffensmeier commented 9 months ago

Eventually we would like to get Jep working with the stable ABI because it would makie distribution much easier. There is some good analysis of that problem in #308. Whenever I make changes I try to keep an eye on the stable ABI and ensure any new code is compatible but we have alot of code that pre-dates the ABI and it is non-trivial to port everything over.