summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-04-10 16:13:20 +0000
committerbors <bors@rust-lang.org>2020-04-10 16:13:20 +0000
commit9682f0e14db95076454559a24c26287bcad57955 (patch)
treee8f8398d1dd256915c9154d65f2ec3906eb2bbf5 /src/ci/scripts
parentdbc3cfdd25ccd56edf3ea364f86ab32967636c26 (diff)
parent38eb369fa4d06e55869a8fae62796a7b0085a5bd (diff)
downloadrust-9682f0e14db95076454559a24c26287bcad57955.tar.gz
rust-9682f0e14db95076454559a24c26287bcad57955.zip
Auto merge of #66605 - GuillaumeGomez:drop-python2, r=Mark-Simulacrum
Stop explicitly depending on python 2

This PR revises our previous policy of officially only supporting and testing with python 2 in the CI environment to instead test with python 3. It also changes the defaults to python 3 in our various scripts (usually, by way of `python` rather than `python3` to preserve compatibility with systems that do not have a python 3 available).

The effect of this is that we expect all new patches to support python 3 (and will test as such). We explicitly also expect that patches support python 2.7 as well -- and test as such, though only on one builder. This is intended as a temporary, though likely long-lived, measure to preserve compatibility while looking towards the future which is likely to be a python 3 only world. We do not at this point set a timeline for when we'll drop support for python 2.7; it's plausible that this is months or years into the future, depending on how quickly the ecosystem drops support and how painful it is for us to maintain that support over time.

Closes #65063 (as far as I can tell; please file explicit and separate issues or PRs if not).
Diffstat (limited to 'src/ci/scripts')
-rwxr-xr-xsrc/ci/scripts/install-mingw.sh5
-rwxr-xr-xsrc/ci/scripts/install-msys2-packages.sh6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/ci/scripts/install-mingw.sh b/src/ci/scripts/install-mingw.sh
index 78728dd7d00..ae85d5cab01 100755
--- a/src/ci/scripts/install-mingw.sh
+++ b/src/ci/scripts/install-mingw.sh
@@ -50,8 +50,9 @@ if isWindows; then
     esac
 
     if [[ "${CUSTOM_MINGW-0}" -ne 1 ]]; then
-        pacman -S --noconfirm --needed mingw-w64-$arch-toolchain \
-            mingw-w64-$arch-cmake mingw-w64-$arch-gcc mingw-w64-$arch-python2
+        pacman -S --noconfirm --needed mingw-w64-$arch-toolchain mingw-w64-$arch-cmake \
+            mingw-w64-$arch-gcc \
+            mingw-w64-$arch-python # the python package is actually for python3
         ciCommandAddPath "$(ciCheckoutPath)/msys2/mingw${bits}/bin"
     else
         mingw_dir="mingw${bits}"
diff --git a/src/ci/scripts/install-msys2-packages.sh b/src/ci/scripts/install-msys2-packages.sh
index 22b9854ad5e..3874a86e120 100755
--- a/src/ci/scripts/install-msys2-packages.sh
+++ b/src/ci/scripts/install-msys2-packages.sh
@@ -13,7 +13,7 @@ if isWindows; then
     # one way or another. The msys interpreters seem to have weird path conversions
     # baked in which break LLVM's build system one way or another, so let's use the
     # native version which keeps everything as native as possible.
-    python_home="C:/hostedtoolcache/windows/Python/2.7.17/x64"
-    cp "${python_home}/python.exe" "${python_home}/python2.7.exe"
-    ciCommandAddPath "C:\\hostedtoolcache\\windows\\Python\\2.7.17\\x64"
+    python_home="C:/hostedtoolcache/windows/Python/3.7.6/x64"
+    cp "${python_home}/python.exe" "${python_home}/python3.exe"
+    ciCommandAddPath "C:\\hostedtoolcache\\windows\\Python\\3.7.6\\x64"
 fi