it's not possible to have two python parts
Metadata
Current evaluation
Fixed by merging snapcraft#1138 in commit 73604a1f0, excluding Python RECORD files so multiple Python parts no longer conflict during staging.
Resolution: closed resolved
Reason: The Python plugin change was merged in snapcraft#1138 at commit 73604a1f0, resolving conflicts caused by differing RECORD files.
Evaluated by: mr-cal-bot
No scores available.
Issue body
With the recent fix for python in classic [1], now each python part installs packages using parts/{part}/install/usr/bin/python. This causes the RECORD files to differ between the parts, and a conflict is caused when trying to put the two parts in the same snap.
To reproduce:
$ git clone https://github.com/snapcore/snapcraft /tmp/snapcraft
$ cd /tmp
$ mkdir bug
$ cd bug
Make in this directory a snapcraft.yaml with two parts that only have:
source: .
plugin: python
(there is one attached)
$ /tmp/snapcraft/bin/snapcraft
Parts 'p1' and 'p2' have the following file paths in common which have different contents:
lib/python3.5/site-packages/pip-9.0.1.dist-info/RECORD
lib/python3.5/site-packages/setuptools-34.1.1.dist-info/RECORD
lib/python3.5/site-packages/wheel-0.29.0.dist-info/RECORD
Snapcraft offers some capabilities to solve this by use of the following keywords:
- `filesets`
- `stage`
- `snap`
- `organize`
Learn more about these part keywords by running `snapcraft help plugins`
[1] https://github.com/snapcore/snapcraft/pull/1093/files
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merging snapcraft#1138 in commit 73604a1f0, excluding Python RECORD files so multiple Python parts no longer conflict during staging. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed the multi-Python-part RECORD collision by excluding Python RECORD files; PR #1138 was merged in commit 73604a1f0. | |
| stealth/space-bunny-alpha | — | closed resolved | Regression from #1093 made each python part install into its own parts/{part}/install prefix, so RECORD files differed and two python parts conflicted. Fixed by merged PR #1138 (commit 73604a1f0) which excludes RECORD files. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by excluding Python package RECORD files, allowing multiple Python parts to share packages without conflicts, in PR #1138 (commit 73604a1f0). | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. A regression caused RECORD file conflicts when using multiple Python parts in a single snap due to a path change. No fix or workaround was implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed with no comments or resolution. The regression caused RECORD file conflicts when using multiple python parts, indicating the issue was likely abandoned or resolved in a later update. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. A regression caused file conflicts when using multiple Python parts due to differing RECORD files, but no fix or resolution was provided. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution or comments. The regression causing RECORD file conflicts between multiple Python parts was abandoned or addressed separately. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcraft#1138
(confidence 100%)
Merged fix excluding Python RECORD files, with commit 73604a1f0.
-
Caused By:
snapcraft#1093
(confidence 95%)
The issue identifies this earlier Python classic-part fix as the source of the regression.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1138 python plugin: exclude the RECORD files | snapcraft | merged | Merged snapcraft#1138 in commit 73604a1f0, excluding Python RECORD files to prevent conflicts between multiple staged Python parts. | |
| #1617907 Two python parts in the same snapcraft.yaml result in not installing the python correctly | snapcraft (launchpad) | open | Snapcraft 2.14 fails when multiple Python parts stage conflicting interpreter files. Similarity to resolved bug #1531570 was disputed, and the old report remains unverified. | |
| #1502105 when two python3 parts are used the pycs give a conflict | snapcraft (launchpad) | closed | Overlapping Python 3 .pyc staging conflicts were fixed in ubuntu-core/snapcraft#50 using Python-plugin snap_fileset filtering; regression coverage was proposed in #109. |