python-package-guide icon indicating copy to clipboard operation
python-package-guide copied to clipboard

Add content to guide about writing interfaces + wrappers for libraries in other languages

Open NickleDave opened this issue 3 years ago • 2 comments

Python is uniquely suited for writing wrappers + interface to libraries in other languages.

I think this is in scope for pyOpenSci since a lot of tools will be written in other languages and we want to provide access to them. An example of a package we've already reviewed here would be pygmt.

It would be good if we could provide some guidance on good practices for doing this.

This came up in #21 https://github.com/pyOpenSci/python-package-guide/issues/21#issuecomment-1368046000

Things to cover, this is a rough list that mainly reveals my ignorance :confused:

  • [ ] Ways to interface
    • CFFI
    • eval calls (not so good)
    • tools like SWIG
    • pybind11
    • rpy2
  • [ ] Build tools, which I know we are thinking about anyway
    • Meson
    • scikit-build
    • dev.py
  • [ ] example packages
    • pygmt

NickleDave avatar Dec 31 '22 15:12 NickleDave

this would be an awesome topic for someone to tackle. we have a single basic page here on this topic but i could see this becoming a longer section in the guide in the future. we might also link out to other resources. i'll mark this as a help-wanted issue as well.

lwasser avatar Apr 09 '24 21:04 lwasser

i think this should be in this section

We should consider adding an overview of

  • sckit-build as a backend (with hatch)
  • meson-python with hatch (using @ucodery example package here
  • potentially suggest scikit build tool that @henryiii has been working on (that seems to be a really good option right now)
  • OPTIONALLY: highlight cibuildwheel also being developed by Henry!

This task could be broken into two

  • [ ] Write more text explaining how these builds work - link to henry's content in the development guide
  • [ ] Suggest scikit build as a recommendation
  • [ ] Add a Scikit build example package using hatch!

lwasser avatar Jul 12 '24 17:07 lwasser