mirror of
https://github.com/actions/setup-python.git
synced 2024-11-22 14:48:36 +00:00
Fix review points
This commit is contained in:
parent
09086ccd46
commit
61fb4e42ab
3 changed files with 9 additions and 19 deletions
14
README.md
14
README.md
|
@ -10,16 +10,6 @@ This action provides the following functionality for GitHub Actions users:
|
||||||
- Optionally caching dependencies for pip, pipenv and poetry
|
- Optionally caching dependencies for pip, pipenv and poetry
|
||||||
- Registering problem matchers for error output
|
- Registering problem matchers for error output
|
||||||
|
|
||||||
## Table of contents
|
|
||||||
|
|
||||||
- [Basic usage](#basic-usage)
|
|
||||||
- [Supported version syntax](#supported-version-syntax)
|
|
||||||
- [Supported architectures](#supported-architectures)
|
|
||||||
- [Caching packages dependencies](#caching-packages-dependencies)
|
|
||||||
- [Advanced usage](#advanced-usage)
|
|
||||||
- [License](#license)
|
|
||||||
- [Contributions](#contributions)
|
|
||||||
|
|
||||||
## Basic usage
|
## Basic usage
|
||||||
|
|
||||||
See [action.yml](action.yml)
|
See [action.yml](action.yml)
|
||||||
|
@ -40,7 +30,7 @@ steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 'pypy3.7'
|
python-version: 'pypy3.9'
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
The `python-version` input is optional. If not supplied, the Python/PyPy version from the PATH will be used. The default version of Python/PyPy in PATH vary between runners and can be changed unexpectedly so we recommend always use `setup-python`.
|
The `python-version` input is optional. If not supplied, the Python/PyPy version from the PATH will be used. The default version of Python/PyPy in PATH vary between runners and can be changed unexpectedly so we recommend always use `setup-python`.
|
||||||
|
@ -51,7 +41,7 @@ For information regarding locally cached versions of Python/PyPy on GitHub hoste
|
||||||
|
|
||||||
## Supported version syntax
|
## Supported version syntax
|
||||||
|
|
||||||
The `python-version` input supports the [Semantic Versioning Specification](https://semver.org/) and some special version notations (e.g. `semver ranges`, `x.y-dev syntax`, etc), for detailed examples please refer to the section: [Using python-version input](docs/advanced-usage.md#using-python-version-input) of the [Advanced usage](docs/advanced-usage.md) guide.
|
The `python-version` input supports the [Semantic Versioning Specification](https://semver.org/) and some special version notations (e.g. `semver ranges`, `x.y-dev syntax`, etc.), for detailed examples please refer to the section: [Using python-version input](docs/advanced-usage.md#using-python-version-input) of the [Advanced usage](docs/advanced-usage.md) guide.
|
||||||
|
|
||||||
## Supported architectures
|
## Supported architectures
|
||||||
|
|
||||||
|
|
12
action.yml
12
action.yml
|
@ -4,16 +4,16 @@ description: 'Set up a specific version of Python and add the command-line tools
|
||||||
author: 'GitHub'
|
author: 'GitHub'
|
||||||
inputs:
|
inputs:
|
||||||
python-version:
|
python-version:
|
||||||
description: "Version range or exact version of Python to use, using SemVer's version range syntax."
|
description: 'Version range or exact version of Python/PyPy to use, using SemVer's version range syntax.'
|
||||||
python-version-file:
|
python-version-file:
|
||||||
description: "File containing the Python version to use. Example: .python-version"
|
description: 'File containing the Python version to use. Example: .python-version'
|
||||||
cache:
|
cache:
|
||||||
description: 'Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry.'
|
description: 'Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry.'
|
||||||
required: false
|
required: false
|
||||||
architecture:
|
architecture:
|
||||||
description: 'The target architecture (x86, x64) of the Python interpreter.'
|
description: 'The target architecture (x86, x64) of the Python/PyPy interpreter.'
|
||||||
token:
|
token:
|
||||||
description: Used to pull python distributions from actions/python-versions. Since there's a default, this is typically not supplied by the user.
|
description: 'Used to pull python distributions from actions/python-versions. Since there's a default, this is typically not supplied by the user.'
|
||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
cache-dependency-path:
|
cache-dependency-path:
|
||||||
description: 'Used to specify the path to dependency files. Supports wildcards or a list of file names for caching multiple dependencies.'
|
description: 'Used to specify the path to dependency files. Supports wildcards or a list of file names for caching multiple dependencies.'
|
||||||
|
@ -22,11 +22,11 @@ inputs:
|
||||||
default: true
|
default: true
|
||||||
outputs:
|
outputs:
|
||||||
python-version:
|
python-version:
|
||||||
description: "The installed Python version. Useful when given a version range as input."
|
description: 'The installed Python/PyPy version. Useful when given a version range as input.'
|
||||||
cache-hit:
|
cache-hit:
|
||||||
description: 'A boolean value to indicate a cache entry was found'
|
description: 'A boolean value to indicate a cache entry was found'
|
||||||
python-path:
|
python-path:
|
||||||
description: "The absolute path to the Python executable."
|
description: 'The absolute path to the Python/PyPy executable.'
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node16'
|
||||||
main: 'dist/setup/index.js'
|
main: 'dist/setup/index.js'
|
||||||
|
|
|
@ -285,7 +285,7 @@ steps:
|
||||||
|
|
||||||
### `python-version`
|
### `python-version`
|
||||||
|
|
||||||
Using **python-version** output it's possible to get the installed by action Pytho/PyPy version. This output is useful when the input `python-version` given as a range (e.g. 3.8.0 - 3.10.0 ), but down in a workflow you need to operate with the exact installed version (e.g. 3.10.1).
|
Using **python-version** output it's possible to get the installed by action Python/PyPy version. This output is useful when the input `python-version` given as a range (e.g. 3.8.0 - 3.10.0 ), but down in a workflow you need to operate with the exact installed version (e.g. 3.10.1).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
|
|
Loading…
Reference in a new issue