|
21 | 21 |
|
22 | 22 | ## Specifying a Python version
|
23 | 23 |
|
24 |
| -If there is a specific version of Python that you need and you don't want to worry about any potential breaking changes due to patch updates (going from `3.7.5` to `3.7.6` for example), you should specify the **exact major, minor, and patch version** (such as `3.7.5`): |
| 24 | +- If there is a specific version of Python that you need and you don't want to worry about any potential breaking changes due to patch updates (going from `3.7.5` to `3.7.6` for example), you should specify the **exact major, minor, and patch version** (such as `3.7.5`): |
25 | 25 |
|
26 | 26 | ```yaml
|
27 | 27 | steps:
|
|
34 | 34 | - 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.
|
35 | 35 | - MSI installers are used on Windows for this, so runs will take a little longer to set up vs MacOS and Linux.
|
36 | 36 |
|
37 |
| -You can specify **only a major and minor version** if you are okay with the most recent patch version being used: |
| 37 | +- You can specify **only a major and minor version** if you are okay with the most recent patch version being used: |
38 | 38 |
|
39 | 39 | ```yaml
|
40 | 40 | steps:
|
|
48 | 48 | - The patch version that will be preinstalled, will generally be the latest and every time there is a new patch released, the older version that is preinstalled will be replaced.
|
49 | 49 | - Using the most recent patch version will result in a very quick setup since no downloads will be required since a locally installed version of Python on the runner will be used.
|
50 | 50 |
|
51 |
| -You can specify the version with **prerelease tag** to download and set up an accurate pre-release version of Python: |
| 51 | +- You can specify the version with **prerelease tag** to download and set up an accurate pre-release version of Python: |
52 | 52 |
|
53 | 53 | ```yaml
|
54 | 54 | steps:
|
|
59 | 59 | - run: python my_script.py
|
60 | 60 | ```
|
61 | 61 |
|
62 |
| -It's also possible to use **x.y-dev syntax** to download and set up the latest patch version of Python, alpha and beta releases included. (for specified major & minor versions): |
| 62 | +- It's also possible to use **x.y-dev syntax** to download and set up the latest patch version of Python, alpha and beta releases included. (for specified major & minor versions): |
63 | 63 |
|
64 | 64 | ```yaml
|
65 | 65 | steps:
|
|
70 | 70 | - run: python my_script.py
|
71 | 71 | ```
|
72 | 72 |
|
73 |
| -You can also use several types of ranges that are specified in [semver](https://github.com/npm/node-semver#ranges), for instance: |
| 73 | +- You can also use several types of ranges that are specified in [semver](https://github.com/npm/node-semver#ranges), for instance: |
74 | 74 |
|
75 |
| -- **[hyphen ranges](https://github.com/npm/node-semver#hyphen-ranges-xyz---abc)** to download and set up the latest available version of Python (includes both pre-release and stable versions): |
| 75 | + - **[hyphen ranges](https://github.com/npm/node-semver#hyphen-ranges-xyz---abc)** to download and set up the latest available version of Python (includes both pre-release and stable versions): |
76 | 76 |
|
77 | 77 | ```yaml
|
78 | 78 | steps:
|
|
83 | 83 | - run: python my_script.py
|
84 | 84 | ```
|
85 | 85 |
|
86 |
| -- **[x-ranges](https://github.com/npm/node-semver#x-ranges-12x-1x-12-)** to specify the latest stable version of Python (for specified major version): |
| 86 | + - **[x-ranges](https://github.com/npm/node-semver#x-ranges-12x-1x-12-)** to specify the latest stable version of Python (for specified major version): |
87 | 87 |
|
88 | 88 | ```yaml
|
89 | 89 | steps:
|
|
0 commit comments