This action provides the following functionality for GitHub Actions users:
- Installing a version of Python or PyPy and (by default) adding it to the PATH, including Python 2.7.
The action was developed after GitHub decided to remove support for Python 2.7 from their actions/setup-python
action.
See action.yml
Python
steps:
- uses: actions/checkout@v4
- uses: LizardByte/setup-python-action@master
with:
python-version: '3.10'
- run: python my_script.py
Python 2.7
steps:
- uses: actions/checkout@v4
- uses: LizardByte/setup-python-action@master
with:
python-version: '2.7'
- run: python my_script.py
PyPy
steps:
- uses: actions/checkout@v4
- uses: LizardByte/setup-python-action@master
with:
python-version: 'pypy3.9'
- run: python my_script.py
The python-version
input is required.
If the version of Python is not 2.7
the action will use actions/setup-python
and pass the version to that
action. Otherwise, it will install Python 2.7 on your platform.
The scripts and documentation in this project are released under the MIT License.
Contributions are welcome! See our Contributor's Guide.