Skip to content
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

Wheels for pyodide/pyscript #81

Open
churnikov opened this issue Aug 14, 2023 · 9 comments
Open

Wheels for pyodide/pyscript #81

churnikov opened this issue Aug 14, 2023 · 9 comments

Comments

@churnikov
Copy link

Hi!

I'm curious, is it possible to create wheels that would target pyodide in order to use rdkit as python package through pyscript? And if it is, do you think that it's a good idea to invest into that?

I know that there is rdkit.js as a fall back option, but still I want to ask this question as I think for python users would be more intuitive to install pypi package instead of setting up JS object.

Here is a code snippet to try to install rdkit

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Add rdkit to pyscript</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="css/style.css" rel="stylesheet">
<!-- Add pyscript link -->
    <link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
    <script defer src="https://pyscript.net/latest/pyscript.js"></script> 
    <py-config>
      terminal = false
      docked = false
      packages = ["rdkit"]

      [splashscreen]
      autoclose = true

      [[interpreters]]
      src = "https://cdn.jsdelivr.net/pyodide/v0.23.4/full/pyodide.js"
      name = "pyodide-0.23.4"
      lang = "python"

    </py-config>
  </head>
  <body>
  
  </body>
</html>
@kuelumbus
Copy link
Owner

Hi. This is a great idea, and I've already looked into this. Currently, Pyodide isn't supported by cibuildwheel, which I use for building the Python wheels. However, there are intentions to provide support (pypa/cibuildwheel#1454), and once this integration is completed, I'll revisit the idea.

@churnikov
Copy link
Author

Cool!

Thank you for the fast response and the great work on this project in general :)

Just out of curiosity, will there be an opportunity to help out with this because it will "just work (c) Todd Howard" or it will actually work without any additional effort? :)

@kuelumbus
Copy link
Owner

Sure, thanks for offering to help. I hope it will just work; but due to the build dependencies of RDKit, I believe this will be challenging (even after cibuildwheel has support).

@churnikov
Copy link
Author

I will leave this issue open then :)

@syedzayyan
Copy link

Is there any update on this?

@ergo70
Copy link

ergo70 commented Apr 23, 2024

I would also offer to help, since I recently had the same idea of a full RDKit beyond minimal.lib in the Browser - but quickly found out that it will be a challenge.

@kuelumbus
Copy link
Owner

kuelumbus commented Apr 23, 2024

I get that Pyodide wheels would be fantastic, but without cibuildwheel's support for Pyodide, it's going to be a challenge. Even if cibuildwheel does support Pyodide, another hurdle will be building the Boost library (and possible others libraries) for Pyodide.

However, please feel free to open a PR for that. I'm also happy to support these efforts.

@churnikov
Copy link
Author

Seems like the cibuildwheel issue is resolved.
I can try to look into it
pypa/cibuildwheel#1456

@kuelumbus
Copy link
Owner

Thanks, that'd be wonderful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants