I’m trying to build a new version of my app (snapcraft.yaml file here). It works locally (amd64), but when I push the code to Launchpad and it triggers automatic builds, it fails on all the archs (amd64, armhf, arm64). Requesting manual builds fails equally.
On my laptop (running 18.04), I’m using the latest snapcraft (3.9.8) and multipass (1.0.2) from stable.
The failed build logs all show the same error:
Building qabro
Traceback (most recent call last):
File "/build/qabro/stage/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/build/qabro/stage/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/build/qabro/parts/qabro/install/lib/python3.6/site-packages/pip/__main__.py", line 16, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
File "/build/qabro/parts/qabro/install/lib/python3.6/site-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/build/qabro/parts/qabro/install/lib/python3.6/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/build/qabro/parts/qabro/install/lib/python3.6/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/build/qabro/parts/qabro/install/lib/python3.6/site-packages/pip/_internal/cli/cmdoptions.py", line 19, in <module>
from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils.util'
Failed to run '/build/qabro/stage/usr/bin/python3 -m pip wheel --no-index --find-links /build/qabro/parts/qabro/python-packages --wheel-dir /tmp/tmpbvm2ybaf launchpadlib': Exited with code 1.
Build failed
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 266, in run
self.build()
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 255, in build
env=env)
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 102, in run_build_command
return self.backend.run(args, env=full_env, **kwargs)
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/lxd.py", line 536, in run
subprocess.check_call(cmd, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['lxc', 'exec', 'lp-bionic-amd64', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build_url": "https://launchpad.net/~pieq/+snap/qabro/+build/831264"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy', '--', '/bin/sh', '-c', 'cd /build/qabro && linux64 snapcraft']' returned non-zero exit status 2
I really don’t understand what’s going on… How come it says No module named 'distutils.util
when, a few lines above in the build log, I can see:
Get:1 python3-distutils_3.6.9-1~18.04_all.deb [144 kB]
I tried to add python3-distutils
to the build-packages
list in my snapcraft.yaml
file for the qabro
part, but it fails with the same results…
Does anyone know what’s going on?
Thanks!