cpython/PCbuild/readme.txt

320 lines
14 KiB
Plaintext
Raw Normal View History

Building Python using VC++ 10.0
-------------------------------
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
This directory is used to build Python for Win32 and x64 platforms, e.g.
Windows XP, Vista and Windows Server 2008. In order to build 32-bit
debug and release executables, Microsoft Visual C++ 2010 Express Edition is
required at the very least. In order to build 64-bit debug and release
executables, Visual Studio 2010 Standard Edition is required at the very
least. In order to build all of the above, as well as generate release builds
that make use of Profile Guided Optimisation (PG0), Visual Studio 2010
Professional Edition is required at the very least. The official Python
releases are built with this version of Visual Studio.
For other Windows platforms and compilers, see ../PC/readme.txt.
All you need to do is open the workspace "pcbuild.sln" in Visual Studio,
select the desired combination of configuration and platform and eventually
build the solution. Unless you are going to debug a problem in the core or
you are going to create an optimized build you want to select "Release" as
configuration.
1998-05-26 11:16:23 -03:00
The PCbuild directory is compatible with all versions of Visual Studio from
VS C++ Express Edition over the standard edition up to the professional
Merged revisions 66508,66510,66512-66513,66523-66526,66529-66530,66532,66535,66538,66544,66546 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r66508 | benjamin.peterson | 2008-09-18 18:20:28 -0500 (Thu, 18 Sep 2008) | 1 line tabify ........ r66510 | josiah.carlson | 2008-09-18 21:07:22 -0500 (Thu, 18 Sep 2008) | 2 lines Fix for documentation bug. Fixes issue 3904. ........ r66512 | raymond.hettinger | 2008-09-19 03:07:48 -0500 (Fri, 19 Sep 2008) | 1 line Improve docs for super(). ........ r66513 | lars.gustaebel | 2008-09-19 07:39:23 -0500 (Fri, 19 Sep 2008) | 2 lines Correct information about the tarfile module. ........ r66523 | georg.brandl | 2008-09-21 02:14:44 -0500 (Sun, 21 Sep 2008) | 2 lines #3852: fix some select.kqueue and kevent docs. ........ r66524 | georg.brandl | 2008-09-21 02:15:59 -0500 (Sun, 21 Sep 2008) | 2 lines #3912: document default for *places* arg. ........ r66525 | georg.brandl | 2008-09-21 02:17:00 -0500 (Sun, 21 Sep 2008) | 2 lines #3916: fixes for docs wrt. Windows directory layout ........ r66526 | georg.brandl | 2008-09-21 02:18:28 -0500 (Sun, 21 Sep 2008) | 2 lines #3914: add //= to the augmented assign operators. ........ r66529 | georg.brandl | 2008-09-21 02:24:11 -0500 (Sun, 21 Sep 2008) | 2 lines #3901: bsddb fix. ........ r66530 | georg.brandl | 2008-09-21 02:31:52 -0500 (Sun, 21 Sep 2008) | 2 lines #3897: _collections now has an underscore. ........ r66532 | georg.brandl | 2008-09-21 02:36:22 -0500 (Sun, 21 Sep 2008) | 2 lines Update readme and Makefile (web builder doesn't exist). ........ r66535 | georg.brandl | 2008-09-21 03:03:21 -0500 (Sun, 21 Sep 2008) | 2 lines #3918: note that uniform() args can be swapped. ........ r66538 | georg.brandl | 2008-09-21 05:03:39 -0500 (Sun, 21 Sep 2008) | 2 lines Add "dist" target. ........ r66544 | benjamin.peterson | 2008-09-21 16:27:51 -0500 (Sun, 21 Sep 2008) | 4 lines #3879 fix a regression in urllib.getproxies_environment reviewers: Benjamin, Georg ........ r66546 | georg.brandl | 2008-09-21 17:31:59 -0500 (Sun, 21 Sep 2008) | 2 lines Fill out download page. ........
2008-09-22 19:10:59 -03:00
edition. However the express edition does not support features like solution
folders or profile guided optimization (PGO). The missing bits and pieces
won't stop you from building Python.
1998-05-26 11:16:23 -03:00
The solution is configured to build the projects in the correct order. "Build
Solution" or F7 takes care of dependencies except for x64 builds. To make
cross compiling x64 builds on a 32bit OS possible the x64 builds require a
32bit version of Python.
1998-05-26 11:16:23 -03:00
NOTE:
You probably don't want to build most of the other subprojects, unless
you're building an entire Python distribution from scratch, or
specifically making changes to the subsystems they implement, or are
running a Python core buildbot test slave; see SUBPROJECTS below)
1998-05-26 11:16:23 -03:00
When using the Debug setting, the output files have a _d added to
2011-02-20 06:41:31 -04:00
their name: python33_d.dll, python_d.exe, parser_d.pyd, and so on. Both
the build and rt batch files accept a -d option for debug builds.
The 32bit builds end up in the solution folder PCbuild while the x64 builds
land in the amd64 subfolder. The PGI and PGO builds for profile guided
optimization end up in their own folders, too.
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
Legacy support
--------------
You can find build directories for older versions of Visual Studio and
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
Visual C++ in the PC directory. The legacy build directories are no longer
actively maintained and may not work out of the box.
PC/VC6/
Visual C++ 6.0
PC/VS7.1/
Visual Studio 2003 (7.1)
2010-10-01 07:40:49 -03:00
PC/VS8.0/
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
Visual Studio 2005 (8.0)
PC/VS9.0/
Visual Studio 2008 (9.0)
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
C RUNTIME
---------
Visual Studio 2010 uses version 10 of the C runtime (MSVCRT10). The executables
no longer use the "Side by Side" assemblies used in previous versions of the
compiler. This simplifies distribution of applications.
The run time libraries are available under the VC/Redist folder of your visual studio
distribution. For more info, see the Readme in the VC/Redist folder.
Merged revisions 59642-59665 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59653 | martin.v.loewis | 2008-01-01 22:05:17 +0100 (Tue, 01 Jan 2008) | 3 lines Return results from Python callbacks to Tcl as Tcl objects. Fixes Tk issue #1851526 ........ r59654 | martin.v.loewis | 2008-01-01 22:08:18 +0100 (Tue, 01 Jan 2008) | 4 lines Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. ........ r59655 | martin.v.loewis | 2008-01-01 22:09:07 +0100 (Tue, 01 Jan 2008) | 2 lines News item for r59653. ........ r59656 | martin.v.loewis | 2008-01-02 00:00:00 +0100 (Wed, 02 Jan 2008) | 1 line Don't link with Tix; Tix is loaded dynamically by Tcl. ........ r59657 | martin.v.loewis | 2008-01-02 00:00:48 +0100 (Wed, 02 Jan 2008) | 1 line Use Visual Studio 2009 on the build slaves. ........ r59658 | martin.v.loewis | 2008-01-02 00:36:24 +0100 (Wed, 02 Jan 2008) | 1 line Test in PCbuild directory. ........ r59661 | kurt.kaiser | 2008-01-02 05:11:28 +0100 (Wed, 02 Jan 2008) | 6 lines Issue1177 r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. ........ r59662 | kurt.kaiser | 2008-01-02 06:23:38 +0100 (Wed, 02 Jan 2008) | 2 lines Change docstrings to comments so test output will display normally. ........ r59665 | christian.heimes | 2008-01-02 18:43:40 +0100 (Wed, 02 Jan 2008) | 5 lines Removed PCbuild8/ directory and added a new build directory for VS 2005 based on the VS 2008 build directory to PC/VS8.0. The script PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0. Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files. ........
2008-01-02 14:30:52 -04:00
SUBPROJECTS
-----------
2000-06-30 23:51:23 -03:00
These subprojects should build out of the box. Subprojects other than the
2001-01-18 15:01:39 -04:00
main ones (pythoncore, python, pythonw) generally build a DLL (renamed to
2000-06-30 23:51:23 -03:00
.pyd) from a specific module so that users don't have to load the code
supporting that module unless they import the module.
pythoncore
.dll and .lib
python
.exe
pythonw
pythonw.exe, a variant of python.exe that doesn't pop up a DOS box
_socket
socketmodule.c
_testcapi
tests of the Python C API, run via Lib/test/test_capi.py, and
implemented by module Modules/_testcapimodule.c
_testbuffer
buffer protocol tests, run via Lib/test/test_buffer.py, and
implemented by module Modules/_testbuffer.c
pyexpat
Python wrapper for accelerated XML parsing, which incorporates stable
code from the Expat project: http://sourceforge.net/projects/expat/
select
selectmodule.c
unicodedata
large tables of Unicode data
winsound
play sounds (typically .wav files) under Windows
Python-controlled subprojects that wrap external projects:
_sqlite3
Wraps SQLite 3.7.12, which is currently built by sqlite3.vcxproj.
_tkinter
2009-06-04 06:30:30 -03:00
Wraps the Tk windowing system. Unlike _sqlite3, there's no
corresponding tcltk.vcxproj-type project that builds Tcl/Tk from vcxproj's
within our pcbuild.sln, which means this module expects to find a
pre-built Tcl/Tk in either ..\..\tcltk for 32-bit or ..\..\tcltk64 for
64-bit (relative to this directory). See below for instructions to build
Tcl/Tk.
_bz2
Python wrapper for the libbzip2 compression library. Homepage
http://www.bzip.org/
2006-03-13 09:48:05 -04:00
Download the source from the python.org copy into the dist
directory:
2012-05-14 08:52:03 -03:00
svn export http://svn.python.org/projects/external/bzip2-1.0.6
** NOTE: if you use the Tools\buildbot\external(-amd64).bat approach for
obtaining external sources then you don't need to manually get the source
above via subversion. **
_lzma
Python wrapper for the liblzma compression library.
Download the pre-built Windows binaries from http://tukaani.org/xz/, and
extract to ..\xz-5.0.3. If you are using a more recent version of liblzma,
it will be necessary to rename the directory from xz-<VERSION> to xz-5.0.3.
2002-12-03 01:47:26 -04:00
_ssl
2002-12-03 22:39:52 -04:00
Python wrapper for the secure sockets library.
Get the source code through
2002-12-03 01:47:26 -04:00
svn export http://svn.python.org/projects/external/openssl-1.0.1e
2002-12-03 01:47:26 -04:00
** NOTE: if you use the Tools\buildbot\external(-amd64).bat approach for
obtaining external sources then you don't need to manually get the source
above via subversion. **
Alternatively, get the latest version from http://www.openssl.org.
2002-12-03 01:47:26 -04:00
You can (theoretically) use any version of OpenSSL you like - the
build process will automatically select the latest version.
You must install the NASM assembler 2.10 or newer from
http://nasm.sf.net
for x86 builds. Put nasm.exe anywhere in your PATH. More recent
versions of OpenSSL may need a later version of NASM. If OpenSSL's self
tests don't pass, you should first try to update NASM and do a full
rebuild of OpenSSL.
You can also install ActivePerl from
2010-10-28 14:57:25 -03:00
http://www.activestate.com/activeperl/
if you like to use the official sources instead of the files from
python's subversion repository. The svn version contains pre-build
makefiles and assembly files.
The build process makes sure that no patented algorithms are included.
For now RC5, MDC2 and IDEA are excluded from the build. You may have
to manually remove $(OBJ_D)\i_*.obj from ms\nt.mak if the build process
complains about missing files or forbidden IDEA. Again the files provided
in the subversion repository are already fixed.
2002-12-03 01:47:26 -04:00
The MSVC project simply invokes PCBuild/build_ssl.py to perform
2002-12-03 22:39:52 -04:00
the build. This Python script locates and builds your OpenSSL
2002-12-03 01:47:26 -04:00
installation, then invokes a simple makefile to build the final .pyd.
build_ssl.py attempts to catch the most common errors (such as not
being able to find OpenSSL sources, or not being able to find a Perl
that works with OpenSSL) and give a reasonable error message.
If you have a problem that doesn't seem to be handled correctly
(eg, you know you have ActivePerl but we can't find it), please take
a peek at build_ssl.py and suggest patches. Note that build_ssl.py
should be able to be run directly from the command-line.
2002-12-03 22:39:52 -04:00
build_ssl.py/MSVC isn't clever enough to clean OpenSSL - you must do
this by hand.
The subprojects above wrap external projects Python doesn't control, and as
such, a little more work is required in order to download the relevant source
files for each project before they can be built. The buildbots do this each
time they're built, so the easiest approach is to run either external.bat or
external-amd64.bat in the ..\Tools\buildbot directory from ..\, i.e.:
C:\..\svn.python.org\projects\python\trunk\PCbuild>cd ..
C:\..\svn.python.org\projects\python\trunk>Tools\buildbot\external.bat
This extracts all the external subprojects from http://svn.python.org/external
via Subversion (so you'll need an svn.exe on your PATH) and places them in
..\.. (relative to this directory). The external(-amd64).bat scripts will
also build a debug build of Tcl/Tk; there aren't any equivalent batch files
for building release versions of Tcl/Tk lying around in the Tools\buildbot
directory. If you need to build a release version of Tcl/Tk it isn't hard
though, take a look at the relevant external(-amd64).bat file and find the
two nmake lines, then call each one without the 'DEBUG=1' parameter, i.e.:
The external-amd64.bat file contains this for tcl:
nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all install
So for a release build, you'd call it as:
nmake -f makefile.vc MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all install
XXX Should we compile with OPTS=threads?
XXX Our installer copies a lot of stuff out of the Tcl/Tk install
XXX directory. Is all of that really needed for Python use of Tcl/Tk?
This will be cleaned up in the future; ideally Tcl/Tk will be brought into our
pcbuild.sln as custom .vcxproj files, just as we've recently done with the
sqlite3.vcxproj file, which will remove the need for Tcl/Tk to be built
2009-06-04 06:30:30 -03:00
separately via a batch file.
XXX trent.nelson 02-Apr-08:
Having the external subprojects in ..\.. relative to this directory is a
bit of a nuisance when you're working on py3k and trunk in parallel and
your directory layout mimics that of Python's subversion layout, e.g.:
C:\..\svn.python.org\projects\python\trunk
C:\..\svn.python.org\projects\python\branches\py3k
C:\..\svn.python.org\projects\python\branches\release25-maint
I'd like to change things so that external subprojects are fetched from
..\external instead of ..\.., then provide some helper scripts or batch
files that would set up a new ..\external directory with svn checkouts of
the relevant branches in http://svn.python.org/projects/external/, or
alternatively, use junctions to link ..\external with a pre-existing
externals directory being used by another branch. i.e. if I'm usually
working on trunk (and have previously created trunk\external via the
provided batch file), and want to do some work on py3k, I'd set up a
junction as follows (using the directory structure above as an example):
C:\..\python\trunk\external <- already exists and has built versions
of the external subprojects
C:\..\python\branches\py3k>linkd.exe external ..\..\trunk\external
Link created at: external
Only a slight tweak would be needed to the buildbots such that bots
building trunk and py3k could make use of the same facility. (2.5.x
builds need to be kept separate as they're using Visual Studio 7.1.)
/XXX trent.nelson 02-Apr-08
2004-07-20 11:37:48 -03:00
Building for Itanium
--------------------
Official support for Itanium builds have been dropped from the build. Please
contact us and provide patches if you are interested in Itanium builds.
2006-02-14 16:42:55 -04:00
Building for AMD64
------------------
The build process for AMD64 / x64 is very similar to standard builds. You just
have to set x64 as platform. In addition, the HOST_PYTHON environment variable
must point to a Python interpreter (at least 2.4), to support cross-compilation.
2006-02-14 16:42:55 -04:00
Building Python Using the free MS Toolkit Compiler
--------------------------------------------------
Microsoft has withdrawn the free MS Toolkit Compiler, so this can no longer
be considered a supported option. Instead you can use the free VS C++ Express
Edition.
Profile Guided Optimization
---------------------------
Merged revisions 59883-59920 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59887 | neal.norwitz | 2008-01-10 06:42:58 +0100 (Thu, 10 Jan 2008) | 1 line Reword entry, not sure I made it much better though. ........ r59888 | andrew.kuchling | 2008-01-10 14:37:12 +0100 (Thu, 10 Jan 2008) | 1 line Check for fd of -1 to save fsync() and fstat() call ........ r59891 | thomas.heller | 2008-01-10 19:45:40 +0100 (Thu, 10 Jan 2008) | 1 line Reflow a paragraph, and fix a typo. ........ r59892 | raymond.hettinger | 2008-01-10 20:15:10 +0100 (Thu, 10 Jan 2008) | 1 line Examples for named tuple subclassing should include __slots__ ........ r59895 | raymond.hettinger | 2008-01-10 21:37:12 +0100 (Thu, 10 Jan 2008) | 1 line Clarify how to add a field to a named tuple. ........ r59896 | amaury.forgeotdarc | 2008-01-10 22:59:42 +0100 (Thu, 10 Jan 2008) | 12 lines Closing issue1761. Surprising behaviour of the "$" regexp: it matches the end of the string, AND just before the newline at the end of the string:: re.sub('$', '#', 'foo\n') == 'foo#\n#' Python is consistent with Perl and the pcre library, so we just document it. Guido prefers "\Z" to match only the end of the string. ........ r59898 | raymond.hettinger | 2008-01-11 00:00:01 +0100 (Fri, 11 Jan 2008) | 1 line Neaten-up the named tuple docs ........ r59900 | raymond.hettinger | 2008-01-11 01:23:13 +0100 (Fri, 11 Jan 2008) | 1 line Run doctests on the collections module ........ r59903 | raymond.hettinger | 2008-01-11 02:25:54 +0100 (Fri, 11 Jan 2008) | 1 line Doctest results return a named tuple for readability ........ r59904 | raymond.hettinger | 2008-01-11 03:12:33 +0100 (Fri, 11 Jan 2008) | 1 line Comment-out missing constant (from rev 59819) ........ r59905 | raymond.hettinger | 2008-01-11 03:24:13 +0100 (Fri, 11 Jan 2008) | 1 line Have Decimal.as_tuple return a named tuple. ........ r59906 | raymond.hettinger | 2008-01-11 04:04:50 +0100 (Fri, 11 Jan 2008) | 1 line Let most inspect functions return named tuples ........ r59907 | raymond.hettinger | 2008-01-11 04:20:54 +0100 (Fri, 11 Jan 2008) | 1 line Improve usability of the SequenceMatcher by returning named tuples describing match ranges. ........ r59909 | thomas.heller | 2008-01-11 09:04:03 +0100 (Fri, 11 Jan 2008) | 1 line Add an important missing blank. ........ r59910 | georg.brandl | 2008-01-11 10:19:11 +0100 (Fri, 11 Jan 2008) | 2 lines Guard definition of TIPC_SUB_CANCEL with an #ifdef. ........ r59911 | georg.brandl | 2008-01-11 10:20:58 +0100 (Fri, 11 Jan 2008) | 2 lines News entries for rev. 5990[567]. ........ r59912 | georg.brandl | 2008-01-11 10:55:53 +0100 (Fri, 11 Jan 2008) | 2 lines Documentation for r5990[3567]. ........ r59913 | thomas.heller | 2008-01-11 13:41:39 +0100 (Fri, 11 Jan 2008) | 4 lines The sqlite3 dll, when compiled in debug mode, must be linked with /MDd to use the debug runtime library. Further, the dll will be named sqlite3_d.dll. ........ r59919 | thomas.heller | 2008-01-11 16:38:46 +0100 (Fri, 11 Jan 2008) | 6 lines Revert revision 59913, because it was wrong: The sqlite3 dll, when compiled in debug mode, must be linked with /MDd to use the debug runtime library. Further, the dll will be named sqlite3_d.dll. ........ r59920 | christian.heimes | 2008-01-11 16:42:29 +0100 (Fri, 11 Jan 2008) | 1 line Removed unused variable ........
2008-01-11 12:17:00 -04:00
The solution has two configurations for PGO. The PGInstrument
configuration must be build first. The PGInstrument binaries are
linked against a profiling library and contain extra debug
Merged revisions 59883-59920 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59887 | neal.norwitz | 2008-01-10 06:42:58 +0100 (Thu, 10 Jan 2008) | 1 line Reword entry, not sure I made it much better though. ........ r59888 | andrew.kuchling | 2008-01-10 14:37:12 +0100 (Thu, 10 Jan 2008) | 1 line Check for fd of -1 to save fsync() and fstat() call ........ r59891 | thomas.heller | 2008-01-10 19:45:40 +0100 (Thu, 10 Jan 2008) | 1 line Reflow a paragraph, and fix a typo. ........ r59892 | raymond.hettinger | 2008-01-10 20:15:10 +0100 (Thu, 10 Jan 2008) | 1 line Examples for named tuple subclassing should include __slots__ ........ r59895 | raymond.hettinger | 2008-01-10 21:37:12 +0100 (Thu, 10 Jan 2008) | 1 line Clarify how to add a field to a named tuple. ........ r59896 | amaury.forgeotdarc | 2008-01-10 22:59:42 +0100 (Thu, 10 Jan 2008) | 12 lines Closing issue1761. Surprising behaviour of the "$" regexp: it matches the end of the string, AND just before the newline at the end of the string:: re.sub('$', '#', 'foo\n') == 'foo#\n#' Python is consistent with Perl and the pcre library, so we just document it. Guido prefers "\Z" to match only the end of the string. ........ r59898 | raymond.hettinger | 2008-01-11 00:00:01 +0100 (Fri, 11 Jan 2008) | 1 line Neaten-up the named tuple docs ........ r59900 | raymond.hettinger | 2008-01-11 01:23:13 +0100 (Fri, 11 Jan 2008) | 1 line Run doctests on the collections module ........ r59903 | raymond.hettinger | 2008-01-11 02:25:54 +0100 (Fri, 11 Jan 2008) | 1 line Doctest results return a named tuple for readability ........ r59904 | raymond.hettinger | 2008-01-11 03:12:33 +0100 (Fri, 11 Jan 2008) | 1 line Comment-out missing constant (from rev 59819) ........ r59905 | raymond.hettinger | 2008-01-11 03:24:13 +0100 (Fri, 11 Jan 2008) | 1 line Have Decimal.as_tuple return a named tuple. ........ r59906 | raymond.hettinger | 2008-01-11 04:04:50 +0100 (Fri, 11 Jan 2008) | 1 line Let most inspect functions return named tuples ........ r59907 | raymond.hettinger | 2008-01-11 04:20:54 +0100 (Fri, 11 Jan 2008) | 1 line Improve usability of the SequenceMatcher by returning named tuples describing match ranges. ........ r59909 | thomas.heller | 2008-01-11 09:04:03 +0100 (Fri, 11 Jan 2008) | 1 line Add an important missing blank. ........ r59910 | georg.brandl | 2008-01-11 10:19:11 +0100 (Fri, 11 Jan 2008) | 2 lines Guard definition of TIPC_SUB_CANCEL with an #ifdef. ........ r59911 | georg.brandl | 2008-01-11 10:20:58 +0100 (Fri, 11 Jan 2008) | 2 lines News entries for rev. 5990[567]. ........ r59912 | georg.brandl | 2008-01-11 10:55:53 +0100 (Fri, 11 Jan 2008) | 2 lines Documentation for r5990[3567]. ........ r59913 | thomas.heller | 2008-01-11 13:41:39 +0100 (Fri, 11 Jan 2008) | 4 lines The sqlite3 dll, when compiled in debug mode, must be linked with /MDd to use the debug runtime library. Further, the dll will be named sqlite3_d.dll. ........ r59919 | thomas.heller | 2008-01-11 16:38:46 +0100 (Fri, 11 Jan 2008) | 6 lines Revert revision 59913, because it was wrong: The sqlite3 dll, when compiled in debug mode, must be linked with /MDd to use the debug runtime library. Further, the dll will be named sqlite3_d.dll. ........ r59920 | christian.heimes | 2008-01-11 16:42:29 +0100 (Fri, 11 Jan 2008) | 1 line Removed unused variable ........
2008-01-11 12:17:00 -04:00
information. The PGUpdate configuration takes the profiling data and
generates optimized binaries.
The build_pgo.bat script automates the creation of optimized binaries. It
creates the PGI files, runs the unit test suite or PyBench with the PGI
python and finally creates the optimized files.
http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.100).aspx
Static library
--------------
The solution has no configuration for static libraries. However it is easy
it build a static library instead of a DLL. You simply have to set the
"Configuration Type" to "Static Library (.lib)" and alter the preprocessor
macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may also have to
change the "Runtime Library" from "Multi-threaded DLL (/MD)" to
"Multi-threaded (/MT)".
Visual Studio properties
------------------------
The PCbuild solution makes heavy use of Visual Studio property files
(*.props). The properties can be viewed and altered in the Property
Manager (View -> Other Windows -> Property Manager).
* debug (debug macro: _DEBUG)
* pginstrument (PGO)
* pgupdate (PGO)
+-- pginstrument
* pyd (python extension, release build)
+-- release
+-- pyproject
* pyd_d (python extension, debug build)
+-- debug
+-- pyproject
* pyproject (base settings for all projects, user macros like PyDllName)
* release (release macro: NDEBUG)
* x64 (AMD64 / x64 platform specific settings)
The pyproject propertyfile defines _WIN32 and x64 defines _WIN64 and _M_X64
although the macros are set by the compiler, too. The GUI doesn't always know
about the macros and confuse the user with false information.
2000-07-01 17:38:27 -03:00
YOUR OWN EXTENSION DLLs
-----------------------
If you want to create your own extension module DLL, there's an example
with easy-to-follow instructions in ../PC/example/; read the file
readme.txt there first.