Am 22.01.21 um 17:41 schrieb Berg, Stuart:
>>Unfortunately, this is not possible. Graph-tool uses the CPython C API >>(via boost-python) which is not implemented by pypy.>Pypy does have support, sometimes with performance problems, for most of the Cpython APIsIndeed, the situation may not be hopeless. IIUC, With PyPy’s C API compatibility layer (cpyext), many compiled extensions can be built for PyPy with minimal changes (or perhaps none at all?). The conda-forge project has been methodically adding PyPy support to many of its packages, including numpy, scipy, matplotlib, etc. Just recently, their package for boost itself was updated for PyPy support[1]. On my machine, I can build a “hello world” extension with boost-python and run it with PyPy, without any special magic. (See attached.)
This is indeed very promising! I wasn't aware pypy was so ahead with the C API.
In the coming months, **maybe** all of graph-tool’s dependencies will be supported in conda-forge. But that won’t happen on its own. If this is important to you, please consider assisting with the following PRs, which currently fail:https://github.com/conda-forge/pycairo-feedstock/pull/21 <https://github.com/conda-forge/pycairo-feedstock/pull/21>https://github.com/conda-forge/pygobject-feedstock/pull/27 <https://github.com/conda-forge/pygobject-feedstock/pull/27>I think those are the only remaining obstacles to at least attempting to build a graph-tool PyPy package. (I’m not sure about the glib feedstock.)I’m not a PyPy user (yet?) so I can’t make any promises about my own commitment to this effort. And I certainly can’t comment on what will happen if it turns out patches are required in the graph-tool source code itself. Nonetheless, I think there’s **hope** that a sufficiently motivated PyPy user could make progress on this. If you decide to try it, feel free to ping me on relevant github threads (@stuarteberg).
Ideally we would need boost-python + pypy support in Arch, and other distros, since it also needs a shared library component. Otherwise, at the moment it would be a significant effort for me to try this myself...
Best, Tiago -- Tiago de Paula Peixoto <ti...@skewed.de>
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ graph-tool mailing list graph-tool@skewed.de https://lists.skewed.de/mailman/listinfo/graph-tool