- Got rid of newmodule.c
[python/dscho.git] / PCbuild / readme.txt
blob082f31ab055b37b2b6250b64c7c1b60f4173a1fb
1 Building Python using VC++ 6.0 or 5.0
2 -------------------------------------
3 This directory is used to build Python for Win32 platforms, e.g. Windows
4 95, 98 and NT.  It requires Microsoft Visual C++ 6.x or 5.x.
5 (For other Windows platforms and compilers, see ../PC/readme.txt.)
7 All you need to do is open the workspace "pcbuild.dsw" in MSVC++, select
8 the Debug or Release setting (using Build -> Set Active Configuration...),
9 and build the projects.
11 The proper order to build subprojects:
13 1) pythoncore (this builds the main Python DLL and library files,
14                python21.{dll, lib} in Release mode)
15               NOTE:  in previous releases, this subproject was
16               named after the release number, e.g. python20.
18 2) python (this builds the main Python executable,
19            python.exe in Release mode)
21 3) 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)
26 When using the Debug setting, the output files have a _d added to
27 their name:  python21_d.dll, python_d.exe, parser_d.pyd, and so on.
29 SUBPROJECTS
30 -----------
31 These subprojects should build out of the box.  Subprojects other than the
32 main ones (pythoncore, python, pythonw) generally build a DLL (renamed to
33 .pyd) from a specific module so that users don't have to load the code
34 supporting that module unless they import the module.
36 pythoncore
37     .dll and .lib
38 python
39     .exe
40 pythonw
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
46 _symtable
47     the _symtable module, symtablemodule.c
48 _testcapi
49     tests of the Python C API, run via Lib/test/test_capi.py, and
50     implemented by module Modules/_testcapimodule.c
51 mmap
52     mmapmodule.c
53 parser
54     the parser module
55 pyexpat
56     Python wrapper for accelerated XML parsing, which incorporates stable
57     code from the Expat project:  http://sourceforge.net/projects/expat/
58 select
59     selectmodule.c
60 unicodedata
61     large tables of Unicode data
62 winreg
63     Windows registry API
64 winsound
65     play sounds (typically .wav files) under Windows
67 The following subprojects will generally NOT build out of the box.  They
68 wrap code Python doesn't control, and you'll need to download the base
69 packages first and unpack them into siblings of PCbuilds's parent
70 directory; for example, if your PCbuild is  .......\dist\src\PCbuild\,
71 unpack into new subdirectories of dist\.
73 _tkinter
74     Python wrapper for the Tk windowing system.  Requires tcl832.exe from
75         http://dev.scriptics.com/software/tcltk/downloadnow83.html
76     Run the installer, forcing installation into dist\Tcl.
77     Be sure to install everything, including the Tcl/Tk header files.
79 zlib
80     Python wrapper for the zlib compression library.  Get the source code
81     for version 1.1.4 from a convenient mirror at:
82         http://www.gzip.org/zlib/
83     Unpack into dist\zlib-1.1.4.
84     A custom pre-link step in the zlib project settings should manage to
85     build zlib-1.1.4\zlib.lib by magic before zlib.pyd (or zlib_d.pyd) is
86     linked in PCbuild\.
87     However, the zlib project is not smart enough to remove anything under
88     zlib-1.1.4\ when you do a clean, so if you want to rebuild zlib.lib
89     you need to clean up zlib-1.1.4\ by hand.
91 bsddb
92     Python wrapper for the BSD database 1.85.  Requires db.1.85.win32.zip,
93     from the "bsd db" link at
94         http://www.nightmare.com/software.html
95     Unpack into dist\bsddb.
96     You then need to compile it:  cd to dist\bsddb\Port\win32, and run
97         nmake -f makefile_nt.msc
98     This builds bsddb\Port\win32\db.lib, which the MSVC project links in.
99     Note that if you're running Win9X, you'll need to run vcvars32.bat
100     before running nmake (this batch file is in your MSVC installation).
101     TODO:  make this work like zlib (in particular, MSVC runs the prelink
102     step in an enviroment that already has the correct envars set up).
105 NOTE ON CONFIGURATIONS
106 ----------------------
107 Under Build -> Configuration ..., you'll find several Alpha configurations,
108 such as "Win32 Alpha Release".  These do not refer to alpha versions (as in
109 alpha, beta, final), but to the DEC/COMPAQ Alpha processor.  Ignore them if
110 you're not building on an Alpha box.
113 YOUR OWN EXTENSION DLLs
114 -----------------------
115 If you want to create your own extension module DLL, there's an example
116 with easy-to-follow instructions in ../PC/example/; read the file
117 readme.txt there first.