pyodide / pyodide-build

Tool for building packages targeting Pyodide
Mozilla Public License 2.0
5 stars 5 forks source link

Any examples of using `pyodide-build` on an arbitrary `build.py` file which can be used by build tools like `poetry` to build the Emscripten + WASM wheel? #17

Open jymchng opened 1 month ago

jymchng commented 1 month ago

As titled.

Additionally, if this can work, then the building of the wheel and subsequent loading into pyodide can be much smoother.

It would be good to have an example showcasing something like setuptools.Extension or Cython.Extension and a build_ext.

Thank you.

ryanking13 commented 1 month ago

I don't have much experience with Poetry, so I don't know how build.py works, but we rely on a standard Python build system (PEP 517), so it Poetry's build.py is correctly supporting it. It would work.

It would be good to have an example showcasing something like setuptools.Extension or Cython.Extension and a build_ext.

PR welcome. As I mentioned, it would probably "just work", but if you run into any issues, it would be helpful if you could summarize what you're experiencing and open an issue or PR.

jymchng commented 1 month ago

I don't have much experience with Poetry, so I don't know how build.py works, but we rely on a standard Python build system (PEP 517), so it Poetry's build.py is correctly supporting it. It would work.

It would be good to have an example showcasing something like setuptools.Extension or Cython.Extension and a build_ext.

PR welcome. As I mentioned, it would probably "just work", but if you run into any issues, it would be helpful if you could summarize what you're experiencing and open an issue or PR.

Thank you for your warm reply.

https://github.com/ymd-h/exodide?tab=readme-ov-file

I am looking for something like the above, but the project has not been maintained for two years so that is unfortunate. If pyodide can take over it, that will be great!

ryanking13 commented 1 month ago

That package was made when we didn't support out-of-tree builds. Now that we do, I don't think that package is necessary anymore.