Skip to content

Fix python files failing is executable on windows - #577

Open
gftabor wants to merge 1 commit into
ros2:rollingfrom
gftabor:patch-1
Open

gftabor wants to merge 1 commit into
ros2:rollingfrom
gftabor:patch-1

Conversation

@gftabor

@gftabor gftabor commented Sep 20, 2026

Copy link
Copy Markdown

Description

The original check for if a file is executable fails on windows because windows doesn't consider python files as executable. Pure python packages using setup.py generate .exe's but cmake packages only copy .py files.

This is paired with
ros2/launch#1010

to actually make the python file execute correctly.

Fixes # (issue)

Is this user-facing behavior change?

Did you use Generative AI?

The edit was suggested by chatGPT after looking at what ros2run did differently.

Additional Information

The alternative much worse solution is to edit the environment variable windows uses to list executable file types, but handling python directly here is better.

set PATHEXT=%PATHEXT%;.PY

Signed-off-by: Griffin Tabor <tabor473@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant