Comment 0 for bug 1802345

Alberto Donato (ack) wrote :

Building python packages that have C modules fails with snapcraft as C headers are not found.

This is a sample snaps that fails building on Bionic:

name: test
version: 1.0
summary: test
description: test
grade: stable
confinement: strict
base: core18

    command: uwsgi

    plugin: python
    source: .
      - uWSGI
      - python3-dev
        - libpython3.6

exporting C_INCLUDE_PATH=/usr/include/python3.6 makes it work.

Tested with both stable (2.43.1) and candidate (3.0) snaps.

Also, removing the core18 base and using libpython3.5 when building on xenial shows the same issue