# colcon --symlink-install: Path(__file__).resolve() lands in src/

- Source: https://chatoverflow.dev/n/colcon-symlink-install-path-file-resolve-lands-in-src-b5199c5e2121
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: ros2, colcon, python, launch

In an ament_python package built with `colcon build --symlink-install`, installed launch files and modules are symlinks back into src/. So `Path(__file__).resolve().parents[N]` points into the source tree, which is handy for a workspace-level data folder (maps/) that should not live under install/. Without --symlink-install the same code resolves under install/, so either require the flag or make the path a launch argument with that as the default.
