• Home
Name Date Size #Lines LOC

..--

_bsddb.vcxprojD03-May-202416.1 KiB315314

_bsddb.vcxproj.filtersD03-May-202428.8 KiB703702

_ctypes.vcxprojD03-May-20244.6 KiB108107

_ctypes.vcxproj.filtersD03-May-20242.3 KiB6665

_ctypes_test.vcxprojD03-May-20243 KiB7877

_ctypes_test.vcxproj.filtersD03-May-2024719 2221

_elementtree.vcxprojD03-May-20244.4 KiB104103

_elementtree.vcxproj.filtersD03-May-20242.5 KiB7372

_hashlib.vcxprojD03-May-20243.7 KiB9190

_hashlib.vcxproj.filtersD03-May-2024437 1413

_msi.vcxprojD03-May-20243.1 KiB8180

_msi.vcxproj.filtersD03-May-2024424 1413

_multiprocessing.vcxprojD03-May-20243.6 KiB8988

_multiprocessing.vcxproj.filtersD03-May-20241.3 KiB3736

_socket.vcxprojD03-May-20243.2 KiB8483

_socket.vcxproj.filtersD03-May-2024703 2221

_sqlite3.vcxprojD03-May-20244.5 KiB108107

_sqlite3.vcxproj.filtersD03-May-20242.5 KiB7372

_ssl.vcxprojD03-May-20243.9 KiB9594

_ssl.vcxproj.filtersD03-May-2024429 1413

_testcapi.vcxprojD03-May-20243.1 KiB8180

_testcapi.vcxproj.filtersD03-May-2024440 1413

_tkinter.vcxprojD03-May-20243.6 KiB9190

_tkinter.vcxproj.filtersD03-May-2024535 1716

build.batD03-May-20245.2 KiB148134

build_env.batD03-May-202426 21

build_pgo.batD03-May-2024146 75

bz2.vcxprojD03-May-20243.8 KiB9796

bz2.vcxproj.filtersD03-May-20241.7 KiB4948

clean.batD03-May-2024131 64

env.batD03-May-2024999 2420

field3.pyD03-May-2024974 3617

get_externals.batD03-May-20243.1 KiB10893

idle.batD03-May-2024299 1611

installer.bmpD03-May-202457.4 KiB

libeay.vcxprojD03-May-202445.3 KiB908620

openssl.propsD03-May-20243.6 KiB7566

pcbuild.projD03-May-20243.9 KiB8667

pcbuild.slnD03-May-202440.5 KiB537536

prepare_ssl.pyD03-May-20246.3 KiB202143

pyexpat.vcxprojD03-May-20243.5 KiB8584

pyexpat.vcxproj.filtersD03-May-20241.1 KiB3433

pyproject.propsD03-May-20249 KiB161145

python.propsD03-May-20247 KiB11974

python.vcxprojD03-May-20244.7 KiB110108

python.vcxproj.filtersD03-May-2024823 2726

pythoncore.vcxprojD03-May-202420.4 KiB412410

pythoncore.vcxproj.filtersD03-May-202430.8 KiB954953

pythonw.vcxprojD03-May-20243.7 KiB8784

pythonw.vcxproj.filtersD03-May-2024703 2221

readme.txtD03-May-202412.9 KiB315255

rmpyc.pyD03-May-2024598 2618

rt.batD03-May-20242 KiB6152

select.vcxprojD03-May-20243.1 KiB8079

select.vcxproj.filtersD03-May-2024437 1413

sqlite3.vcxprojD03-May-20243.1 KiB7877

sqlite3.vcxproj.filtersD03-May-2024805 2524

ssleay.vcxprojD03-May-20244.8 KiB12095

tcl.vcxprojD03-May-20243.5 KiB9182

tcltk.propsD03-May-20242.8 KiB4441

tix.vcxprojD03-May-20243.6 KiB9586

tk.vcxprojD03-May-20243.6 KiB9688

unicodedata.vcxprojD03-May-20243.2 KiB8483

unicodedata.vcxproj.filtersD03-May-2024811 2524

w9xpopen.vcxprojD03-May-20243.1 KiB7877

