mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-09 21:02:19 +02:00
Merge branch 'actions:main' into feature/tool-versions-file-support
This commit is contained in:
commit
e34c938f7b
8 changed files with 226 additions and 35 deletions
|
@ -77,6 +77,31 @@ steps:
|
|||
- run: python my_script.py
|
||||
```
|
||||
|
||||
You can specify the [free threading](https://docs.python.org/3/howto/free-threading-python.html) version of Python by setting the `freethreaded` input to `true` or by using the special **t** suffix in some cases.
|
||||
You can use the **t** suffix when specifying the major and minor version (e.g., `3.13t`), with a patch version (e.g., `3.13.1t`), or with the **x.y-dev syntax** (e.g., `3.14t-dev`).
|
||||
Free threaded Python is only available starting with the 3.13 release.
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13t'
|
||||
- run: python my_script.py
|
||||
```
|
||||
|
||||
Note that the **t** suffix is not `semver` syntax. If you wish to specify a range, you must use the `freethreaded` input instead of the `t` suffix.
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '>=3.13'
|
||||
freethreaded: true
|
||||
- run: python my_script.py
|
||||
```
|
||||
|
||||
You can also use several types of ranges that are specified in [semver](https://github.com/npm/node-semver#ranges), for instance:
|
||||
|
||||
- **[ranges](https://github.com/npm/node-semver#ranges)** to download and set up the latest available version of Python satisfying a range:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue