Skip to content

Commit bab21fa

Browse files
authored
Updates PCBuild/readme.txt (#3418)
1 parent cb5b68a commit bab21fa

File tree

1 file changed

+54
-76
lines changed

1 file changed

+54
-76
lines changed

PCbuild/readme.txt

Lines changed: 54 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
Quick Start Guide
22
-----------------
33

4-
1. Install Microsoft Visual Studio 2015, any edition.
4+
1. Install Microsoft Visual Studio 2017 with Python workload and
5+
Python native development component.
56
1a. Optionally install Python 3.6 or later. If not installed,
6-
get_externals.bat (build.bat -e) will download and use Python via
7+
get_externals.bat (via build.bat) will download and use Python via
78
NuGet.
8-
2. Run "build.bat -e" to build Python in 32-bit Release configuration.
9+
2. Run "build.bat" to build Python in 32-bit Release configuration.
910
3. (Optional, but recommended) Run the test suite with "rt.bat -q".
1011

1112

@@ -15,29 +16,14 @@ Building Python using Microsoft Visual C++
1516
This directory is used to build CPython for Microsoft Windows NT version
1617
6.0 or higher (Windows Vista, Windows Server 2008, or later) on 32 and 64
1718
bit platforms. Using this directory requires an installation of
18-
Microsoft Visual C++ 2015 (MSVC 14.0) of any edition. The specific
19-
requirements are as follows:
20-
21-
Visual Studio Express 2015 for Desktop
22-
Visual Studio Professional 2015
23-
Either edition is sufficient for building all configurations except
24-
for Profile Guided Optimization.
25-
The Python build solution pcbuild.sln makes use of Solution Folders,
26-
which this edition does not support. Any time pcbuild.sln is opened
27-
or reloaded by Visual Studio, a warning about Solution Folders will
28-
be displayed, which can be safely dismissed with no impact on your
29-
ability to build Python.
30-
Required for building 64-bit Debug and Release configuration builds
31-
Visual Studio Premium 2015
32-
Required for building Release configuration builds that make use of
33-
Profile Guided Optimization (PGO), on either platform.
34-
35-
All you need to do to build is open the solution "pcbuild.sln" in Visual
36-
Studio, select the desired combination of configuration and platform,
37-
then build with "Build Solution". You can also build from the command
38-
line using the "build.bat" script in this directory; see below for
39-
details. The solution is configured to build the projects in the correct
40-
order.
19+
Microsoft Visual Studio 2017 (MSVC 14.1) with the *Python workload* and
20+
its optional *Python native development* component selected. (For
21+
command-line builds, Visual Studio 2015 may also be used.)
22+
23+
Building from the command line is recommended in order to obtain any
24+
external dependencies. To build, simply run the "build.bat" script without
25+
any arguments. After this succeeds, you can open the "pcbuild.sln"
26+
solution in Visual Studio to continue development.
4127

4228
The solution currently supports two platforms. The Win32 platform is
4329
used to build standard x86-compatible 32-bit binaries, output into the
@@ -71,8 +57,8 @@ Building Python using the build.bat script
7157

7258
In this directory you can find build.bat, a script designed to make
7359
building Python on Windows simpler. This script will use the env.bat
74-
script to detect one of Visual Studio 2015, 2013, 2012, or 2010, any of
75-
which may be used to build Python, though only Visual Studio 2015 is
60+
script to detect either Visual Studio 2017 or 2015, either of
61+
which may be used to build Python. Currently Visual Studio 2017 is
7662
officially supported.
7763

7864
By default, build.bat will build Python in Release configuration for
@@ -83,13 +69,14 @@ this behavior, try `build.bat -h` to learn more.
8369
C Runtime
8470
---------
8571

86-
Visual Studio 2015 uses version 14 of the C runtime (MSVCRT14). The
87-
executables no longer use the "Side by Side" assemblies used in previous
88-
versions of the compiler. This simplifies distribution of applications.
72+
Visual Studio 2017 uses version 14.0 of the C runtime (vcruntime140).
73+
The executables no longer use the "Side by Side" assemblies used in
74+
previous versions of the compiler. This simplifies distribution of
75+
applications.
8976

90-
The run time libraries are available under the VC/Redist folder of your
77+
The run time libraries are available under the redist folder of your
9178
Visual Studio distribution. For more info, see the Readme in the
92-
VC/Redist folder.
79+
redist folder.
9380

9481

9582
Sub-Projects
@@ -129,6 +116,8 @@ categories:
129116
_freeze_importlib
130117
_freeze_importlib.exe, used to regenerate Python\importlib.h after
131118
changes have been made to Lib\importlib\_bootstrap.py
119+
pyshellext
120+
pyshellext.dll, the shell extension deployed with the launcher
132121
python3dll
133122
python3.dll, the PEP 384 Stable ABI dll
134123
xxlimited
@@ -138,6 +127,7 @@ xxlimited
138127
The following sub-projects are for individual modules of the standard
139128
library which are implemented in C; each one builds a DLL (renamed to
140129
.pyd) of the same name as the project:
130+
_asyncio
141131
_ctypes
142132
_ctypes_test
143133
_decimal
@@ -147,9 +137,12 @@ _msi
147137
_multiprocessing
148138
_overlapped
149139
_socket
150-
_testcapi
151140
_testbuffer
141+
_testcapi
142+
_testconsole
152143
_testimportmultiple
144+
_testmultiphase
145+
_tkinter
153146
pyexpat
154147
select
155148
unicodedata
@@ -171,62 +164,47 @@ _lzma
171164
http://tukaani.org/xz/
172165
_ssl
173166
Python wrapper for version 1.0.2k of the OpenSSL secure sockets
174-
library, which is built by ssl.vcxproj
167+
library, which is downloaded from our binaries repository at
168+
https://github.com/python/cpython-bin-deps.
169+
175170
Homepage:
176171
http://www.openssl.org/
177172

178-
Building OpenSSL requires nasm.exe (the Netwide Assembler), version
179-
2.10 or newer from
180-
http://www.nasm.us/
181-
to be somewhere on your PATH. More recent versions of OpenSSL may
182-
need a later version of NASM. If OpenSSL's self tests don't pass,
183-
you should first try to update NASM and do a full rebuild of
184-
OpenSSL. If you use the PCbuild\get_externals.bat method
185-
for getting sources, it also downloads a version of NASM which the
186-
libeay/ssleay sub-projects use.
187-
188-
The libeay/ssleay sub-projects expect your OpenSSL sources to have
189-
already been configured and be ready to build. If you get your sources
190-
from svn.python.org as suggested in the "Getting External Sources"
191-
section below, the OpenSSL source will already be ready to go. If
192-
you want to build a different version, you will need to run
193-
194-
PCbuild\prepare_ssl.py path\to\openssl-source-dir
195-
196-
That script will prepare your OpenSSL sources in the same way that
197-
those available on svn.python.org have been prepared. Note that
198-
Perl must be installed and available on your PATH to configure
199-
OpenSSL. ActivePerl is recommended and is available from
200-
http://www.activestate.com/activeperl/
201-
202-
The libeay and ssleay sub-projects will build the modules of OpenSSL
203-
required by _ssl and _hashlib and may need to be manually updated when
204-
upgrading to a newer version of OpenSSL or when adding new
205-
functionality to _ssl or _hashlib. They will not clean up their output
206-
with the normal Clean target; CleanAll should be used instead.
173+
Building OpenSSL requires Perl on your path, and can be performed by
174+
running PCbuild\prepare_ssl.bat. This will retrieve the version of
175+
the sources matched to the current commit from the OpenSSL branch
176+
in our source repository at
177+
https://github.com/python/cpython-source-deps.
178+
179+
To use an alternative build of OpenSSL completely, you should replace
180+
the files in the externals/openssl-bin-<version> folder with your own.
181+
As long as this folder exists, its contents will not be downloaded
182+
again when building.
183+
207184
_sqlite3
208185
Wraps SQLite 3.14.2.0, which is itself built by sqlite3.vcxproj
209186
Homepage:
210187
http://www.sqlite.org/
211188
_tkinter
212-
Wraps version 8.6.6 of the Tk windowing system.
189+
Wraps version 8.6.6 of the Tk windowing system, which is downloaded
190+
from our binaries repository at
191+
https://github.com/python/cpython-bin-deps.
192+
213193
Homepage:
214194
http://www.tcl.tk/
215195

216-
Tkinter's dependencies are built by the tcl.vcxproj and tk.vcxproj
217-
projects. The tix.vcxproj project also builds the Tix extended
218-
widget set for use with Tkinter.
196+
Building Tcl and Tk can be performed by running
197+
PCbuild\prepare_tcltk.bat. This will retrieve the version of the
198+
sources matched to the current commit from the Tcl and Tk branches
199+
in our source repository at
200+
https://github.com/python/cpython-source-deps.
219201

220-
Those three projects install their respective components in a
202+
The two projects install their respective components in a
221203
directory alongside the source directories called "tcltk" on
222204
Win32 and "tcltk64" on x64. They also copy the Tcl and Tk DLLs
223205
into the current output directory, which should ensure that Tkinter
224206
is able to load Tcl/Tk without having to change your PATH.
225207

226-
The tcl, tk, and tix sub-projects do not clean their builds with
227-
the normal Clean target; if you need to rebuild, you should use the
228-
CleanAll target or manually delete their builds.
229-
230208

231209
Getting External Sources
232210
------------------------
@@ -254,8 +232,8 @@ as the values of certain properties in order for the build solution to
254232
find them. This is an advanced topic and not necessarily fully
255233
supported.
256234

257-
The get_externals.bat script is called automatically by build.bat when
258-
you pass the '-e' option to it.
235+
The get_externals.bat script is called automatically by build.bat
236+
unless you pass the '-E' option.
259237

260238

261239
Profile Guided Optimization
@@ -298,7 +276,7 @@ carefully modified by hand.
298276
The property files used are:
299277
* python (versions, directories and build names)
300278
* pyproject (base settings for all projects)
301-
* openssl (used by libeay and ssleay projects)
279+
* openssl (used by projects dependent upon OpenSSL)
302280
* tcltk (used by _tkinter, tcl, tk and tix projects)
303281

304282
The pyproject property file defines all of the build settings for each

0 commit comments

Comments
 (0)