Skip to content

Commit 41b7212

Browse files
Update README.md (actions#145)
1 parent 878156f commit 41b7212

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

Diff for: README.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
This action sets up a Python environment for use in actions by:
88

9-
- optionally installing and adding to PATH a version of Python that is already installed in the tools cache
10-
- 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 tools cache
11-
- failing if a specific version of Python is not preinstalled or available for download
12-
- registering problem matchers for error output
9+
- optionally installing and adding to PATH a version of Python that is already installed in the tools cache.
10+
- 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 tools cache.
11+
- failing if a specific version of Python is not preinstalled or available for download.
12+
- registering problem matchers for error output.
1313

1414
# What's new
1515

16-
- Ability to download, install and set up Python packages from `actions/python-versions` that do not come preinstalled on runners
17-
- Allows for pinning to a specific patch version of Python without the worry of it ever being removed or changed
18-
- Automatic setup and download of Python packages if using a self-hosted runner
19-
- Support for pre-release versions of Python
16+
- Ability to download, install and set up Python packages from `actions/python-versions` that do not come preinstalled on runners.
17+
- Allows for pinning to a specific patch version of Python without the worry of it ever being removed or changed.
18+
- Automatic setup and download of Python packages if using a self-hosted runner.
19+
- Support for pre-release versions of Python.
2020

2121
# Usage
2222

@@ -122,14 +122,14 @@ Check out our detailed guide on using [Python with GitHub Actions](https://help.
122122
123123
`setup-python` is able to configure Python from two sources:
124124

125-
- Preinstalled versions of Python in the tools cache on GitHub-hosted runners
125+
- Preinstalled versions of Python in the tools cache on GitHub-hosted runners.
126126
- For detailed information regarding the available versions of Python that are installed see [Supported software](https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners#supported-software).
127127
- For every minor version of Python, expect only the latest patch to be preinstalled.
128128
- If `3.8.1` is installed for example, and `3.8.2` is released, expect `3.8.1` to be removed and replaced by `3.8.2` in the tools cache.
129129
- If the exact patch version doesn't matter to you, specifying just the major and minor version will get you the latest preinstalled patch version. In the previous example, the version spec `3.8` will use the `3.8.2` Python version found in the cache.
130-
- Downloadable Python versions from GitHub Releases ([actions/python-versions](https://github.com/actions/python-versions/releases))
130+
- Downloadable Python versions from GitHub Releases ([actions/python-versions](https://github.com/actions/python-versions/releases)).
131131
- All available versions are listed in the [version-manifest.json](https://github.com/actions/python-versions/blob/main/versions-manifest.json) file.
132-
- If there is a specific version of Python that is not available, you can open an issue here
132+
- If there is a specific version of Python that is not available, you can open an issue here.
133133

134134
# Hosted Tool Cache
135135

@@ -174,22 +174,22 @@ If you are experiencing problems while configuring Python on your self-hosted ru
174174

175175
- The Python packages that are downloaded from `actions/python-versions` are originally compiled from source in `/opt/hostedtoolcache/` with the [--enable-shared](https://github.com/actions/python-versions/blob/94f04ae6806c6633c82db94c6406a16e17decd5c/builders/ubuntu-python-builder.psm1#L35) flag, which makes them non-relocatable.
176176
- Create an environment variable called `AGENT_TOOLSDIRECTORY` and set it to `/opt/hostedtoolcache`. This controls where the runner downloads and installs tools.
177-
- In the same shell that your runner is using, type `export AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache`
177+
- In the same shell that your runner is using, type `export AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache`.
178178
- A more permanent way of setting the environment variable is to create a `.env` file in the same directory as your runner and to add `AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache`. This ensures the variable is always set if your runner is configured as a service.
179179
- Create a directory called `hostedtoolcache` inside `/opt`.
180180
- The user starting the runner must have write permission to the `/opt/hostedtoolcache` directory. It is not possible to start the Linux runner with `sudo` and the `/opt` directory usually requires root privileges to write to. Check the current user and group that the runner belongs to by typing `ls -l` inside the runners root directory.
181181
- The runner can be granted write access to the `/opt/hostedtoolcache` directory using a few techniques:
182-
- The user starting the runner is the owner, and the owner has write permission
183-
- The user starting the runner is in the owning group, and the owning group has write permission
184-
- All users have write permission
185-
- One quick way to grant access is to change the user and group of `/opt/hostedtoolcache` to be the same as the runners using `chown`
186-
- `sudo chown runner-user:runner-group opt/hostedtoolcache/`
182+
- The user starting the runner is the owner, and the owner has write permission.
183+
- The user starting the runner is in the owning group, and the owning group has write permission.
184+
- All users have write permission.
185+
- One quick way to grant access is to change the user and group of `/opt/hostedtoolcache` to be the same as the runners using `chown`.
186+
- `sudo chown runner-user:runner-group opt/hostedtoolcache/`.
187187
- 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://help.github.com/en/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service#checking-the-status-of-the-service).
188188

189189
### Mac
190190

191191
- The same setup that applies to `Linux` also applies to `Mac`, just with a different tools cache directory.
192-
- Create a directory called `/Users/runner/hostedtoolcache`
192+
- Create a directory called `/Users/runner/hostedtoolcache`.
193193
- Set the `AGENT_TOOLSDIRECTORY` environment variable to `/Users/runner/hostedtoolcache`.
194194
- Change the permissions of `/Users/runner/hostedtoolcache` so that the runner has write access.
195195

@@ -200,8 +200,8 @@ If you are experiencing problems while configuring Python on your self-hosted ru
200200

201201
# License
202202

203-
The scripts and documentation in this project are released under the [MIT License](LICENSE)
203+
The scripts and documentation in this project are released under the [MIT License](LICENSE).
204204

205205
# Contributions
206206

207-
Contributions are welcome! See our [Contributor's Guide](docs/contributors.md)
207+
Contributions are welcome! See our [Contributor's Guide](docs/contributors.md).

0 commit comments

Comments
 (0)