Skip to content

Commit c318b92

Browse files
author
IvanZosimov
committed
Fix review points
1 parent 72394d1 commit c318b92

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<a href="https://github.com/actions/setup-python"><img alt="GitHub Actions status" src="https://github.com/actions/setup-python/workflows/Main%20workflow/badge.svg"></a>
55
</p>
66

7-
This action provides the following functionalities for GitHub Actions users:
7+
This action provides the following functionality for GitHub Actions users:
88

99
- Optionally installing and adding to PATH a version of Python that is already installed in the runner's tool cache.
1010
- Downloading, installing and adding to PATH an available version of Python from GitHub Releases ([actions/python-versions](https://github.com/actions/python-versions/releases)) if a specific version is not available in the runner's tool cache.
@@ -35,19 +35,19 @@ steps:
3535
python-version: 'pypy3.9'
3636
- run: python my_script.py
3737
```
38-
The `python-version` input is optional. If not supplied, the action will try to resolve the version from the default `.python-version` file. If the `.python-version` file doesn't exist Python/PyPy version from the PATH will be used. The default version of Python/PyPy in PATH varies between runners and can be changed unexpectedly so we recommend always using `setup-python`.
38+
The `python-version` input is optional. If not supplied, the action will try to resolve the version from the default `.python-version` file. If the `.python-version` file doesn't exist Python or PyPy version from the PATH will be used. The default version of Python or PyPy in PATH varies between runners and can be changed unexpectedly so we recommend always using `setup-python`.
3939

4040
The action will first check the local [tool cache](docs/advanced-usage.md#hosted-tool-cache) for a [semver](https://github.com/npm/node-semver#versions) match. If unable to find a specific version in the tool cache, the action will attempt to download a version of Python from [GitHub Releases](https://github.com/actions/python-versions/releases) and for PyPy from the official [PyPy's dist](https://downloads.python.org/pypy/).
4141

42-
For information regarding locally cached versions of Python/PyPy on GitHub hosted runners, check out [GitHub Actions Virtual Environments](https://github.com/actions/virtual-environments).
42+
For information regarding locally cached versions of Python or PyPy on GitHub hosted runners, check out [GitHub Actions Virtual Environments](https://github.com/actions/virtual-environments).
4343

4444
## Supported version syntax
4545

4646
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.
4747

4848
## Supported architectures
4949

50-
Using `architecture` input it is possible to specify the required Python/PyPy interpreter architecture: `x86` or `x64`. If the input is not specified the architecture defaults to `x64`.
50+
Using `architecture` input it is possible to specify the required Python or PyPy interpreter architecture: `x86` or `x64`. If the input is not specified the architecture defaults to `x64`.
5151

5252
## Caching packages dependencies
5353

action.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ description: "Set up a specific version of Python and add the command-line tools
44
author: "GitHub"
55
inputs:
66
python-version:
7-
description: "Version range or exact version of Python/PyPy to use, using SemVer's version range syntax. Reads from .python-version if unset."
7+
description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax. Reads from .python-version if unset."
88
python-version-file:
99
description: "File containing the Python version to use. Example: .python-version"
1010
cache:
1111
description: "Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry."
1212
required: false
1313
architecture:
14-
description: "The target architecture (x86, x64) of the Python/PyPy interpreter."
14+
description: "The target architecture (x86, x64) of the Python or PyPy interpreter."
1515
check-latest:
1616
description: "Set this option if you want the action to check for the latest available version that satisfies the version spec."
1717
default: false
@@ -25,11 +25,11 @@ inputs:
2525
default: true
2626
outputs:
2727
python-version:
28-
description: "The installed Python/PyPy version. Useful when given a version range as input."
28+
description: "The installed Python or PyPy version. Useful when given a version range as input."
2929
cache-hit:
3030
description: "A boolean value to indicate a cache entry was found"
3131
python-path:
32-
description: "The absolute path to the Python/PyPy executable."
32+
description: "The absolute path to the Python or PyPy executable."
3333
runs:
3434
using: 'node16'
3535
main: 'dist/setup/index.js'

docs/advanced-usage.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- [Using `setup-python` with a self-hosted runner](advanced-usage.md#using-setup-python-with-a-self-hosted-runner)
1515
- [Windows](advanced-usage.md#windows)
1616
- [Linux](advanced-usage.md#linux)
17-
- [MacOS](advanced-usage.md#macos)
17+
- [macOS](advanced-usage.md#macos)
1818
- [Using `setup-python` on GHES](advanced-usage.md#using-setup-python-on-ghes)
1919

2020
# Using python-version input
@@ -32,8 +32,8 @@ steps:
3232
- run: python my_script.py
3333
```
3434
35-
- The only downside to this is that set-up will take a little longer since the exact version will have to be downloaded if the exact version is not already installed on the runner due to more recent versions.
36-
- MSI installers are used on Windows for this, so runs will take a little longer to set up vs MacOS and Linux.
35+
- The only downside to this is that setup may take a little longer. If the exact version is not already installed on the runner due to more recent versions, the exact version will have to be downloaded.
36+
- MSI installers are used on Windows for this, so runs will take a little longer to set up vs macOS and Linux.
3737
3838
You can specify **only a major and minor version** if you are okay with the most recent patch version being used:
3939
@@ -131,7 +131,7 @@ More details on PyPy syntax can be found in the [Available versions of PyPy](#py
131131

132132
## Matrix Testing
133133

134-
Using `setup-python` it's possible to use [matrix syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix) to install several versions of Python/PyPy:
134+
Using `setup-python` it's possible to use [matrix syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix) to install several versions of Python or PyPy:
135135

136136
```yaml
137137
jobs:
@@ -178,7 +178,7 @@ jobs:
178178
179179
# Using python-version-file input
180180
181-
`setup-python` action can read Python/PyPy version from a version file. `python-version-file` input is used for specifying the path to the version file. If the file that was supplied to `python-version-file` input doesn't exist, the action will fail with error.
181+
`setup-python` action can read Python or PyPy version from a version file. `python-version-file` input is used for specifying the path to the version file. If the file that was supplied to `python-version-file` input doesn't exist, the action will fail with error.
182182

183183
>In case both `python-version` and `python-version-file` inputs are supplied, the `python-version-file` input will be ignored due to its lower priority.
184184

@@ -192,9 +192,9 @@ steps:
192192
```
193193
# Check latest version
194194

195-
The `check-latest` flag defaults to `false`. Use the default or set `check-latest` to `false` if you prefer stability and if you want to ensure a specific `Python/PyPy` version is always used.
195+
The `check-latest` flag defaults to `false`. Use the default or set `check-latest` to `false` if you prefer stability and if you want to ensure a specific `Python or PyPy` version is always used.
196196

197-
If `check-latest` is set to `true`, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a `Python/PyPy` version will then be downloaded. Set `check-latest` to `true` if you want the most up-to-date `Python/PyPy` version to always be used.
197+
If `check-latest` is set to `true`, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a `Python or PyPy` version will then be downloaded. Set `check-latest` to `true` if you want the most up-to-date `Python or PyPy` version to always be used.
198198

199199
```yaml
200200
steps:
@@ -205,7 +205,7 @@ steps:
205205
check-latest: true
206206
- run: python my_script.py
207207
```
208-
> Setting `check-latest` to `true` has performance implications as downloading `Python/PyPy` versions is slower than using cached versions.
208+
> Setting `check-latest` to `true` has performance implications as downloading `Python or PyPy` versions is slower than using cached versions.
209209

210210

211211
# Caching packages data
@@ -284,7 +284,7 @@ steps:
284284

285285
### `python-version`
286286

287-
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` is 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).
287+
Using **python-version** output it's possible to get the installed by action Python or PyPy version. This output is useful when the input `python-version` is 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).
288288

289289
```yaml
290290
jobs:
@@ -301,7 +301,7 @@ jobs:
301301

302302
### `python-path`
303303

304-
**python-path** output is available with the absolute path of the Python/PyPy interpreter executable if you need it:
304+
**python-path** output is available with the absolute path of the Python or PyPy interpreter executable if you need it:
305305

306306
```yaml
307307
jobs:
@@ -347,10 +347,10 @@ These environment variables become available after setup-python action execution
347347
## Using `update-environment` flag
348348
349349
The `update-environment` flag defaults to `true`.
350-
With this setting, the action will add/update environment variables (e.g. `PATH`, `PKG_CONFIG_PATH`, `pythonLocation`) for Python/PyPy to just work out of the box.
350+
With this setting, the action will add/update environment variables (e.g. `PATH`, `PKG_CONFIG_PATH`, `pythonLocation`) for Python or PyPy to just work out of the box.
351351
352352
If `update-environment` is set to `false`, the action will not add/update environment variables.
353-
This can prove useful if you want the only side-effect to be to ensure Python/PyPy is installed and rely on the `python-path` output to run executable.
353+
This can prove useful if you want the only side-effect to be to ensure Python or PyPy is installed and rely on the `python-path` output to run executable.
354354
Such a requirement on side-effect could be because you don't want your composite action messing with your user's workflows.
355355
356356
```yaml
@@ -378,7 +378,7 @@ Such a requirement on side-effect could be because you don't want your composite
378378
- All available versions are listed in the [version-manifest.json](https://github.com/actions/python-versions/blob/main/versions-manifest.json) file.
379379
- If there is a specific version of Python that is not available, you can open an issue here
380380

381-
>**Note:** Python versions used in this action are generated in the [python-versions](https://github.com/actions/python-versions) repository. For MacOS and Ubuntu images, python versions are built from the source code. For Windows, the python-versions repository uses installation executable. For more information please refer to the [python-versions](https://github.com/actions/python-versions) repository.
381+
>**Note:** Python versions used in this action are generated in the [python-versions](https://github.com/actions/python-versions) repository. For macOS and Ubuntu images, python versions are built from the source code. For Windows, the python-versions repository uses installation executable. For more information please refer to the [python-versions](https://github.com/actions/python-versions) repository.
382382
383383
## PyPy
384384

@@ -447,9 +447,9 @@ One quick way to grant access is to change the user and group of the non-default
447447
> If your runner is configured as a service and you run into problems, make sure the user that the service is running as is correct. For more information, you can [check the status of your self-hosted runner](https://docs.github.com/en/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service#checking-the-status-of-the-service).
448448
449449

450-
## MacOS
450+
## macOS
451451

452-
The Python packages for MacOS that are downloaded from `actions/python-versions` are originally compiled from the source in `/Users/runner/hostedtoolcache`. Due to the fixed shared library path, these Python packages are non-relocatable and require to be installed only in `/Users/runner/hostedtoolcache`. Before the use of `setup-python` on the MacOS self-hosted runner:
452+
The Python packages for macOS that are downloaded from `actions/python-versions` are originally compiled from the source in `/Users/runner/hostedtoolcache`. Due to the fixed shared library path, these Python packages are non-relocatable and require to be installed only in `/Users/runner/hostedtoolcache`. Before the use of `setup-python` on the macOS self-hosted runner:
453453

454454
- Create a directory called `/Users/runner/hostedtoolcache`
455455
- Change the permissions of `/Users/runner/hostedtoolcache` so that the runner has write access

0 commit comments

Comments
 (0)