blob: 255a53b28072dfe5fabf9b54114910f56ee20961 [file] [log] [blame]
Tim Peters4b5fb072000-07-01 00:03:43 +00001Building Python using VC++ 6.0 or 5.0
Guido van Rossuma29b3602000-03-29 01:51:37 +00002-------------------------------------
Tim Peters4b5fb072000-07-01 00:03:43 +00003This directory is used to build Python for Win32 platforms, e.g. Windows
495, 98 and NT. It requires Microsoft Visual C++ 6.x or 5.x.
Guido van Rossum15b239f1998-05-26 14:16:23 +00005(For other Windows platforms and compilers, see ../PC/readme.txt.)
6
Tim Peters4b5fb072000-07-01 00:03:43 +00007All you need to do is open the workspace "pcbuild.dsw" in MSVC++, select
8the Debug or Release setting (using Build -> Set Active Configuration...),
9and build the projects.
Guido van Rossum15b239f1998-05-26 14:16:23 +000010
Tim Petersbefc97c2001-01-18 19:01:39 +000011The proper order to build subprojects:
Guido van Rossum15b239f1998-05-26 14:16:23 +000012
Tim Peters97c96402001-01-17 23:23:13 +0000131) pythoncore (this builds the main Python DLL and library files,
Tim Petersbefc97c2001-01-18 19:01:39 +000014 python21.{dll, lib} in Release mode)
15 NOTE: in previous releases, this subproject was
16 named after the release number, e.g. python20.
Guido van Rossum15b239f1998-05-26 14:16:23 +000017
Tim Petersbefc97c2001-01-18 19:01:39 +0000182) python (this builds the main Python executable,
19 python.exe in Release mode)
Tim Peters4b5fb072000-07-01 00:03:43 +000020
213) the other subprojects, as desired or needed (note: you probably don't
22 want to build most of the other subprojects, unless you're building an
23 entire Python distribution from scratch, or specifically making changes
24 to the subsystems they implement; see SUBPROJECTS below)
Guido van Rossum15b239f1998-05-26 14:16:23 +000025
26When using the Debug setting, the output files have a _d added to
Tim Peters97c96402001-01-17 23:23:13 +000027their name: python21_d.dll, python_d.exe, parser_d.pyd, and so on.
Guido van Rossume79cf321998-07-07 22:35:03 +000028
Tim Peters4b5fb072000-07-01 00:03:43 +000029SUBPROJECTS
30-----------
Tim Peters610a8272000-07-01 02:51:23 +000031These subprojects should build out of the box. Subprojects other than the
Tim Petersbefc97c2001-01-18 19:01:39 +000032main ones (pythoncore, python, pythonw) generally build a DLL (renamed to
Tim Peters610a8272000-07-01 02:51:23 +000033.pyd) from a specific module so that users don't have to load the code
Tim Peters4b5fb072000-07-01 00:03:43 +000034supporting that module unless they import the module.
Guido van Rossume79cf321998-07-07 22:35:03 +000035
Tim Peters97c96402001-01-17 23:23:13 +000036pythoncore
Tim Peters4b5fb072000-07-01 00:03:43 +000037 .dll and .lib
38python
39 .exe
40pythonw
41 pythonw.exe, a variant of python.exe that doesn't pop up a DOS box
42_socket
43 socketmodule.c
44_sre
45 Unicode-aware regular expression engine
46mmap
47 mmapmodule.c
48parser
49 the parser module
50select
51 selectmodule.c
Tim Peters19f52c22001-01-24 10:07:22 +000052unicodedata
Tim Peters4b5fb072000-07-01 00:03:43 +000053 large tables of Unicode data
54winreg
55 Windows registry API
56winsound
57 play sounds (typically .wav files) under Windows
58
59The following subprojects will generally NOT build out of the box. They
60wrap code Python doesn't control, and you'll need to download the base
Tim Petersaff12842000-08-25 06:52:44 +000061packages first and unpack them into siblings of PCbuilds's parent
62directory; for example, if your PCbuild is .......\dist\src\PCbuild\,
63unpack into new subdirectories of dist\.
Tim Peters4b5fb072000-07-01 00:03:43 +000064
65_tkinter
Tim Petersaff12842000-08-25 06:52:44 +000066 Python wrapper for the Tk windowing system. Requires tcl832.exe from
Tim Peters610a8272000-07-01 02:51:23 +000067 http://dev.scriptics.com/software/tcltk/downloadnow83.html
Tim Petersaff12842000-08-25 06:52:44 +000068 Run the installer, forcing installation into dist\Tcl.
69 Be sure to install everything, including the Tcl/Tk header files.
Tim Peters4b5fb072000-07-01 00:03:43 +000070
71zlib
Tim Petersee826f82001-01-31 19:39:44 +000072 NOTE: This procedure is new (& simpler, & safer) for 2.1a2.
73 Python wrapper for the zlib compression library. Get the source code
74 for version 1.1.3 from a convenient mirror at:
75 http://www.info-zip.org/pub/infozip/zlib/
76 Unpack into dist\zlib-1.1.3.
77 A custom pre-link step in the zlib project settings should manage to
78 build zlib-1.1.3\zlib.lib by magic before zlib.pyd (or zlib_d.pyd) is
79 linked in PCbuild\.
80 However, the zlib project is not smart enough to remove anything under
81 zlib-1.1.3\ when you do a clean, so if you want to rebuild zlib.lib
82 you need to clean up zlib-1.1.3\ by hand.
Tim Peters4b5fb072000-07-01 00:03:43 +000083
84bsddb
Tim Peters610a8272000-07-01 02:51:23 +000085 Python wrapper for the BSD database 1.85. Requires db.1.85.win32.zip,
86 from the "bsd db" link at
Tim Peters4b5fb072000-07-01 00:03:43 +000087 http://www.nightmare.com/software.html
Tim Petersaff12842000-08-25 06:52:44 +000088 Unpack into dist\bsddb.
89 You then need to compile it: cd to dist\bsddb\Port\win32, and run
90 nmake -f makefile_nt.msc
91 This builds bsddb\Port\win32\db.lib, which the MSVC project links in.
92 Note that if you're running Win9X, you'll need to run vcvars32.bat
93 before running nmake (this batch file is in your MSVC installation).
Tim Petersca873ed2001-02-01 05:10:02 +000094 TODO: make this work like zlib (in particular, MSVC runs the prelink
95 step in an enviroment that already has the correct envars set up).
Tim Peters4b5fb072000-07-01 00:03:43 +000096
97pyexpat
98 Python wrapper for accelerated XML parsing. Requires
99 ftp://ftp.jclark.com/pub/xml/expat.zip
Tim Petersaff12842000-08-25 06:52:44 +0000100 Unpack into dist\expat.
Tim Peters4b5fb072000-07-01 00:03:43 +0000101
102
103NOTE ON CONFIGURATIONS
104----------------------
105Under Build -> Configuration ..., you'll find several Alpha configurations,
106such as "Win32 Alpha Release". These do not refer to alpha versions (as in
107alpha, beta, final), but to the DEC/COMPAQ Alpha processor. Ignore them if
108you're not building on an Alpha box.
109
110
Tim Petersf9a4a6e2000-07-01 20:38:27 +0000111YOUR OWN EXTENSION DLLs
Tim Peters4b5fb072000-07-01 00:03:43 +0000112-----------------------
113If you want to create your own extension module DLL, there's an example
114with easy-to-follow instructions in ../PC/example/; read the file
115readme.txt there first.