You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-32Lines changed: 9 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,6 @@ This action wraps around [actions/setup-python](https://github.com/actions/setup
13
13
-[Table of contents](#table-of-contents)
14
14
-[Basic usage](#basic-usage)
15
15
-[Motivation](#motivation)
16
-
-[But why? It's deprecated: just use a more recent version](#but-why-its-deprecated-just-use-a-more-recent-version)
17
-
-[But why a dedicated action? Just use `ubuntu-20.04` for that 1 job](#but-why-a-dedicated-action-just-use-ubuntu-2004-for-that-1-job)
18
16
-[Guarantees](#guarantees)
19
17
-[Known limits](#known-limits)
20
18
-[Performance](#performance)
@@ -23,6 +21,7 @@ This action wraps around [actions/setup-python](https://github.com/actions/setup
23
21
-[allow-build input](#allow-build-input)
24
22
-[Outputs](#outputs)
25
23
-[FAQ](#faq)
24
+
-[No file in (...) matched to \[\*\*/requirements.txt or \*\*/pyproject.toml\], make sure you have checked out the target repository](#no-file-in--matched-to-requirementstxt-or-pyprojecttoml-make-sure-you-have-checked-out-the-target-repository)
26
25
-[Contributing](#contributing)
27
26
28
27
## Basic usage
@@ -33,54 +32,32 @@ In general you could replace the original action with this one and it should alr
33
32
```yaml
34
33
- uses: MatteoH2O1999/setup-python@v3
35
34
with:
36
-
python-version: '3.6'
35
+
python-version: '3.8'
37
36
```
38
37
39
38
But if you wish for a more optimized experience you could use inputs exclusive to this action:
40
39
41
40
```yaml
42
41
- uses: MatteoH2O1999/setup-python@v3
43
42
with:
44
-
python-version: '3.6'
43
+
python-version: '3.8'
45
44
allow-build: info
46
45
cache-build: true
47
46
cache: pip
48
47
```
49
48
50
49
## Motivation
51
50
52
-
Since the replacement of `ubuntu-20.04` with `ubuntu-22.04` runner images [actions/setup-python](https://github.com/actions/setup-python) no longer supports `Python 3.6` for the `ubuntu-latest` label.
53
-
This broke a large number of pipelines as Python 3.6 is still widely used.
51
+
While initially this action was meant to guarantee a successful build of all CPython versions `2.7`, it has now become too complex to maintain it.
54
52
55
-
This made apparent that a way to support deprecated versions was needed.
56
-
57
-
### But why? It's deprecated: just use a more recent version
58
-
59
-
Yes, in a perfect world that would be the go to solution.
60
-
Unfortunately, we do not live in that world, so we can't always choose our dependencies.
61
-
In fact, I would be willing to bet that most deprecated dependencies are there despite the developers, not because of them.
62
-
That is why this action came about: to offer an easier way to continue supporting deprecated builds even if github does not anymore.
63
-
64
-
### But why a dedicated action? Just use `ubuntu-20.04` for that 1 job
65
-
66
-
Once again, that is possible, but that is
67
-
68
-
1. not good practice as editing the main job matrix will not edit the "special" one;
69
-
2. a pain to maintain as each new deprecated version needs another job to be created.
53
+
The new objective of this action is to provide a buffer when something gets yanked out by Github, as this will guarantee that if the pair `(label, version)` works, it will keep working.
54
+
Older versions may still work, but no effort will be spent in ensuring so.
70
55
71
56
## Guarantees
72
57
73
-
The objective of this action is to guarantee that for every major Python version starting from `2.7` at least one specific version can be successfully installed on the `...-latest` images using the default architecture.
74
-
75
-
TLDR: If you use the major version specification (`3.6` instead of `3.6.5`) without specifying the architecture as shown in [Basic usage](#basic-usage) this action is guaranteed to work (hopefully...😉) on all the `...-latest` labels.
76
-
77
-
### Exceptions
58
+
The objective of this action is to guarantee that for every major Python version starting from `3.7` at least one specific version can be successfully installed on the `...-latest` images using the default architecture.
78
59
79
-
Python versions < 3.5 are too difficult to build from source on Windows.
80
-
For these versions the action tries to use the official installer from [python.org](https://www.python.org/ftp/python).
81
-
If this fails, the action fails with an appropriate error message.
82
-
In this case you should request a version for which [python.org](https://www.python.org/ftp/python) offers a binary installer, and not just the source code.
83
-
On the positive side, every version of Python 2.7 has a binary installer so it shouldn't be a problem.
60
+
TLDR: If you use the major version specification (`3.7` instead of `3.7.5`) without specifying the architecture as shown in [Basic usage](#basic-usage) this action is guaranteed to work (hopefully...😉) on all the `...-latest` labels.
84
61
85
62
## Known limits
86
63
@@ -159,7 +136,7 @@ This action will emit the following outputs:
159
136
160
137
## FAQ
161
138
162
-
#### No file in (...) matched to [**/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository
139
+
### No file in (...) matched to [**/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository
163
140
164
141
This is a byproduct of [actions/setup-python](https://github.com/actions/setup-python).
165
142
If you wish to cache your pip dependencies, you need to have anywhere in your repository a `requirements.txt` or a `pyproject.toml` file.
0 commit comments