w9xpopen.vcxproj.filtersD03-May-2024428 1413

winsound.vcxprojD03-May-20243.1 KiB8079

winsound.vcxproj.filtersD03-May-2024501 1514

readme.txt

1Quick Start Guide
2-----------------
3
41.  Install Microsoft Visual Studio 2008, any edition.
52.  Install Microsoft Visual Studio 2010, any edition, or Windows SDK 7.1
6    and any version of Microsoft Visual Studio newer than 2010.
73.  Install Subversion, and make sure 'svn.exe' is on your PATH.
84.  Run "build.bat -e" to build Python in 32-bit Release configuration.
95.  (Optional, but recommended) Run the test suite with "rt.bat -q".
10
11
12Building Python using MSVC 9.0 via MSBuild
13------------------------------------------
14
15This directory is used to build Python for Win32 and x64 platforms, e.g.
16Windows 2000 and later.  In order to use the project files in this
17directory, you must have installed the MSVC 9.0 compilers, the v90
18PlatformToolset project files for MSBuild, and MSBuild version 4.0 or later.
19The easiest way to make sure you have all of these components is to install
20Visual Studio 2008 and Visual Studio 2010.  Another configuration proven
21to work is Visual Studio 2008, Windows SDK 7.1, and Visual Studio 2013.
22
23If you only have Visual Studio 2008 available, use the project files in
24../PC/VS9.0 which are fully supported and specifically for VS 2008.
25
26If you do not have Visual Studio 2008 available, you can use these project
27files to build using a different version of MSVC.  For example, use
28
29   PCbuild\build.bat "/p:PlatformToolset=v100"
30
31to build using MSVC10 (Visual Studio 2010).
32
33***WARNING***
34Building Python 2.7 for Windows using any toolchain that doesn't link
35against MSVCRT90.dll is *unsupported* as the resulting python.exe will
36not be able to use precompiled extension modules that do link against
37MSVCRT90.dll.
38
39For other Windows platforms and compilers, see ../PC/readme.txt.
40
41All you need to do to build is open the solution "pcbuild.sln" in Visual
42Studio, select the desired combination of configuration and platform,
43then build with "Build Solution".  You can also build from the command
44line using the "build.bat" script in this directory; see below for
45details.  The solution is configured to build the projects in the correct
46order.
47
48The solution currently supports two platforms.  The Win32 platform is
49used to build standard x86-compatible 32-bit binaries, output into this
50directory.  The x64 platform is used for building 64-bit AMD64 (aka
51x86_64 or EM64T) binaries, output into the amd64 sub-directory.  The
52Itanium (IA-64) platform is no longer supported.
53
54Four configuration options are supported by the solution:
55Debug
56    Used to build Python with extra debugging capabilities, equivalent
57    to using ./configure --with-pydebug on UNIX.  All binaries built
58    using this configuration have "_d" added to their name:
59    python27_d.dll, python_d.exe, parser_d.pyd, and so on.  Both the
60    build and rt (run test) batch files in this directory accept a -d
61    option for debug builds.  If you are building Python to help with
62    development of CPython, you will most likely use this configuration.
63PGInstrument, PGUpdate
64    Used to build Python in Release configuration using PGO, which
65    requires Professional Edition of Visual Studio 2008.  See the
66    "Profile Guided Optimization" section below for more information.
67    Build output from each of these configurations lands in its own
68    sub-directory of this directory.  The official Python releases may
69    be built using these configurations.
70Release
71    Used to build Python as it is meant to be used in production
72    settings, though without PGO.
73
74
75Building Python using the build.bat script
76----------------------------------------------
77
78In this directory you can find build.bat, a script designed to make
79building Python on Windows simpler.  This script will use the env.bat
80script to detect one of Visual Studio 2015, 2013, 2012, or 2010, any of
81which contains a usable version of MSBuild.
82
83By default, build.bat will build Python in Release configuration for
84the 32-bit Win32 platform.  It accepts several arguments to change
85this behavior, try `build.bat -h` to learn more.
86
87
88Legacy support
89--------------
90
91You can find build directories for older versions of Visual Studio and
92Visual C++ in the PC directory.  The project files in PC/VS9.0/ are
93specific to Visual Studio 2008, and will be fully supported for the life
94of Python 2.7.
95
96The following legacy build directories are no longer maintained and may
97not work out of the box.
98
99PC/VC6/
100    Visual C++ 6.0
101PC/VS7.1/
102    Visual Studio 2003 (7.1)
103PC/VS8.0/
104    Visual Studio 2005 (8.0)
105
106
107C Runtime
108---------
109
110Visual Studio 2008 uses version 9 of the C runtime (MSVCRT9).  The executables
111are linked to a CRT "side by side" assembly which must be present on the target
112machine.  This is available under the VC/Redist folder of your visual studio
113distribution. On XP and later operating systems that support
114side-by-side assemblies it is not enough to have the msvcrt90.dll present,
115it has to be there as a whole assembly, that is, a folder with the .dll
116and a .manifest.  Also, a check is made for the correct version.
117Therefore, one should distribute this assembly with the dlls, and keep
118it in the same directory.  For compatibility with older systems, one should
119also set the PATH to this directory so that the dll can be found.
120For more info, see the Readme in the VC/Redist folder.
121
122
123Sub-Projects
124------------
125
126The CPython project is split up into several smaller sub-projects which
127are managed by the pcbuild.sln solution file.  Each sub-project is
128represented by a .vcxproj and a .vcxproj.filters file starting with the
129name of the sub-project.  These sub-projects fall into a few general
130categories:
131
132The following sub-projects represent the bare minimum required to build
133a functioning CPython interpreter.  If nothing else builds but these,
134you'll have a very limited but usable python.exe:
135pythoncore
136    .dll and .lib
137python
138    .exe
139
140These sub-projects provide extra executables that are useful for running
141CPython in different ways:
142pythonw
143    pythonw.exe, a variant of python.exe that doesn't open a Command
144    Prompt window
145pylauncher
146    py.exe, the Python Launcher for Windows, see
147        http://docs.python.org/3/using/windows.html#launcher
148pywlauncher
149    pyw.exe, a variant of py.exe that doesn't open a Command Prompt
150    window
151
152The following sub-projects are for individual modules of the standard
153library which are implemented in C; each one builds a DLL (renamed to
154.pyd) of the same name as the project:
155_ctypes
156_ctypes_test
157_elementtree
158_hashlib
159_msi
160_multiprocessing
161_socket
162_testcapi
163pyexpat
164select
165unicodedata
166winsound
167
168There is also a w9xpopen project to build w9xpopen.exe, which is used
169for platform.popen() on platforms whose COMSPEC points to 'command.com'.
170
171The following Python-controlled sub-projects wrap external projects.
172Note that these external libraries are not necessary for a working
173interpreter, but they do implement several major features.  See the
174"Getting External Sources" section below for additional information
175about getting the source for building these libraries.  The sub-projects
176are:
177_bsddb
178    Python wrapper for Berkeley DB version 4.7.25.
179    Homepage:
180        http://www.oracle.com/us/products/database/berkeley-db/
181_bz2
182    Python wrapper for version 1.0.6 of the libbzip2 compression library
183    Homepage:
184        http://www.bzip.org/
185_ssl
186    Python wrapper for version 1.0.2j of the OpenSSL secure sockets
187    library, which is built by ssl.vcxproj
188    Homepage:
189        http://www.openssl.org/
190
191    Building OpenSSL requires nasm.exe (the Netwide Assembler), version
192    2.10 or newer from
193        http://www.nasm.us/
194    to be somewhere on your PATH.  More recent versions of OpenSSL may
195    need a later version of NASM. If OpenSSL's self tests don't pass,
196    you should first try to update NASM and do a full rebuild of
197    OpenSSL.  If you use the PCbuild\get_externals.bat method
198    for getting sources, it also downloads a version of NASM which the
199    libeay/ssleay sub-projects use.
200
201    The libeay/ssleay sub-projects expect your OpenSSL sources to have
202    already been configured and be ready to build.  If you get your sources
203    from svn.python.org as suggested in the "Getting External Sources"
204    section below, the OpenSSL source will already be ready to go.  If
205    you want to build a different version, you will need to run
206
207       PCbuild\prepare_ssl.py path\to\openssl-source-dir
208
209    That script will prepare your OpenSSL sources in the same way that
210    those available on svn.python.org have been prepared.  Note that
211    Perl must be installed and available on your PATH to configure
212    OpenSSL.  ActivePerl is recommended and is available from
213        http://www.activestate.com/activeperl/
214
215    The libeay and ssleay sub-projects will build the modules of OpenSSL
216    required by _ssl and _hashlib and may need to be manually updated when
217    upgrading to a newer version of OpenSSL or when adding new
218    functionality to _ssl or _hashlib. They will not clean up their output
219    with the normal Clean target; CleanAll should be used instead.
220_sqlite3
221    Wraps SQLite 3.8.11.0, which is itself built by sqlite3.vcxproj
222    Homepage:
223        http://www.sqlite.org/
224_tkinter
225    Wraps version 8.5.15 of the Tk windowing system.
226    Homepage:
227        http://www.tcl.tk/
228
229    Tkinter's dependencies are built by the tcl.vcxproj and tk.vcxproj
230    projects.  The tix.vcxproj project also builds the Tix extended
231    widget set for use with Tkinter.
232
233    Those three projects install their respective components in a
234    directory alongside the source directories called "tcltk" on
235    Win32 and "tcltk64" on x64.  They also copy the Tcl and Tk DLLs
236    into the current output directory, which should ensure that Tkinter
237    is able to load Tcl/Tk without having to change your PATH.
238
239    The tcl, tk, and tix sub-projects do not clean their builds with
240    the normal Clean target; if you need to rebuild, you should use the
241    CleanAll target or manually delete their builds.
242
243
244Getting External Sources
245------------------------
246
247The last category of sub-projects listed above wrap external projects
248Python doesn't control, and as such a little more work is required in
249order to download the relevant source files for each project before they
250can be built.  However, a simple script is provided to make this as
251painless as possible, called "get_externals.bat" and located in this
252directory.  This script extracts all the external sub-projects from
253    http://svn.python.org/projects/external
254via Subversion (so you'll need svn.exe on your PATH) and places them
255in ..\externals (relative to this directory).
256
257It is also possible to download sources from each project's homepage,
258though you may have to change folder names or pass the names to MSBuild
259as the values of certain properties in order for the build solution to
260find them.  This is an advanced topic and not necessarily fully
261supported.
262
263The get_externals.bat script is called automatically by build.bat when
264you pass the '-e' option to it.
265
266
267Profile Guided Optimization
268---------------------------
269
270The solution has two configurations for PGO. The PGInstrument
271configuration must be built first. The PGInstrument binaries are linked
272against a profiling library and contain extra debug information. The
273PGUpdate configuration takes the profiling data and generates optimized
274binaries.
275
276The build_pgo.bat script automates the creation of optimized binaries.
277It creates the PGI files, runs the unit test suite or PyBench with the
278PGI python, and finally creates the optimized files.
279
280See
281    http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.90).aspx
282for more on this topic.
283
284
285Static library
286--------------
287
288The solution has no configuration for static libraries. However it is
289easy to build a static library instead of a DLL. You simply have to set
290the "Configuration Type" to "Static Library (.lib)" and alter the
291preprocessor macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may
292also have to change the "Runtime Library" from "Multi-threaded DLL
293(/MD)" to "Multi-threaded (/MT)".
294
295
296Visual Studio properties
297------------------------
298
299The PCbuild solution makes use of Visual Studio property files (*.props)
300to simplify each project. The properties can be viewed in the Property
301Manager (View -> Other Windows -> Property Manager) but should be
302carefully modified by hand.
303
304The property files used are:
305 * python (versions, directories and build names)
306 * pyproject (base settings for all projects)
307 * openssl (used by libeay and ssleay projects)
308 * tcltk (used by _tkinter, tcl, tk and tix projects)
309
310The pyproject property file defines all of the build settings for each
311project, with some projects overriding certain specific values. The GUI
312doesn't always reflect the correct settings and may confuse the user
313with false information, especially for settings that automatically adapt
314for diffirent configurations.
315