← Back to issue list

catkin part error when built after python part

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1730248
Type
issue
State
closed
Author
~mrjogo
Labels
—
Created
Updated
Closed

Current evaluation

Fixed the Catkin-after-Python sitecustomize failure by checking only pip packages installed by the Catkin part; merged in snapcraft#1717 (5d4222a63).

Resolution: closed resolved

Reason: Merged PR snapcraft#1717, commit 5d4222a63, scoped Catkin's pip detection to the current part, preventing erroneous sitecustomize generation when pip was installed by an earlier Python part.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When snapping the attached example with the snapcraft master branch (currently https://github.com/snapcore/snapcraft/tree/52e03e5e46d88809f706fb4f45e6556710d576ba), it fails with the error: Unable to find user site packages: /home/ruddick/Downloads/snapcraft_ros_example/parts/ros-project/install/lib/python2*/site-packages The cause is the following new code since 2.34: https://github.com/snapcore/snapcraft/blob/52e03e5e46d88809f706fb4f45e6556710d576ba/snapcraft/plugins/catkin.py#L652-L657 It fails because self._pip.is_setup() uses stage to see if pip is installed, which it was in the pip-install part, but _python.generate_sitecustomize() operates on parts/ros-project/install, which does not have any python code or site-packages directory.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed the Catkin-after-Python sitecustomize failure by checking only pip packages installed by the Catkin part; merged in snapcraft#1717 (5d4222a63).
stealth/space-bunny-alpha — closed resolved Fixed Catkin sitecustomize generation after a Python part by checking only pip packages installed in the Catkin part; merged in canonical/snapcraft#1717 (5d4222a63).
stealth/space-bunny-alpha — closed resolved Catkin plugin generated a sitecustomize against a part lacking Python code, causing "Unable to find user site packages" when a catkin part followed a python/pip part. Fixed by merged PR #1717 (commit 5d4222a63), scoping the check to pip packages pulled in the part itself.
stealth/space-bunny-alpha — closed resolved Fixed in snapcore/snapcraft#1717 (commit 5d4222a63), which restricts the catkin plugin's pip check to the current part, preventing a false positive from a previously built Python part.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The catkin plugin failed when built after a Python part due to incorrect path validation in is_setup() and generate_sitecustomize(), which checked the stage and install directories respectively.
qwen/qwen3.6-35b-a3b — — Abandoned. A snapcraft bug caused catkin parts built after python parts to fail when locating site-packages in the wrong directory. No fix was implemented.
qwen/qwen3.6-35b-a3b — — Closed without resolution. A path resolution bug in generate_sitecustomize() caused catkin builds to fail when built after python parts. No fix or discussion was provided.
qwen3.6-35b-a3b-mtp-q6 — — Closed without stated resolution. A snapcraft catkin plugin bug was identified where site-packages path resolution fails when building after a python part, caused by incorrect pip setup checks.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#1717 (confidence 100%)

    The merged PR changed Catkin pip detection to avoid considering packages installed by other parts.

Related issues

Issue Project State Summary Similarity
#1717 catkin plugin: check for pip packages in part only snapcraft merged 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.
78%