|
64 | 64 | echo 1>&2 "Python interpreter $PYTHON not available" |
65 | 65 | exit 1 |
66 | 66 | fi |
67 | | - - name: Show Python versions |
68 | | - run: | |
69 | | - set -o errexit -o nounset -o pipefail |
70 | | -
|
71 | | - # macOS builders lack a realpath command |
72 | | - type python && python -c"import os.path;print(os.path.realpath('$(type -p python)'))" && python --version |
73 | | - type python2 && python2 -c"import os.path;print(os.path.realpath('$(type -p python2)'))" && python2 --version |
74 | | - type python3 && python3 -c"import os.path;print(os.path.realpath('$(type -p python3)'))" && python3 --version |
75 | | - echo |
76 | | -
|
77 | | - if [ -e /usr/bin/python ]; then |
78 | | - echo "/usr/bin/python: sys.executable: $(/usr/bin/python -c 'import sys; print(sys.executable)')" |
79 | | - fi |
80 | | -
|
81 | | - if [ -e /usr/bin/python2 ]; then |
82 | | - echo "/usr/bin/python2: sys.executable: $(/usr/bin/python2 -c 'import sys; print(sys.executable)')" |
83 | | - fi |
84 | | -
|
85 | | - if [ -e /usr/bin/python2.7 ]; then |
86 | | - echo "/usr/bin/python2.7: sys.executable: $(/usr/bin/python2.7 -c 'import sys; print(sys.executable)')" |
87 | | - fi |
| 67 | + - run: .ci/show_python_versions |
88 | 68 | - name: Install tooling |
89 | 69 | run: | |
90 | 70 | set -o errexit -o nounset -o pipefail |
@@ -186,27 +166,7 @@ jobs: |
186 | 166 |
|
187 | 167 | sudo apt-get update |
188 | 168 | sudo apt-get install -y sshpass virtualenv |
189 | | - - name: Show Python versions |
190 | | - run: | |
191 | | - set -o errexit -o nounset -o pipefail |
192 | | -
|
193 | | - # macOS builders lack a realpath command |
194 | | - type python && python -c"import os.path;print(os.path.realpath('$(type -p python)'))" && python --version |
195 | | - type python2 && python2 -c"import os.path;print(os.path.realpath('$(type -p python2)'))" && python2 --version |
196 | | - type python3 && python3 -c"import os.path;print(os.path.realpath('$(type -p python3)'))" && python3 --version |
197 | | - echo |
198 | | -
|
199 | | - if [ -e /usr/bin/python ]; then |
200 | | - echo "/usr/bin/python: sys.executable: $(/usr/bin/python -c 'import sys; print(sys.executable)')" |
201 | | - fi |
202 | | -
|
203 | | - if [ -e /usr/bin/python2 ]; then |
204 | | - echo "/usr/bin/python2: sys.executable: $(/usr/bin/python2 -c 'import sys; print(sys.executable)')" |
205 | | - fi |
206 | | -
|
207 | | - if [ -e /usr/bin/python2.7 ]; then |
208 | | - echo "/usr/bin/python2.7: sys.executable: $(/usr/bin/python2.7 -c 'import sys; print(sys.executable)')" |
209 | | - fi |
| 169 | + - run: .ci/show_python_versions |
210 | 170 | - name: Install tooling |
211 | 171 | run: | |
212 | 172 | set -o errexit -o nounset -o pipefail |
@@ -262,32 +222,7 @@ jobs: |
262 | 222 | with: |
263 | 223 | python-version: ${{ matrix.python_version }} |
264 | 224 | if: ${{ matrix.python_version }} |
265 | | - - name: Show Python versions |
266 | | - run: | |
267 | | - set -o errexit -o nounset -o pipefail |
268 | | -
|
269 | | - # macOS builders lack a realpath command |
270 | | - type python && python -c"import os.path;print(os.path.realpath('$(type -p python)'))" && python --version |
271 | | - type python2 && python2 -c"import os.path;print(os.path.realpath('$(type -p python2)'))" && python2 --version |
272 | | - type python3 && python3 -c"import os.path;print(os.path.realpath('$(type -p python3)'))" && python3 --version |
273 | | - echo |
274 | | -
|
275 | | - if [ -e /usr/bin/python ]; then |
276 | | - echo "/usr/bin/python: sys.executable: $(/usr/bin/python -c 'import sys; print(sys.executable)')" |
277 | | - fi |
278 | | -
|
279 | | - if [ -e /usr/bin/python2 ]; then |
280 | | - echo "/usr/bin/python2: sys.executable: $(/usr/bin/python2 -c 'import sys; print(sys.executable)')" |
281 | | - fi |
282 | | -
|
283 | | - if [ -e /usr/bin/python2.7 ]; then |
284 | | - echo "/usr/bin/python2.7: sys.executable: $(/usr/bin/python2.7 -c 'import sys; print(sys.executable)')" |
285 | | - fi |
286 | | -
|
287 | | - if [ -e /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 ]; then |
288 | | - # GitHub macOS 12 images: python2.7 is installed, but not on $PATH |
289 | | - echo "/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7: sys.executable: $(/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 -c 'import sys; print(sys.executable)')" |
290 | | - fi |
| 225 | + - run: .ci/show_python_versions |
291 | 226 | - run: .ci/install_sshpass ${{ matrix.sshpass_version }} |
292 | 227 | if: ${{ matrix.sshpass_version }} |
293 | 228 | - name: Install tooling |
|
0 commit comments