Updating gopy to support Python3 and PyPy


Go is an open-source language with builtin primitives to easily handle concurrency. Python is the de facto glue language in science. More and more analyses are written in Python with performance hotspots being rewritten in C/C++ or Cython.

What if we could leverage the concurrency features of Go from Python?

This is the goal of the gopy tool. gopy takes a Go package, inspects it and generates C code to wrap it with the CPython-2 API. This is a process that is made relatively straightforward thanks to the high level constructs of Go and its standard libraries to inspect Go code (mainly go/build and go/types.)

However, gopy only generates wrappers for CPython-2. The science ecosystem is finally migrating to Python-3: gopy needs to support this migration.

This project intends to modify the code generation mechanism to generate (pure Python) cffi code so that Go packages can be used from CPython (2 and 3), PyPy and IronPython.

Task ideas

Expected results

A new gopy command that can generate wrapping code (using cffi) for the current set of unit tests of gopy, with Go >= 1.5.


Go language, Python language, git.


Corresponding Project

Participating Organizations