rdkit-pypi icon indicating copy to clipboard operation
rdkit-pypi copied to clipboard

Wheels for pyodide/pyscript

Open churnikov opened this issue 1 year ago • 9 comments

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>

churnikov avatar Aug 14 '23 11:08 churnikov