I’ve got a commit for Mojo’s snapcraft.yaml
to add base:core
, so that it uses Multipass by default. The first time I run snapcraft
this builds fine, but subsequent attempts (after changing something in the upstream source) fail with:
Processing /root/parts/mojo/build
Link is a directory, ignoring download_dir
Collecting argcomplete (from mojo==0.5.1)
File was already downloaded /root/parts/mojo/python-packages/argcomplete-1.10.0-py2.py3-none-any.whl
Collecting jinja2 (from mojo==0.5.1)
File was already downloaded /root/parts/mojo/python-packages/Jinja2-2.10.1-py2.py3-none-any.whl
Collecting jujuclient>=0.0.7 (from mojo==0.5.1)
File was already downloaded /root/parts/mojo/python-packages/jujuclient-0.54.0.tar.gz
Collecting juju-deployer>=0.6.4 (from mojo==0.5.1)
File was already downloaded /root/parts/mojo/python-packages/juju-deployer-0.11.0.tar.gz
Collecting pylxd (from mojo==0.5.1)
File was already downloaded /root/parts/mojo/python-packages/pylxd-2.2.10.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-download-sXv_OB/pylxd/setup.py", line 36, in <module>
pbr=True)
File "/root/stage/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/root/stage/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/root/stage/lib/python2.7/site-packages/setuptools/dist.py", line 444, in __init__
k: v for k, v in attrs.items()
File "/root/stage/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/root/stage/lib/python2.7/site-packages/setuptools/dist.py", line 732, in finalize_options
ep.load()(self, ep.name, value)
File "/root/stage/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2229, in load
return self.resolve()
File "/root/stage/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2235, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/root/parts/mojo/install/lib/python2.7/site-packages/pbr/core.py", line 53, in <module>
from pbr import util
File "/root/parts/mojo/install/lib/python2.7/site-packages/pbr/util.py", line 85, in <module>
import pbr.hooks
File "/root/parts/mojo/install/lib/python2.7/site-packages/pbr/hooks/__init__.py", line 16, in <module>
from pbr.hooks import backwards
File "/root/parts/mojo/install/lib/python2.7/site-packages/pbr/hooks/backwards.py", line 17, in <module>
from pbr import packaging
File "/root/parts/mojo/install/lib/python2.7/site-packages/pbr/packaging.py", line 34, in <module>
from setuptools.command import develop
File "/root/stage/lib/python2.7/site-packages/setuptools/command/develop.py", line 11, in <module>
from setuptools.command.easy_install import easy_install
File "/root/stage/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 52, in <module>
from setuptools.sandbox import run_setup
File "/root/stage/lib/python2.7/site-packages/setuptools/sandbox.py", line 15, in <module>
import pkg_resources.py31compat
ImportError: No module named py31compat
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-download-sXv_OB/pylxd/
Failed to run '/root/stage/usr/bin/python2 -m pip download --disable-pip-version-check --dest /root/parts/mojo/python-packages .': Exited with code 1.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
An error occurred when trying to execute 'sudo -i env SNAPCRAFT_HAS_TTY=True snapcraft snap' with 'multipass': returned exit code 2.
I did find bug #1768233 which is similar but the workarounds listed by Sergio there don’t work for me.
Any hints appreciated. You can find it all in bzr branch lp:~laney/mojo/snap-base
. Steps to reproduce:
$ snapcraft
[ ..., works ]
$ vim mojo/cli.py # make some change
$ snapcraft
[ ... breaks, as above ]