Skip to content

Fork actions/setup-python as Quansight-Labs/setup-python #107

Open

Description

While we wait for GitHub to review the PRs to support free-threaded Python (actions/setup-python#973, actions/python-versions#319), Quansight Labs can host a fork of setup-python that supports it. Here are the steps:

python-versions

  1. Fork actions/python-versions into the Quansight-Labs org. Make sure GitHub actions are enabled in the fork.

  2. Merge the five commits from the colesbury/python-versions quansight branch into the main branch of the new fork. In addition to the changes from my upstream PR, this branch has a few modifications to make it work outside of the actions organization, and to merge versions from upstream actions/python-versions (so that we don't have to rebuild every single Python version).

  3. Run the "Build Python Package" step at https://github.com/Quansight-Labs/python-versions/actions/workflows/build-python-packages.yml with the following options. This will take ~30 minutes:

    Branch: main
    Python version: 3.13.0
    Whether to publish releases: Yes (IMPORTANT!)
    CPython threading build modes: freethreaded
    Platforms: ubuntu-20.04,ubuntu-22.04,ubuntu-24.04,macos-13_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86

(Only the "publish releases" needs to be changed -- the other options should be the same as the defaults)

This will take about 30 minutes and automatically publish a 3.13.0 release on the fork.

  1. Merge the automatically opened PR once the build process completes. This will update the versions-manifest.json file.

setup-python

  1. Fork actions/setup-python into the Quansight-Labs org. Make sure GitHub actions are enabled in the fork.
  2. Merge the two commits from the colesbury/setup-python quansight branch into the main branch of the new fork. In addition to the changes from my upstream PR, this branch changes the organization (for versions-manifest.json) to Quansight-Labs.
  3. Create a release (from https://github.com/Quansight-Labs/setup-python/releases). Name it something like v5.3.1, so that the major version (v5) stays the same as in upstream. This will automatically set the v5 tag as long.

Usage

Projects should be able to swap actions/setup-python with Quansight-Labs/setup-python and hopefully everything will "just work". Free threaded Pythons will be pulled from Quansight-Labs/python-versions while non-free threaded versions should continue working without any extra changes.

cc @rgommers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions