Skip to content

Commit 3c5322d

Browse files
authored
[docs] Deprecate Python 2 in Windows build instructions (#33819)
1 parent 9685179 commit 3c5322d

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

docs/WindowsBuild.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ The commands below (with the exception of installing Visual Studio) must be ente
88

99
### Visual Studio
1010

11-
An easy way to get most of the tools to build Swift is using the [Visual Studio installer](https://www.visualstudio.com/downloads/). This command installs all needed Visual Studio components as well as Python and Git:
11+
An easy way to get most of the tools to build Swift is using the [Visual Studio installer](https://www.visualstudio.com/downloads/). This command installs all needed Visual Studio components as well as Python, Git, CMake and Ninja:
1212

1313
```
1414
vs_community ^
15-
--add Component.CPython2.x86 ^
1615
--add Component.CPython3.x64 ^
1716
--add Microsoft.VisualStudio.Component.Git ^
1817
--add Microsoft.VisualStudio.Component.VC.ATL ^
@@ -28,13 +27,7 @@ The following [link](https://docs.microsoft.com/visualstudio/install/workload-co
2827

2928
### Python
3029

31-
The command above already installs Python 2 and 3. Alternatively, in the Visual Studio installation program, under *Individual Components*
32-
33-
1. Install *Python 2*, either the 32-bit version (C:\Python27\\) or the 64-bit version (C:\Python27amd64\\)
34-
35-
**Note:** If you install the 64-bit version only, you will need to adjust `PYTHON_EXECUTABLE` below to `C:\Python27amd64\python.exe`
36-
37-
2. Install *Python 3 64 bits (3.7.x)*
30+
The command above already installs Python 3. Alternatively, in the Visual Studio installation program, under *Individual Components*, install *Python 3 64 bits (3.7.x)*.
3831

3932
If you are building a debug version of Swift, you should also install the Python debug binaries.
4033

@@ -137,9 +130,6 @@ cmake -B "S:\b\toolchain" ^
137130
ninja -C S:\b\toolchain
138131
```
139132

140-
**Note:** If you installed only the 64-bit version of Python, you will need to adjust `PYTHON_EXECUTABLE` argument to `C:\Python27amd64\python.exe`
141-
142-
143133
## Running Swift tests on Windows
144134

145135
```cmd
@@ -176,7 +166,7 @@ path S:\b\foundation\Foundation;%PATH%
176166
## Build swift-corelibs-xctest
177167

178168
```cmd
179-
cmake -B S:\b\xctest -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_Swift_COMPILER=S:/b/toolchain/bin/swiftc.exe -D dispatch_DIR=S:\b\dispatch\cmake\modules -D Foundation_DIR=S:\b\foundation\cmake\modules -D LIT_COMMAND=S:\toolchain\llvm\utils\lit\lit.py -D PYTHON_EXECUTABLE=C:\Python27\python.exe -G Ninja -S S:\swift-corelibs-xctest
169+
cmake -B S:\b\xctest -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_Swift_COMPILER=S:/b/toolchain/bin/swiftc.exe -D dispatch_DIR=S:\b\dispatch\cmake\modules -D Foundation_DIR=S:\b\foundation\cmake\modules -D LIT_COMMAND=S:\toolchain\llvm\utils\lit\lit.py -G Ninja -S S:\swift-corelibs-xctest
180170
ninja -C S:\b\xctest
181171
```
182172

0 commit comments

Comments
 (0)