When using the python
plugin, running the snapcraft build twice in a row will result in a failure to build because of a prompt from pip. Here is the output I’m getting:
$ snapcraft --debug
Launching a VM.
snap "snapd" has no updates available
Updating pull step for joinmarket (source changed)
Obtaining file:///root/project/jmbase (from -r /root/parts/joinmarket/build/requirements/base.txt (line 1))
The file /root/parts/joinmarket/python-packages/joinmarketbase-0.6.1.zip exists. (i)gnore, (w)ipe, (b)ackup, (a)bort ERROR: Exception:
Traceback (most recent call last):
File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/commands/download.py", line 135, in run
resolver.resolve(requirement_set)
File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 265, in _get_abstract_dist_for
return self.preparer.prepare_editable_requirement(req)
File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 559, in prepare_editable_requirement
req.archive(self.download_dir)
File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 721, in archive
display_path(archive_path), ('i', 'w', 'b', 'a'))
File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 223, in ask_path_exists
return ask(message, options)
File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 241, in ask
response = input(message)
EOFError: EOF when reading a line
Failed to run '/root/stage/usr/bin/python3 -m pip download --disable-pip-version-check --dest /root/parts/joinmarket/python-packages --requirement /root/parts/joinmarket/build/requirements/gui.txt': Exited with code 2.
Here is my snapcraft.yml. I’m trying to get it working for the https://github.com/JoinMarket-Org/joinmarket-clientserver project.
name: joinmarket
base: core18
version: master
summary: Software to assist in creating bitcoin CoinJoin transactions
description: |
JoinMarket is software to create a special kind of bitcoin transaction called a CoinJoin transaction. It's aim is to improve the confidentiality and privacy of bitcoin transactions.
confinement: devmode
grade: devel
#icon: icon.png
apps:
joinmarket-qt:
extensions:
- kde-neon
command: echo "Nothing here"
plugs:
- network
- network-bind
- desktop
- desktop-legacy
- x11
- wayland
- home
parts:
joinmarket:
plugin: python
source: .
requirements:
- requirements/gui.txt
prime:
- build
organize:
build: opt/joinmarket
Should I report this as a bug? The only workarounds I have found are snapcraft clean joinmarket
to remove the part, or entering the container and deleting the *.zip
files which are already built.