Snapcraft - python importing gyobject

hi,

i am trying to build the pygobject , it requires pycairo to build, below is my snapcraft.yaml snipet, it is failing due to PYTHONPATH. please suggest


parts:
pycairo-import:
plugin: python3
python-packages:
- pycairo

python-import:
plugin: python3
after:
- pycairo-import
python-packages:
- pygobject


You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read “.pth” files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

/home/linaro/checkbox_src/camera/parts/python-import/install/usr/lib/python3.5/site-packages

and your PYTHONPATH environment variable currently contains:

'/home/linaro/checkbox_src/camera/stage/usr/lib/python3.5/dist-packages'

Here are some of your options for correcting the problem:

  • You can choose a different installation directory, i.e., one that is
    on PYTHONPATH or supports .pth files

  • You can add the installation directory to the PYTHONPATH environment
    variable. (It must then also be on PYTHONPATH whenever you run
    Python and want to use the package(s) you are installing.)

  • You can set up the installation directory to support “.pth” files by
    using one of the approaches described here:

    https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.
Command ‘[’/bin/sh’, ‘/tmp/tmpqzjk6fp5’, ‘python3’,
‘/home/linaro/checkbox_src/camera/parts/python-
import/install/usr/bin/easy_install3’, ‘–prefix’,
‘/home/linaro/checkbox_src/camera/parts/python-import/install/usr’,
‘pip’]’ returned non-zero exit status 1