What is the package for pycairo in Ubuntu?

Plots, a plotting program, requires the dependency pycairo.

The Ubuntu repositories have two packages with the similar name, python3-gi-cairo and python3-cairo.

Which among these apt packages correspond to the PyPI package pycairo? I went through the package descriptions of python3-gi-cairo and python3-cairo, but am not sure which one is the one corresponding to pycairo, or if both are needed.

In general, how to find the relevant apt package in such cases, where two python packages have similar names?


Note: I am the maintainer of the PPA for Plots. I need to use the relevant apt package as a dependency in debian/control. Installing with pip is not an option.


According to the description for the python3-gi-cairo package (apt show python3-gi-cairo)...

GObject is an abstraction layer that allows programming with an object
 paradigm that is compatible with many languages. It is a part of Glib,
 the core library used to build GTK+ and GNOME.
 .
 This package contains the Python 3 Cairo bindings for GObject. It is mostly
 used by other bindings to map their GObjects to Python objects.

And here is the description for the python3-cairo package (apt show python3-cairo)...

This package contains modules that allow you to use the Cairo vector
 graphics library in Python3 programs.

So, the second one (python3-cairo) would be the package you want.

That said, the maintainers of the pycairo suggest that you install it via pip. For Ubuntu/Debian, they say to install the headers and pkg-config

$ sudo apt install libcairo2-dev pkg-config python3-dev

and then to install the pip3 package

$ pip3 install pycairo