This seems to be due to the mix of stage-packages and python-packages, where pkg_resources from the staged python is loaded and the part's pip wanting to use pkg_resources, but instead of loading its vendored version it ends up using the already loaded one from stage, here's a workaround:
(snapcraft) ubuntu@snapcraft-xenial-dev:~/t$ cat snap/snapcraft.yaml
name: python-chained-parts
version: "0"
summary: test the python plugin
description: |
This is a snap with a chain of python related parts
confinement: strict
grade: devel
Or alternatively
(snapcraft) ubuntu@snapcraft-xenial-dev:~/t$ cat snap/snapcraft.yaml
name: python-chained-parts
version: "0"
summary: test the python plugin
description: |
This is a snap with a chain of python related parts
confinement: strict
grade: devel
This seems to be due to the mix of stage-packages and python-packages, where pkg_resources from the staged python is loaded and the part's pip wanting to use pkg_resources, but instead of loading its vendored version it ends up using the already loaded one from stage, here's a workaround:
(snapcraft) ubuntu@ snapcraft- xenial- dev:~/t$ cat snap/snapcraft.yaml chained- parts
name: python-
version: "0"
summary: test the python plugin
description: |
This is a snap with a chain of python related parts
confinement: strict
grade: devel
parts: requests- unixsocket packages:
part1:
plugin: python
stage-packages:
- python3-
part2:
plugin: nil
stage-packages:
- python3-yaml
after:
- part1
part3:
plugin: python
python-
- bitstring
stage-packages:
- python3-pip
- python3-wheel
- python3-setuptools
after:
- part2
Or alternatively snapcraft- xenial- dev:~/t$ cat snap/snapcraft.yaml chained- parts
(snapcraft) ubuntu@
name: python-
version: "0"
summary: test the python plugin
description: |
This is a snap with a chain of python related parts
confinement: strict
grade: devel
parts: requests- unixsocket packages:
part1:
plugin: python
stage-packages:
- python3-
part2:
plugin: nil
stage-packages:
- python3-yaml
- python3-pip
- python3-wheel
- python3-setuptools
after:
- part1
part3:
plugin: python
python-
- bitstring
after:
- part2