A look at ytdl-org/setup-python: 9 stars on GitHub, written primarily in PowerShell. Set up your GitHub Actions workflow with a specific version of Python including deprecated ones.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This action wraps around actions/setup-python allowing for deprecated CPython versions to be built from source instead of leading to a failure while appearing transparent in all other cases.
Table of contents
Build and Setup Python
Table of contents
Basic usage
Motivation
But why? It's deprecated: just use a more recent version
But why a dedicated action? Just use ubuntu-20.04 for that 1 job
Guarantees
Known limits
Performance
Security guarantees
Inputs
allow-build input
Outputs
Contributing
Basic usage
For a more complete view on the actions see action.yml or look in the Inputs and Outputs sections.
In general you could replace the original action with this one and it should already work (all its supported inputs are also supported in this one):
Since the replacement of ubuntu-20.04 with ubuntu-22.04 runner images actions/setup-python no longer supports Python 3.6 for the ubuntu-latest label.
This broke a large number of pipelines as Python 3.6 is still widely used.
This made apparent that a way to support deprecated versions was needed.
But why? It's deprecated: just use a more recent version
Yes, in a perfect world that would be the go to solution.
Unfortunately, we do not live in that world, so we can't always choose our dependencies.
In fact, I would be willing to bet that most deprecated dependencies are there despite the developers, not because of them.
That is why this action came about: to offer an easier way to continue supporting deprecated builds even if github does not anymore.
But why a dedicated action? Just use ubuntu-20.04 for that 1 job
Once again, that is possible, but that is
not good practice as editing the main job matrix will not edit the "special" one;
a pain to maintain as each new deprecated version needs another job to be created.
Guarantees
The objective of this action is to guarantee that for every major Python version starting from 2.7 at least one specific version can be successfully installed on the ...-latest images using the default architecture.
TLDR: If you use the major version specification (3.6 instead of 3.6.5) without specifying the architecture as shown in Basic usage this action is guaranteed to work (hopefully...😉) on all the ...-latest labels.
Known limits
This action at the moment does not support:
installing multiple Python versions;
building PyPy from source;
building from source in UNIX systems for a different architecture
This actions tries to but does not guarantee to work on any arbitrary pair (python-version, architecture).
Performance
The action's performance depends on the runner OS and on whether Python needs to be built, installed, restored from cache or is already installed:
Supported by actions/setup-python
Already installed on runner
ubuntu-latest → ~10s
windows-latest → ~20s
macos-latest → ~10s
Available from actions/python-versions
ubuntu-latest → ~20s
windows-latest → ~1m
macos-latest → ~30s
Not supported by actions/setup-python
Already cached
ubuntu-latest → ~20s
windows-latest → ~30s
macos-latest → ~30s
Built from source
ubuntu-latest → ~3m30s
windows-latest → ~25m
macos-latest → ~13m
Security guarantees
This action is composite and uses the original actions/setup-python and a custom action MatteoH2O1999/build-and-install-python.
Both are referenced by commit hash in order to provide better security: if you use this action using its commit hash it will be safe from future malicious edits to the tags.
Inputs
This action supports the following inputs (in bold are the names of the exclusive inputs for this action):
Input name
Description
Accepted values
Default value
python-version
Version range or exact version of Python or PyPy to use, using SemVer's version range syntax. Reads from .python-version if both this and python-version-file are unset.
pypy3.7, pypy-3.9, 3.5, 2.7.6, ...
None
python-version-file
File containing the Python version to use. Reads from .python-version if both this and python-version are unset.
.python-version, path/to/python/version, ...
None
cache
Used to specify a package manager for caching in the default directory.
pip, pipenv and poetry
None
architecture
The target architecture of the Python or PyPy interpreter.
x64, x86, arm64, ...
None
check-latest
Set this option if you want the action to check for the latest available version that satisfies the version spec.
false, true
false
token
The token used to authenticate when fetching Python distributions from actions/python-versions. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
example: TokenString
github.token
cache-dependency-path
Used to specify the path to dependency files. Supports wildcards or a list of file names for caching multiple dependencies.
example: path/to/dependency/files
''
update-environment
Set this option if you want the action to update environment variables.
true, false
true
cache-build
Whether to cache the built Python distribution to speed up successive runs.
true, false
false
allow-build
Set the behavior of the action when actions/setup-python fails and has to be built from source.
allow, info, warn, error, force
warn
allow-build input
This action can apply for different behaviors when it tries to install a CPython version not supported by actions/setup-python:
error this emulates actions/setup-python and throws an error (thus failing the job) if the Python version cannot be downloaded from actions/python-versions;
warn(default) this will proceed to build the specified version of CPython but will still throw a warning. This was chosen as the default behavior as the user may not know a deprecated version has been requested;
info this will build from source and only print to the logs the fact that a specific Python version will be built from source;
allow same as info but does not even print to logs the fact that CPython will be built from source;
force this will force Python to be built from source regardless of whether actions/setup-python supports it or not.
Outputs
This action will emit the following outputs:
Output name
Description
python-version
The installed Python or PyPy version. Useful when given a version range as input.
cache-hit
A boolean value to indicate a cache entry was found (for pip, pipenv and poetry).
python-path
The absolute path to the Python or PyPy executable.
Contributing
This action is pretty much only a wrapper for a javascript action.
Any issue you might encounter with this action is probably caused by MatteoH2O1999/build-and-install-python.
If you wish to contribute, you should do so there.
Does ytdl-org/setup-python have a project website?
No homepage URL was recorded for ytdl-org/setup-python in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Does ytdl-org/setup-python have any tags?
TopGit's last sync did not record any GitHub topics for ytdl-org/setup-python. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on ytdl-org/setup-python?
The most recent commit recorded on ytdl-org/setup-python was 2.3 years ago, based on the GitHub push timestamp. The repository has 4 forks — one of the better signals of community interest.
Is ytdl-org/setup-python open source?
Yes — ytdl-org/setup-python ships under the AGPL-3.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/ytdl-org/setup-python.
What license does ytdl-org/setup-python use?
ytdl-org/setup-python is released under the AGPL-3.0 license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about ytdl-org/setup-python?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/ytdl-org/setup-python is the definitive source.
Read full README in the tab above.
Curious whether setup-python is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about setup-python.