actions / actions/setup-python

Associate .py with python on Windows

Open
#900 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
2.2k
Forks
739
Avg merge
6d 18h
Merged PRs (30d)
1

Description

Description:
Associate .py with python on Windows when running actions/setup-python@v4

Justification:
I want to test that my .py have executable permission set relying on shebang line. That passes on Ubuntu. Windows doesn't care about file permissions set by git, but it has a different mechanism:
https://docs.python.org/3/faq/windows.html#how-do-i-make-python-scripts-executable

On Windows, the standard Python installer already associates the .py extension with a file type (Python.File) and gives that file type an open command that runs the interpreter (D:\Program Files\Python\python.exe "%1" %*).

and https://docs.python.org/3/using/windows.html#from-file-associations:

The launcher should have been associated with Python files (i.e. .py, .pyw, .pyc files) when it was installed.

Apparently that doesn't happen when using actions/setup-python@v4

Are you willing to submit a PR?
No

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Windows setup path for actions/setup-python@v4 and review the linked Python documentation on Windows file associations. Confirm how the action currently installs or exposes Python, then verify that a .py script using a shebang can run in a Windows action; done means the association works consistently there.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.