mirror of
https://github.com/actions/setup-python.git
synced 2024-11-21 14:40:58 -05: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
|
||||
- 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
|
||||
|
||||
See [action.yml](action.yml)
|
||||
|
@ -40,7 +30,7 @@ steps:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 'pypy3.7'
|
||||
python-version: 'pypy3.9'
|
||||
- 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`.
|
||||
|
@ -51,7 +41,7 @@ For information regarding locally cached versions of Python/PyPy on GitHub hoste
|
|||
|
||||
## 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
|
||||
|
||||
|
|
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'
|
||||
inputs:
|
||||
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:
|
||||
description: "File containing the Python version to use. Example: .python-version"
|
||||
description: 'File containing the Python version to use. Example: .python-version'
|
||||
cache:
|
||||
description: 'Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry.'
|
||||
required: false
|
||||
architecture:
|
||||
description: 'The target architecture (x86, x64) of the Python interpreter.'
|
||||
description: 'The target architecture (x86, x64) of the Python/PyPy interpreter.'
|
||||
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 }}
|
||||
cache-dependency-path:
|
||||
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
|
||||
outputs:
|
||||
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:
|
||||
description: 'A boolean value to indicate a cache entry was found'
|
||||
python-path:
|
||||
description: "The absolute path to the Python executable."
|
||||
description: 'The absolute path to the Python/PyPy executable.'
|
||||
runs:
|
||||
using: 'node16'
|
||||
main: 'dist/setup/index.js'
|
||||
|
|
|
@ -285,7 +285,7 @@ steps:
|
|||
|
||||
### `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
|
||||
jobs:
|
||||
|
|
Loading…
Reference in a new issue