mrkn / pycall.rb

Calling Python functions from the Ruby language
MIT License
1.06k stars 75 forks source link

Support for pypy? #75

Closed archonic closed 5 years ago

archonic commented 5 years ago

I've tried setting the path to a pypy binary, but it's getting the PyCall::PythonNotFound error. I've confirmed that I can run python scripts with that binary.

Is pypy support feasible with pycall?

mrkn commented 5 years ago

@archonic I think the answer is No, because pycall.rb depends on CPython's C API for embedding Python interpreter.

Unfortunately, I don't know the internal of PyPy, so the investigation of the feasibility is very hard for me. If you want to use pycall.rb with PyPy, and if you can perform the investigation, your contribution is always welcome!

archonic commented 5 years ago

Now that I've read a bit more about PyPy, I don't think it would make sense to pursue this. I believe I would need to run a fork of PyPy to mimic the CPython C API, which isn't worth it for me. Thanks for your work on pycall!