-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Build package for Pyodide out of tree #7265
Conversation
Initial inspiration was taken from numpy/numpy#24603.
Nice to see this @lagru. I was just revisiting my own NumPy PR, and saw this one linked. Hopefully this is not too difficult to get over the finish line now that Pyodide has meson-python support. |
@rgommers, thanks for taking a look! Now this is running into the same |
Hmm, I was counting on that being resolved since the upstream bug was closed, and the fix confirmed to work for scikit-learn: pyodide/pyodide#4136. That was with a Python from a conda env though, and that was the case for me as well (at least locally). Is it the same for you? If it's a different case, it may be worth commenting on pyodide/pyodide#4118. I unfortunately didn't get time to dig deeper this week. |
I see the same problem, except that on Fedora
I expect that pyodide is supposed to be looking inside the |
I can add the include path needed:
But I do not know how to remove the standard Python include that is added. |
Thanks for investigating @stefanv. I just checked locally that this still seems to happen for the most recent pyodide-build versions 0.24.1 and 0.25.0a2 even though the fix pyodide/pyodide#4136 should be included. EDIT: This happens regardless of me using a venv with my system's python or micromamba. |
Locally, this version seems to successfully create a wheel when running "pyodide build" opposed to using "python -m build ...".
Ha, apparently there is no need to use a |
Okay, now I'm getting loads of |
Status update: it's probably reasonable to wait with this until after NumPy 2.0 has settled. See numpy/numpy#24603 (comment). |
Hi there! I wanted to chime in into the conversation, since this was referenced in numpy/numpy#24603 – its successor, here: numpy/numpy#25894, should be merged soon (maybe during this week). Please let me know If there is any way @rgommers and I can drive this forward, we would be happy to help. |
Thanks for keeping us up to date. I was quietly following along but I think it still might make sense to wait with this until Pyodide includes NumPy 2.0 officially? It's been some time but as I understand it the current approach with out-of-tree builds only targets one package, in this case scikit-image. So to build with NumPy 2.0 we'd have to wait until the Pyodide distribution includes this. Or we get NumPy 2.0 from somewhere else but that might be unnecessarily complicated when we can just wait? What do you think? |
We encountered this problem in PyWavelets. It was due to loading
This was fixed a few days ago: pyodide/pyodide#4541. The fix is not yet released, but it may be worth verifying that that takes care of all bad file descriptors with a local checkout of Pyodide (in case you don't have one at hand, maybe @agriyakhetarpal can give it a try?).
It is probably useful to not try to merge this PR before the needed |
I am happy to give this a try on a fork. However, the patch was for a different purpose – to allow NumPy to properly use
If it helps, we can keep this PR up to date before the imminent NumPy 2.0 release (or perhaps build these Pyodide/WASM wheels on both stable and development versions of NumPy – I'm not sure if that makes sense at this time). I would be glad to write a new PR that builds upon the changes here, or help out with code review here if needed. Please let me know what works! |
In the meantime before this gets attention, I have tried updating the PR in this branch on my fork: agriyakhetarpal/add-emscripten-builds-out-of-tree and owing to the fact that the patch for resolving the The package succeeds in compilation without any hiccups, but I received another failure during test collection due to which I am always unsure of as to how to debug them, but I did find this resource in the Pyodide issue tracker: pyodide/pyodide#3865 (comment) but I do not think the discussion is completely related to what is happening here. I would appreciate any help I can receive on this! |
That does look like exactly the same issue. And it doesn't look easy to work around. Let me add a comment on the upstream issue. |
@agriyakhetarpal, please by all means feel very welcome to go ahead and take over. 🙏 Re the NumPy 1 vs 2 issue, I think it's fine to just use the most recent NumPy version provided by the Pyodide distribution. Right now we are mainly interested to run our test suite with Pyodide and add JupyterLite support in our dev docs. |
Thank you for the response, @lagru. I had put this aside for a while after receiving the above unresolved symbol |
Superseded by #7350. |
Description
Attempt to build our own wheel for the Pyodide distribution. If this proves "easy" we could test against it regularly and catch errors before releases. It would also make it easier to include JupyterLite in our HTML docs.
Related resources:
cc @stefanv
Checklist
./doc/examples
for new featuresRelease note
Summarize the introduced changes in the code block below in one or a few sentences. The
summary will be included in the next release notes automatically: