← Back to issue list

python package not updating during snap creation

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1815358
Type
issue
State
open
Author
~falko-o
Labels
Created
Updated
Closed

Current evaluation

Snapcraft python plugin fails to rebuild a changed Python package on re-run, keeping the old version; user must flip source-type git/local to force a build. Legacy multipass-VM flow, no maintainer activity in ~7.5 years.

Suggested action: close stale

Reason: The report is 2759 days old with 0 comments and no labels/assignee, and its own output ("Launching a VM", "sudo -i snapcraft snap with 'multipass'", the "--single-version-externally-managed not recognized" error) shows it targets the legacy snapcraft 1.x multipass build flow, which has been superseded by the modern core20/core22/core24 build system. The specific caching/skip behavior and broken pip environment described are artifacts of that retired flow rather than a current bug, so it is both inactive and no longer applicable.

Impact: 30 Quick Win: 18.0 Staleness: 95 Complexity: 40 Confidence: 60 Support Request: 40

Issue body

When I run `snapcraft` it creates a snap package. After I fixed the bug/changed the code I run the `snapcraft` command again but the python package that I build is still in the old version. First time I run ``` Collecting TermCheat Installing collected packages: TermCheat Successfully installed TermCheat-0.1.8 /root/parts/term-cheat/install/usr/bin/python3 setup.py --no-user-cfg install --single-version-externally-managed --user --record install.txt usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: option --single-version-externally-managed not recognized ``` After I update the version in the `setup.py` file the `snapcraft` command does not build the python package again ``` Launching a VM. Skipping pull python-wrapper (already ran) Skipping pull term-cheat (already ran) Skipping build python-wrapper (already ran) Skipping build term-cheat (already ran) Skipping stage python-wrapper (already ran) Skipping stage term-cheat (already ran) Skipping prime python-wrapper (already ran) Skipping prime term-cheat (already ran) Determining the version from the project repo (version: git). The version has been set to '0+git.4eb9359-dirty' The requested action has already been taken. Consider specifying parts, or clean the steps you want to run again. Snapping 'term-cheat' / Snapped term-cheat_0+git.4eb9359-dirty_amd64.snap ``` The I set the `source-type:` from `git` to `local` a new version builds ``` parts: term-cheat: plugin: python source-type: local ``` `snapcraft` output ``` Installing collected packages: TermCheat Successfully installed TermCheat-0.1.9 /root/parts/term-cheat/install/usr/bin/python3 setup.py --no-user-cfg install --single-version-externally-managed --user --record install.txt usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help ``` When now change `setup.py` again and run `snapcraft` a second time I get the following error ``` Successfully built TermCheat ERROR: You must give at least one requirement to install (maybe you meant "pip install /root/parts/term-cheat/python-packages"?) Failed to run '/root/stage/usr/bin/python3 -m pip install --user --no-compile --no-index --find-links /root/parts/term-cheat/python-packages --upgrade --no-deps': 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 snapcraft snap' with 'multipass': returned exit code 2. (term-cheat) ``` Now I set the `source-type` in the `snapcraft.yaml` back to git and it builds the package again but uses an old version ``` Successfully installed TermCheat-0.1.8 /root/parts/term-cheat/install/usr/bin/python3 setup.py --no-user-cfg install --single-version-externally-managed --user --record install.txt usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: option --single-version-externally-managed not recognized ``` I run `snapcraft clean` it removes all installed packages in the vm and I have to reinstall it but it does not update my package. I removed the complete multipass vm and the snapcraft app, no change everything reinstalls but the cached version of the package is used. The only method I found is to switch between `git` and `local` as `source-type`, so I can build the package once. I would also love to know where the package is cached. I was digging around for a while but could not find out where the cache is so I could clean it manually.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 30
Quick Win: 18.0
Staleness: 95
Complexity: 40
Confidence: 60
Support Request: 40
close stale Snapcraft python plugin fails to rebuild a changed Python package on re-run, keeping the old version; user must flip source-type git/local to force a build. Legacy multipass-VM flow, no maintainer activity in ~7.5 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 40
Confidence: 90
Support Request: 60
close stale Snapcraft fails to rebuild Python packages after code changes, persisting old versions despite clean commands. User seeks cache location and workaround.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 30
Confidence: 90
Support Request: 90
close not a bug User reports Snapcraft failing to rebuild a Python package after code changes, suspecting a stale cache. Describes workarounds involving source-type changes and cleaning. No maintainer response in over 7 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 45
Confidence: 90
Support Request: 65
close stale User reports snapcraft fails to rebuild Python packages after version changes, suspecting a cache issue. Issue is inactive for over 7 years and likely irrelevant to current snapcraft versions.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 90
Support Request: 20
close stale Snapcraft incorrectly caches Python packages and fails with a deprecated setuptools flag during rebuilds. The issue remains open after 7.5 years with no maintainer response.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1815667 snapcraft should wipe out existing dependency zips snapcraft (launchpad) open Snapcraft python-packages part fails on second build when a git-based install_requires dependency produces an existing zip, causing pip download to prompt interactively and crash with EOFError. No maintainer activity in 7.5 years.
74%
#1673658 python package failed to install because of directories in the source snapcraft (launchpad) open Snapcraft 2.27.1-era report that the python plugin fails to install packages when the source contains directories, leaving the executable unstaged. No comments, author account deactivated, and the affected version is long obsolete.
71%