← Back to issue list

Two python3 parts using setuptools are always conflicting on core22

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2080356
Type
issue
State
open
Author
~gbeuzeboc
Labels
—
Created
Updated
Closed
—

Current evaluation

Two python plugin parts always collide on core22 because each part's venv embeds its own install path in bin/activate*, __pycache__ and RECORD; only workaround is manual stage exclusions. No maintainer response.

Suggested action: needs triage

Reason: The report is a genuine, reproducible limitation with a full snapcraft.yaml reproducer and the exact collision error text, but it has 0 comments, no labels and no assignee, so it has never been assessed by a maintainer. Confirmed unfixed: snapcraft's PythonPlugin is only a thin subclass of craft_parts.python_plugin.PythonPlugin (no activate/RECORD/__pycache__ handling exists in this repo) and git log shows no resolving commit. Impact is moderate because a manual `stage:` exclusion workaround exists and does not break existing snaps, but complexity is high since a proper fix now likely belongs upstream in craft-parts and requires deciding how venvs should be shared or collision-exempted. Needs triage primarily to route ownership (snapcraft vs craft-parts) and confirm whether a workaround should be documented instead.

Evaluated by: mr-cal-bot

Impact: 42 Quick Win: 10 Complexity: 65 Confidence: 76 Actionability: 70

Issue body

Two python3 parts using setuptools are always conflicting. This is due to the venv files as well as the __pycache__ files that are based on different paths. It seems basic to embed two projects in one snapcraft.yaml, but is not possible without having to play with the stage keyword. Starting from the basic example of the doc and adding a hello world found on GH gives: snapcraft.yaml: name: liquidctl base: core22 summary: a status and control utility to for power, cooling and LED components description: | ... adopt-info: liquidctl grade: stable confinement: strict apps: liquidctl: command: bin/liquidctl plugs: - raw-usb - uhid - hardware-observe parts: liquidctl: plugin: python source-type: git source: https://github.com/liquidctl/liquidctl override-pull: | snapcraftctl pull snapcraftctl set-version \ "$(git describe --long --tags --always --match=v*.*.* | sed 's/v//')" stage-packages: - python3-usb hello-world: plugin: python source-type: git source: https://github.com/buildbot/hello-world Building this snap fails due to "parts 'liquidctl' and 'hello-world' list the following files, but with different contents or permissions" regarding the following files: bin/activate bin/activate.fish bin/activate.csh A lot of the __pycache__/*.pyc files some .dist-info/RECORD files All of that is due to the fact that both parts have virtual environment located in different path. Only solution I could find is using stage: - -bin/activate* - -**/__pycache__/* - -**/RECORD Additionally, specifying a SNAPCRAFT_PYTHON_VENV_ARGS in one of the part will result in an additional conflict. Maybe such behaviour could be handled nicely by the python plugin.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 42
Quick Win: 10
Complexity: 65
Confidence: 76
Actionability: 70
needs triage Two python plugin parts always collide on core22 because each part's venv embeds its own install path in bin/activate*, __pycache__ and RECORD; only workaround is manual stage exclusions. No maintainer response.
stealth/space-bunny-alpha
Impact: 48
Quick Win: 9
Complexity: 71
Confidence: 65
Actionability: 64
needs triage Two Python parts on core22 collide on shared venv and installed-package files; manual stage exclusions avoid the error, but no maintainer triage is recorded.
qwen3.6-35b-a3b-mtp-q6
Impact: 55
Quick Win: 30
Staleness: 85
Complexity: 45
Confidence: 55
Support Request: 25
needs triage Multiple python3 parts in core22 conflict on venv and __pycache__ files; untriaged feature request for better handling
qwen/qwen3.6-35b-a3b
Staleness: 92
Complexity: 65
Confidence: 85
Support Request: 20
needs triage Two Python parts using setuptools conflict on core22 due to differing venv and pycache paths. Unlabelled, zero maintainer comments, inactive for 680 days.
qwen/qwen3.6-35b-a3b
Staleness: 92
Complexity: 70
Confidence: 75
Support Request: 10
needs triage Technical bug report detailing path conflicts when packaging two Python setuptools parts in Snapcraft. Issue remains unlabelled and unassessed by maintainers after 1.8 years of inactivity.
qwen3.6-35b-a3b-mtp-q6
Staleness: 92
Complexity: 60
Confidence: 75
Support Request: 20
needs triage Two python3 parts using the snapcraft python plugin conflict on core22 due to overlapping venv, pycache, and dist-info files. Untriaged, inactive for over 1.8 years, no maintainer response.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1882535 [focal/core20][python3.7+] staging conflicts when multiple python parts have the same python dependencies snapcraft (launchpad) open Overlapping Python dependencies generate nondeterministic bytecode, RECORD, and venv artifacts that block staging; confirmed to affect multiple users, with workarounds but no complete fix.
71%