Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6)

Side by Side Diff: PCbuild/readme.txt

Issue 15550: Trailing white spaces
Patch Set: Created 7 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « PCbuild/pyproject.props ('k') | PC/example_nt/readme.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Building Python using VC++ 10.0 1 Building Python using VC++ 10.0
2 ------------------------------ 2 ------------------------------
3 3
4 This directory is used to build Python for Win32 and x64 platforms, e.g. 4 This directory is used to build Python for Win32 and x64 platforms, e.g.
5 Windows 2000, XP, Vista and Windows Server 2008. In order to build 32-bit 5 Windows 2000, XP, Vista and Windows Server 2008. In order to build 32-bit
6 debug and release executables, Microsoft Visual C++ 2008 Express Edition is 6 debug and release executables, Microsoft Visual C++ 2008 Express Edition is
7 required at the very least. In order to build 64-bit debug and release 7 required at the very least. In order to build 64-bit debug and release
8 executables, Visual Studio 2008 Standard Edition is required at the very 8 executables, Visual Studio 2008 Standard Edition is required at the very
9 least. In order to build all of the above, as well as generate release builds 9 least. In order to build all of the above, as well as generate release builds
10 that make use of Profile Guided Optimisation (PG0), Visual Studio 2008 10 that make use of Profile Guided Optimisation (PG0), Visual Studio 2008
11 Professional Edition is required at the very least. The official Python 11 Professional Edition is required at the very least. The official Python
12 releases are built with this version of Visual Studio. 12 releases are built with this version of Visual Studio.
13 13
14 For other Windows platforms and compilers, see ../PC/readme.txt. 14 For other Windows platforms and compilers, see ../PC/readme.txt.
15 15
16 All you need to do is open the workspace "pcbuild.sln" in Visual Studio, 16 All you need to do is open the workspace "pcbuild.sln" in Visual Studio,
17 select the desired combination of configuration and platform and eventually 17 select the desired combination of configuration and platform and eventually
18 build the solution. Unless you are going to debug a problem in the core or 18 build the solution. Unless you are going to debug a problem in the core or
19 you are going to create an optimized build you want to select "Release" as 19 you are going to create an optimized build you want to select "Release" as
20 configuration. 20 configuration.
21 21
22 The PCbuild directory is compatible with all versions of Visual Studio from 22 The PCbuild directory is compatible with all versions of Visual Studio from
23 VS C++ Express Edition over the standard edition up to the professional 23 VS C++ Express Edition over the standard edition up to the professional
24 edition. However the express edition does not support features like solution 24 edition. However the express edition does not support features like solution
25 folders or profile guided optimization (PGO). The missing bits and pieces 25 folders or profile guided optimization (PGO). The missing bits and pieces
26 won't stop you from building Python. 26 won't stop you from building Python.
27 27
28 The solution is configured to build the projects in the correct order. "Build 28 The solution is configured to build the projects in the correct order. "Build
29 Solution" or F7 takes care of dependencies except for x64 builds. To make 29 Solution" or F7 takes care of dependencies except for x64 builds. To make
30 cross compiling x64 builds on a 32bit OS possible the x64 builds require a 30 cross compiling x64 builds on a 32bit OS possible the x64 builds require a
31 32bit version of Python. 31 32bit version of Python.
32 32
33 NOTE: 33 NOTE:
34 You probably don't want to build most of the other subprojects, unless 34 You probably don't want to build most of the other subprojects, unless
35 you're building an entire Python distribution from scratch, or 35 you're building an entire Python distribution from scratch, or
36 specifically making changes to the subsystems they implement, or are 36 specifically making changes to the subsystems they implement, or are
37 running a Python core buildbot test slave; see SUBPROJECTS below) 37 running a Python core buildbot test slave; see SUBPROJECTS below)
38 38
39 When using the Debug setting, the output files have a _d added to 39 When using the Debug setting, the output files have a _d added to
40 their name: python33_d.dll, python_d.exe, parser_d.pyd, and so on. Both 40 their name: python33_d.dll, python_d.exe, parser_d.pyd, and so on. Both
41 the build and rt batch files accept a -d option for debug builds. 41 the build and rt batch files accept a -d option for debug builds.
42 42
43 The 32bit builds end up in the solution folder PCbuild while the x64 builds 43 The 32bit builds end up in the solution folder PCbuild while the x64 builds
44 land in the amd64 subfolder. The PGI and PGO builds for profile guided 44 land in the amd64 subfolder. The PGI and PGO builds for profile guided
45 optimization end up in their own folders, too. 45 optimization end up in their own folders, too.
46 46
47 Legacy support 47 Legacy support
48 -------------- 48 --------------
49 49
50 You can find build directories for older versions of Visual Studio and 50 You can find build directories for older versions of Visual Studio and
51 Visual C++ in the PC directory. The legacy build directories are no longer 51 Visual C++ in the PC directory. The legacy build directories are no longer
52 actively maintained and may not work out of the box. 52 actively maintained and may not work out of the box.
53 53
54 PC/VC6/ 54 PC/VC6/
55 Visual C++ 6.0 55 Visual C++ 6.0
56 PC/VS7.1/ 56 PC/VS7.1/
57 Visual Studio 2003 (7.1) 57 Visual Studio 2003 (7.1)
58 PC/VS8.0/ 58 PC/VS8.0/
59 Visual Studio 2005 (8.0) 59 Visual Studio 2005 (8.0)
60 60
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 Python-controlled subprojects that wrap external projects: 102 Python-controlled subprojects that wrap external projects:
103 _sqlite3 103 _sqlite3
104 Wraps SQLite 3.7.4, which is currently built by sqlite3.vcproj (see below). 104 Wraps SQLite 3.7.4, which is currently built by sqlite3.vcproj (see below).
105 _tkinter 105 _tkinter
106 Wraps the Tk windowing system. Unlike _sqlite3, there's no 106 Wraps the Tk windowing system. Unlike _sqlite3, there's no
107 corresponding tcltk.vcproj-type project that builds Tcl/Tk from vcproj's 107 corresponding tcltk.vcproj-type project that builds Tcl/Tk from vcproj's
108 within our pcbuild.sln, which means this module expects to find a 108 within our pcbuild.sln, which means this module expects to find a
109 pre-built Tcl/Tk in either ..\..\tcltk for 32-bit or ..\..\tcltk64 for 109 pre-built Tcl/Tk in either ..\..\tcltk for 32-bit or ..\..\tcltk64 for
110 64-bit (relative to this directory). See below for instructions to build 110 64-bit (relative to this directory). See below for instructions to build
111 Tcl/Tk. 111 Tcl/Tk.
112 _bz2 112 _bz2
113 Python wrapper for the libbzip2 compression library. Homepage 113 Python wrapper for the libbzip2 compression library. Homepage
114 http://www.bzip.org/ 114 http://www.bzip.org/
115 Download the source from the python.org copy into the dist 115 Download the source from the python.org copy into the dist
116 directory: 116 directory:
117 117
118 svn export http://svn.python.org/projects/external/bzip2-1.0.6 118 svn export http://svn.python.org/projects/external/bzip2-1.0.6
119 119
120 ** NOTE: if you use the Tools\buildbot\external(-amd64).bat approach for 120 ** NOTE: if you use the Tools\buildbot\external(-amd64).bat approach for
121 obtaining external sources then you don't need to manually get the source 121 obtaining external sources then you don't need to manually get the source
122 above via subversion. ** 122 above via subversion. **
123 123
124 A custom pre-link step in the bz2 project settings should manage to 124 A custom pre-link step in the bz2 project settings should manage to
125 build bzip2-1.0.6\libbz2.lib by magic before bz2.pyd (or bz2_d.pyd) is 125 build bzip2-1.0.6\libbz2.lib by magic before bz2.pyd (or bz2_d.pyd) is
126 linked in PCbuild\. 126 linked in PCbuild\.
127 However, the bz2 project is not smart enough to remove anything under 127 However, the bz2 project is not smart enough to remove anything under
128 bzip2-1.0.6\ when you do a clean, so if you want to rebuild bzip2.lib 128 bzip2-1.0.6\ when you do a clean, so if you want to rebuild bzip2.lib
129 you need to clean up bzip2-1.0.6\ by hand. 129 you need to clean up bzip2-1.0.6\ by hand.
130 130
131 All of this managed to build libbz2.lib in 131 All of this managed to build libbz2.lib in
132 bzip2-1.0.6\$platform-$configuration\, which the Python project links in. 132 bzip2-1.0.6\$platform-$configuration\, which the Python project links in.
133 _lzma 133 _lzma
134 Python wrapper for the liblzma compression library. 134 Python wrapper for the liblzma compression library.
135 135
136 Download the pre-built Windows binaries from http://tukaani.org/xz/, and 136 Download the pre-built Windows binaries from http://tukaani.org/xz/, and
137 extract to ..\xz-5.0.3. If you are using a more recent version of liblzma, 137 extract to ..\xz-5.0.3. If you are using a more recent version of liblzma,
138 it will be necessary to rename the directory from xz-<VERSION> to xz-5.0.3. 138 it will be necessary to rename the directory from xz-<VERSION> to xz-5.0.3.
139 139
140 _ssl 140 _ssl
141 Python wrapper for the secure sockets library. 141 Python wrapper for the secure sockets library.
142 142
143 Get the source code through 143 Get the source code through
144 144
145 svn export http://svn.python.org/projects/external/openssl-1.0.1c 145 svn export http://svn.python.org/projects/external/openssl-1.0.1c
146 146
147 ** NOTE: if you use the Tools\buildbot\external(-amd64).bat approach for 147 ** NOTE: if you use the Tools\buildbot\external(-amd64).bat approach for
148 obtaining external sources then you don't need to manually get the source 148 obtaining external sources then you don't need to manually get the source
149 above via subversion. ** 149 above via subversion. **
150 150
151 Alternatively, get the latest version from http://www.openssl.org. 151 Alternatively, get the latest version from http://www.openssl.org.
152 You can (theoretically) use any version of OpenSSL you like - the 152 You can (theoretically) use any version of OpenSSL you like - the
153 build process will automatically select the latest version. 153 build process will automatically select the latest version.
154 154
155 You must install the NASM assembler from 155 You must install the NASM assembler from
156 http://nasm.sf.net 156 http://nasm.sf.net
157 for x86 builds. Put nasmw.exe anywhere in your PATH. 157 for x86 builds. Put nasmw.exe anywhere in your PATH.
158 Note: recent releases of nasm only have nasm.exe. Just rename it to 158 Note: recent releases of nasm only have nasm.exe. Just rename it to
159 nasmw.exe. 159 nasmw.exe.
160 160
161 You can also install ActivePerl from 161 You can also install ActivePerl from
162 http://www.activestate.com/activeperl/ 162 http://www.activestate.com/activeperl/
163 if you like to use the official sources instead of the files from 163 if you like to use the official sources instead of the files from
164 python's subversion repository. The svn version contains pre-build 164 python's subversion repository. The svn version contains pre-build
165 makefiles and assembly files. 165 makefiles and assembly files.
166 166
167 The build process makes sure that no patented algorithms are included. 167 The build process makes sure that no patented algorithms are included.
168 For now RC5, MDC2 and IDEA are excluded from the build. You may have 168 For now RC5, MDC2 and IDEA are excluded from the build. You may have
169 to manually remove $(OBJ_D)\i_*.obj from ms\nt.mak if the build process 169 to manually remove $(OBJ_D)\i_*.obj from ms\nt.mak if the build process
170 complains about missing files or forbidden IDEA. Again the files provided 170 complains about missing files or forbidden IDEA. Again the files provided
171 in the subversion repository are already fixed. 171 in the subversion repository are already fixed.
172 172
173 The MSVC project simply invokes PCBuild/build_ssl.py to perform 173 The MSVC project simply invokes PCBuild/build_ssl.py to perform
174 the build. This Python script locates and builds your OpenSSL 174 the build. This Python script locates and builds your OpenSSL
175 installation, then invokes a simple makefile to build the final .pyd. 175 installation, then invokes a simple makefile to build the final .pyd.
176 176
177 build_ssl.py attempts to catch the most common errors (such as not 177 build_ssl.py attempts to catch the most common errors (such as not
178 being able to find OpenSSL sources, or not being able to find a Perl 178 being able to find OpenSSL sources, or not being able to find a Perl
179 that works with OpenSSL) and give a reasonable error message. 179 that works with OpenSSL) and give a reasonable error message.
180 If you have a problem that doesn't seem to be handled correctly 180 If you have a problem that doesn't seem to be handled correctly
181 (eg, you know you have ActivePerl but we can't find it), please take 181 (eg, you know you have ActivePerl but we can't find it), please take
182 a peek at build_ssl.py and suggest patches. Note that build_ssl.py 182 a peek at build_ssl.py and suggest patches. Note that build_ssl.py
183 should be able to be run directly from the command-line. 183 should be able to be run directly from the command-line.
184 184
185 build_ssl.py/MSVC isn't clever enough to clean OpenSSL - you must do 185 build_ssl.py/MSVC isn't clever enough to clean OpenSSL - you must do
186 this by hand. 186 this by hand.
187 187
188 The subprojects above wrap external projects Python doesn't control, and as 188 The subprojects above wrap external projects Python doesn't control, and as
189 such, a little more work is required in order to download the relevant source 189 such, a little more work is required in order to download the relevant source
190 files for each project before they can be built. The buildbots do this each 190 files for each project before they can be built. The buildbots do this each
191 time they're built, so the easiest approach is to run either external.bat or 191 time they're built, so the easiest approach is to run either external.bat or
192 external-amd64.bat in the ..\Tools\buildbot directory from ..\, i.e.: 192 external-amd64.bat in the ..\Tools\buildbot directory from ..\, i.e.:
193 193
194 C:\..\svn.python.org\projects\python\trunk\PCbuild>cd .. 194 C:\..\svn.python.org\projects\python\trunk\PCbuild>cd ..
195 C:\..\svn.python.org\projects\python\trunk>Tools\buildbot\external.bat 195 C:\..\svn.python.org\projects\python\trunk>Tools\buildbot\external.bat
196 196
197 This extracts all the external subprojects from http://svn.python.org/external 197 This extracts all the external subprojects from http://svn.python.org/external
198 via Subversion (so you'll need an svn.exe on your PATH) and places them in 198 via Subversion (so you'll need an svn.exe on your PATH) and places them in
199 ..\.. (relative to this directory). The external(-amd64).bat scripts will 199 ..\.. (relative to this directory). The external(-amd64).bat scripts will
200 also build a debug build of Tcl/Tk; there aren't any equivalent batch files 200 also build a debug build of Tcl/Tk; there aren't any equivalent batch files
201 for building release versions of Tcl/Tk lying around in the Tools\buildbot 201 for building release versions of Tcl/Tk lying around in the Tools\buildbot
202 directory. If you need to build a release version of Tcl/Tk it isn't hard 202 directory. If you need to build a release version of Tcl/Tk it isn't hard
203 though, take a look at the relevant external(-amd64).bat file and find the 203 though, take a look at the relevant external(-amd64).bat file and find the
204 two nmake lines, then call each one without the 'DEBUG=1' parameter, i.e.: 204 two nmake lines, then call each one without the 'DEBUG=1' parameter, i.e.:
205 205
206 The external-amd64.bat file contains this for tcl: 206 The external-amd64.bat file contains this for tcl:
207 nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 MACHINE=AMD64 INS TALLDIR=..\..\tcltk64 clean all install 207 nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 MACHINE=AMD64 INS TALLDIR=..\..\tcltk64 clean all install
208 208
(...skipping 22 matching lines...) Expand all
231 ..\external instead of ..\.., then provide some helper scripts or batch 231 ..\external instead of ..\.., then provide some helper scripts or batch
232 files that would set up a new ..\external directory with svn checkouts of 232 files that would set up a new ..\external directory with svn checkouts of
233 the relevant branches in http://svn.python.org/projects/external/, or 233 the relevant branches in http://svn.python.org/projects/external/, or
234 alternatively, use junctions to link ..\external with a pre-existing 234 alternatively, use junctions to link ..\external with a pre-existing
235 externals directory being used by another branch. i.e. if I'm usually 235 externals directory being used by another branch. i.e. if I'm usually
236 working on trunk (and have previously created trunk\external via the 236 working on trunk (and have previously created trunk\external via the
237 provided batch file), and want to do some work on py3k, I'd set up a 237 provided batch file), and want to do some work on py3k, I'd set up a
238 junction as follows (using the directory structure above as an example): 238 junction as follows (using the directory structure above as an example):
239 239
240 C:\..\python\trunk\external <- already exists and has built versions 240 C:\..\python\trunk\external <- already exists and has built versions
241 of the external subprojects 241 of the external subprojects
242 242
243 C:\..\python\branches\py3k>linkd.exe external ..\..\trunk\external 243 C:\..\python\branches\py3k>linkd.exe external ..\..\trunk\external
244 Link created at: external 244 Link created at: external
245 245
246 Only a slight tweak would be needed to the buildbots such that bots 246 Only a slight tweak would be needed to the buildbots such that bots
247 building trunk and py3k could make use of the same facility. (2.5.x 247 building trunk and py3k could make use of the same facility. (2.5.x
248 builds need to be kept separate as they're using Visual Studio 7.1.) 248 builds need to be kept separate as they're using Visual Studio 7.1.)
249 /XXX trent.nelson 02-Apr-08 249 /XXX trent.nelson 02-Apr-08
250 250
251 Building for Itanium 251 Building for Itanium
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 The build_pgo.bat script automates the creation of optimized binaries. It 290 The build_pgo.bat script automates the creation of optimized binaries. It
291 creates the PGI files, runs the unit test suite or PyBench with the PGI 291 creates the PGI files, runs the unit test suite or PyBench with the PGI
292 python and finally creates the optimized files. 292 python and finally creates the optimized files.
293 293
294 http://msdn2.microsoft.com/en-us/library/e7k32f4k(VS.90).aspx 294 http://msdn2.microsoft.com/en-us/library/e7k32f4k(VS.90).aspx
295 295
296 Static library 296 Static library
297 -------------- 297 --------------
298 298
299 The solution has no configuration for static libraries. However it is easy 299 The solution has no configuration for static libraries. However it is easy
300 it build a static library instead of a DLL. You simply have to set the 300 it build a static library instead of a DLL. You simply have to set the
301 "Configuration Type" to "Static Library (.lib)" and alter the preprocessor 301 "Configuration Type" to "Static Library (.lib)" and alter the preprocessor
302 macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may also have to 302 macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may also have to
303 change the "Runtime Library" from "Multi-threaded DLL (/MD)" to 303 change the "Runtime Library" from "Multi-threaded DLL (/MD)" to
304 "Multi-threaded (/MT)". 304 "Multi-threaded (/MT)".
305 305
306 Visual Studio properties 306 Visual Studio properties
307 ------------------------ 307 ------------------------
308 308
309 The PCbuild solution makes heavy use of Visual Studio property files 309 The PCbuild solution makes heavy use of Visual Studio property files
310 (*.vsprops). The properties can be viewed and altered in the Property 310 (*.vsprops). The properties can be viewed and altered in the Property
311 Manager (View -> Other Windows -> Property Manager). 311 Manager (View -> Other Windows -> Property Manager).
312 312
313 * debug (debug macro: _DEBUG) 313 * debug (debug macro: _DEBUG)
314 * pginstrument (PGO) 314 * pginstrument (PGO)
315 * pgupdate (PGO) 315 * pgupdate (PGO)
316 +-- pginstrument 316 +-- pginstrument
317 * pyd (python extension, release build) 317 * pyd (python extension, release build)
318 +-- release 318 +-- release
319 +-- pyproject 319 +-- pyproject
320 * pyd_d (python extension, debug build) 320 * pyd_d (python extension, debug build)
321 +-- debug 321 +-- debug
322 +-- pyproject 322 +-- pyproject
323 * pyproject (base settings for all projects, user macros like PyDllName) 323 * pyproject (base settings for all projects, user macros like PyDllName)
324 * release (release macro: NDEBUG) 324 * release (release macro: NDEBUG)
325 * x64 (AMD64 / x64 platform specific settings) 325 * x64 (AMD64 / x64 platform specific settings)
326 326
327 The pyproject propertyfile defines _WIN32 and x64 defines _WIN64 and _M_X64 327 The pyproject propertyfile defines _WIN32 and x64 defines _WIN64 and _M_X64
328 although the macros are set by the compiler, too. The GUI doesn't always know 328 although the macros are set by the compiler, too. The GUI doesn't always know
329 about the macros and confuse the user with false information. 329 about the macros and confuse the user with false information.
330 330
331 YOUR OWN EXTENSION DLLs 331 YOUR OWN EXTENSION DLLs
332 ----------------------- 332 -----------------------
333 333
334 If you want to create your own extension module DLL, there's an example 334 If you want to create your own extension module DLL, there's an example
335 with easy-to-follow instructions in ../PC/example/; read the file 335 with easy-to-follow instructions in ../PC/example/; read the file
336 readme.txt there first. 336 readme.txt there first.
OLDNEW
« no previous file with comments | « PCbuild/pyproject.props ('k') | PC/example_nt/readme.txt » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+