catkin plugin: check for pip packages in part only
Metadata
Current evaluation
Catkin pip detection was fixed by using pip list --user, preventing sitecustomize.py from being generated for packages pulled by other parts; PR #1717 merged as 5d4222a63.
Resolution: closed resolved
Reason: PR #1717 was merged and committed as 5d4222a63. The change limits detection to pip packages installed by the Catkin part and fixes LP #1730248.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
Currently the Catkin plugin generates a sitecustomize.py if:
1. pip is setup
2. pip packages have been pulled
This is good in theory, but pip will be considered setup even if it's only available in the staging area, and `pip list` will return packages in the staging area, which means Catkin will pretty much try to generate a sitecustomize.py if there are any Python parts in the snap, even if it doesn't use pip itself.
This PR fixes LP: [#1730248](https://bugs.launchpad.net/snapcraft/+bug/1730248) by making sure it checks `pip list --user` rather than just `pip list`. This will ensure it only looks for pip packages installed by the Catkin part rather than all parts in the snap.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Catkin pip detection was fixed by using pip list --user, preventing sitecustomize.py from being generated for packages pulled by other parts; PR #1717 merged as 5d4222a63. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1717 (5d4222a63) fixed Catkin’s pip detection with `pip list --user`, preventing sitecustomize.py generation for packages pulled by other parts. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for the Catkin plugin to check for pip packages only in the current part using pip list --user instead of globally. Resolves LP #1730248, prevents incorrect sitecustomize.py generation, and cuts test runtime. Approved by three reviewers and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Catkin plugin now uses pip list --user to detect packages, avoiding staging false positives. Resolves LP: 1730248 by ensuring sitecustomize.py is only generated for Catkin-installed packages. Approved after passing tests. |
Update history
No update history recorded yet.
Related work
-
Related To:
Launchpad#1730248
(confidence 100%)
The PR body explicitly identifies this Launchpad bug as fixed.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1730248 catkin part error when built after python part | snapcraft (launchpad) | closed | Fixed the Catkin-after-Python sitecustomize failure by checking only pip packages installed by the Catkin part; merged in snapcraft#1717 (5d4222a63). |