I’ve drafted a tutorial on how to build and distribute a C++ shared library alongside a Python package. Here it is: poetry-install-shared-lib-demo.
I’m posting this here for anyone who is interested in following the steps PyStan is taking to adapt to the changes in Stan Math 3.0. (Whereas Stan Math 2.x could be used header-only, Stan Math 3.0 requires PyStan to use a shared library.)
I’m also posting this here in the hopes that someone can submit a pull request which makes the demo work under Windows and macOS. (It may already work under macOS, I haven’t checked.)
If we can get this demo working under Linux, macOS, and Windows, this will give us a fairly clear path towards a version of PyStan which works with the current release of Stan.