New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Compile on PyPy on Linux #2319
Conversation
_PyObject_GC_UNTRACK is not supported by PyPy's cpyext. PyObject_GC_UnTrack performs the same function, but with a check that allows it to be called twice on an object. This commit simply changes _PyObject_GC_UNTRACK to PyObject_GC_UnTrack, as it is not expected to have an impact on performance.
This is compatible with both CPython and PyPy.
_Py_c_pow is not implemented on PyPy, but the implementation in CPython is quite self-contained so it can be included in _helperlib for use when compiling on PyPy.
This does not look ideal, but as per the comment it needs further investigation as to whether the alternative doesn't work correctly due to a but in PyPy.
These macros should not be missing in PyPy, but for now they are required to build Numba.
I completely forgot to do something about making sure Numpy was installed on PyPy, and seem to have upset the build for CPython too. Will come back to this after the weekend. |
You are right that llvmlite is still built on an internal Continuum computer, but now we're using buildbot instead of Jenkins. Same basic idea though. One issue that comes to mind is how we should distinguish a PyPy build of a package from a CPython build of a package in conda. There might be some new conda/conda-build features that help here. I need to talk to @msarahan to see. |
I had wondered if that would be possible, but I was a bit wary of getting too stuck into generic PyPy/conda stuff and spending a lot of time on it - it would be good to know if there's some things in there that make it relatively easy to do though :-) |
Should be easier with conda build 3's more dynamic recipes. I have not
really thought through this exact use case though. Happy to talk when I
return from vacation on Monday.
…On Mar 28, 2017 2:56 AM, "Graham Markall" ***@***.***> wrote:
One issue that comes to mind is how we should distinguish a PyPy build of
a package from a CPython build of a package in conda. There might be some
new conda/conda-build features that help here. I need to talk to @msarahan
<https://github.com/msarahan> to see.
I had wondered if that would be possible, but I was a bit wary of getting
too stuck into generic PyPy/conda stuff and spending a lot of time on it -
it would be good to know if there's some things in there that make it
relatively easy to do though :-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2319 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AACV-Xr3NRjzFhYknOgYMVhkOfHn35bWks5rqK8lgaJpZM4MotqS>
.
|
It's not so much the package building that I was worried would be an issue, but more a problem of dependency resolution - for example, if I wanted to package pypy and have a numpy package that depends on it, I'm not sure how that would look. For numpy 1.12.1 there are the following variations:
None of these will be compatible with a pypy package, and I think quite a few questions arise, e.g.:
I imagine that the answers to these are not trivial and might require some work to support in conda - I was hoping to sidestep these questions by simply building a small "ecosystem" of PyPy and related packages that don't use the exact names "python" or "numpy" as the package names, but it's not a scalable way of working - however, if there's a better, "official" way to do this then that would be preferable for the long term. |
Yeah, I think this is something we'll need to figure out for conda more broadly as PyPy cpyext improves and PyPy can run more of the packages relevant to conda users (scipy, pandas, etc). |
I think for now we'll have to go with the "small ecosystem" approach. I spoke with some of the conda developers and they have some ideas for how to deal with this, but nothing that will be available soon. |
|
||
set +v | ||
source activate $CONDA_ENV | ||
set -v | ||
|
||
# Install latest llvmlite build | ||
$CONDA_INSTALL -c numba llvmlite | ||
if [ "$PYTHON" == "pypy" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the reverse of the condition you want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it is! Will fix.
Just to clarify - this means that I'll build and publish a set of PyPy and related packages that are completely independent of other conda packages for the purpose of testing Numba and llvmlite? (I am happy to do this) |
Yes. If you put together the conda recipes, we're also happy to host them under our Anaconda Cloud account. |
Just FYI, PyPy3.5 5.9 is out: https://morepypy.blogspot.com.es/2017/10/pypy-v59-released-now-supports-pandas.html |
Any update? PyPy added almost full Cython support since the last comment was made. llvmlite and builds and runs fine without any patch. |
with pypy 7.2 it still failing (Manjaro) :/
|
hi guys, Scipy, Pandas, Numpy, Cython, everything work with Pypy
|
|
It seems the CI has moved to azure, and the conda environment is created with this line
which can be modified to use PyPy via
The main change is to add a
|
Nope, this won't work. Compilation of |
I think I might just close this. I think it's maybe useful as an inspiration for making current Numba work on PyPy (along with the guidance in https://www.embecosm.com/2017/01/19/running-numba-on-pypy/), but probably not work attempting to continue on with. |
This is something of a placeholder at the moment - the code is pretty much as I plan for it to be (and is based on #2253), but I'm still thinking about a good way to produce llvmlite packages for pypy that can be used to test Numba with. Some thoughts/comments:
All feedback / thoughts appreciated! In the meantime, I'll be trying to improve the packaging setup and fixing anything that this appears to have broken.