| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 1 | Building Python using VC++ 6.0 or 5.0 | 
| Guido van Rossum | a29b360 | 2000-03-29 01:51:37 +0000 | [diff] [blame] | 2 | ------------------------------------- | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 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. | 
| Guido van Rossum | 15b239f | 1998-05-26 14:16:23 +0000 | [diff] [blame] | 5 | (For other Windows platforms and compilers, see ../PC/readme.txt.) | 
 | 6 |  | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 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. | 
| Guido van Rossum | 15b239f | 1998-05-26 14:16:23 +0000 | [diff] [blame] | 10 |  | 
| Tim Peters | befc97c | 2001-01-18 19:01:39 +0000 | [diff] [blame] | 11 | The proper order to build subprojects: | 
| Guido van Rossum | 15b239f | 1998-05-26 14:16:23 +0000 | [diff] [blame] | 12 |  | 
| Tim Peters | 97c9640 | 2001-01-17 23:23:13 +0000 | [diff] [blame] | 13 | 1) pythoncore (this builds the main Python DLL and library files, | 
| Tim Peters | befc97c | 2001-01-18 19:01:39 +0000 | [diff] [blame] | 14 |                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 Rossum | 15b239f | 1998-05-26 14:16:23 +0000 | [diff] [blame] | 17 |  | 
| Tim Peters | befc97c | 2001-01-18 19:01:39 +0000 | [diff] [blame] | 18 | 2) python (this builds the main Python executable, | 
 | 19 |            python.exe in Release mode) | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 20 |  | 
 | 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) | 
| Guido van Rossum | 15b239f | 1998-05-26 14:16:23 +0000 | [diff] [blame] | 25 |  | 
 | 26 | When using the Debug setting, the output files have a _d added to | 
| Tim Peters | 97c9640 | 2001-01-17 23:23:13 +0000 | [diff] [blame] | 27 | their name:  python21_d.dll, python_d.exe, parser_d.pyd, and so on. | 
| Guido van Rossum | e79cf32 | 1998-07-07 22:35:03 +0000 | [diff] [blame] | 28 |  | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 29 | SUBPROJECTS | 
 | 30 | ----------- | 
| Tim Peters | 610a827 | 2000-07-01 02:51:23 +0000 | [diff] [blame] | 31 | These subprojects should build out of the box.  Subprojects other than the | 
| Tim Peters | befc97c | 2001-01-18 19:01:39 +0000 | [diff] [blame] | 32 | main ones (pythoncore, python, pythonw) generally build a DLL (renamed to | 
| Tim Peters | 610a827 | 2000-07-01 02:51:23 +0000 | [diff] [blame] | 33 | .pyd) from a specific module so that users don't have to load the code | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 34 | supporting that module unless they import the module. | 
| Guido van Rossum | e79cf32 | 1998-07-07 22:35:03 +0000 | [diff] [blame] | 35 |  | 
| Tim Peters | 97c9640 | 2001-01-17 23:23:13 +0000 | [diff] [blame] | 36 | pythoncore | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 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 | 
| Tim Peters | b16c56f | 2001-02-02 21:24:51 +0000 | [diff] [blame] | 46 | _symtable | 
 | 47 |     the _symtable module, symtablemodule.c | 
| Tim Peters | d66595f | 2001-02-04 03:09:53 +0000 | [diff] [blame] | 48 | _testcapi | 
| Tim Peters | b16c56f | 2001-02-02 21:24:51 +0000 | [diff] [blame] | 49 |     tests of the Python C API, run via Lib/test/test_capi.py, and | 
| Tim Peters | d66595f | 2001-02-04 03:09:53 +0000 | [diff] [blame] | 50 |     implemented by module Modules/_testcapimodule.c | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 51 | mmap | 
 | 52 |     mmapmodule.c | 
 | 53 | parser | 
 | 54 |     the parser module | 
 | 55 | select | 
 | 56 |     selectmodule.c | 
| Tim Peters | 19f52c2 | 2001-01-24 10:07:22 +0000 | [diff] [blame] | 57 | unicodedata | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 58 |     large tables of Unicode data | 
 | 59 | winreg | 
 | 60 |     Windows registry API | 
 | 61 | winsound | 
 | 62 |     play sounds (typically .wav files) under Windows | 
 | 63 |  | 
 | 64 | The following subprojects will generally NOT build out of the box.  They | 
 | 65 | wrap code Python doesn't control, and you'll need to download the base | 
| Tim Peters | aff1284 | 2000-08-25 06:52:44 +0000 | [diff] [blame] | 66 | packages first and unpack them into siblings of PCbuilds's parent | 
 | 67 | directory; for example, if your PCbuild is  .......\dist\src\PCbuild\, | 
 | 68 | unpack into new subdirectories of dist\. | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 69 |  | 
 | 70 | _tkinter | 
| Tim Peters | aff1284 | 2000-08-25 06:52:44 +0000 | [diff] [blame] | 71 |     Python wrapper for the Tk windowing system.  Requires tcl832.exe from | 
| Tim Peters | 610a827 | 2000-07-01 02:51:23 +0000 | [diff] [blame] | 72 |         http://dev.scriptics.com/software/tcltk/downloadnow83.html | 
| Tim Peters | aff1284 | 2000-08-25 06:52:44 +0000 | [diff] [blame] | 73 |     Run the installer, forcing installation into dist\Tcl. | 
 | 74 |     Be sure to install everything, including the Tcl/Tk header files. | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 75 |  | 
 | 76 | zlib | 
| Tim Peters | ee826f8 | 2001-01-31 19:39:44 +0000 | [diff] [blame] | 77 |     NOTE: This procedure is new (& simpler, & safer) for 2.1a2. | 
 | 78 |     Python wrapper for the zlib compression library.  Get the source code | 
 | 79 |     for version 1.1.3 from a convenient mirror at: | 
 | 80 |         http://www.info-zip.org/pub/infozip/zlib/ | 
 | 81 |     Unpack into dist\zlib-1.1.3. | 
 | 82 |     A custom pre-link step in the zlib project settings should manage to | 
 | 83 |     build zlib-1.1.3\zlib.lib by magic before zlib.pyd (or zlib_d.pyd) is | 
 | 84 |     linked in PCbuild\. | 
 | 85 |     However, the zlib project is not smart enough to remove anything under | 
 | 86 |     zlib-1.1.3\ when you do a clean, so if you want to rebuild zlib.lib | 
 | 87 |     you need to clean up zlib-1.1.3\ by hand. | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 88 |  | 
 | 89 | bsddb | 
| Tim Peters | 610a827 | 2000-07-01 02:51:23 +0000 | [diff] [blame] | 90 |     Python wrapper for the BSD database 1.85.  Requires db.1.85.win32.zip, | 
 | 91 |     from the "bsd db" link at | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 92 |         http://www.nightmare.com/software.html | 
| Tim Peters | aff1284 | 2000-08-25 06:52:44 +0000 | [diff] [blame] | 93 |     Unpack into dist\bsddb. | 
 | 94 |     You then need to compile it:  cd to dist\bsddb\Port\win32, and run | 
 | 95 |         nmake -f makefile_nt.msc | 
 | 96 |     This builds bsddb\Port\win32\db.lib, which the MSVC project links in. | 
 | 97 |     Note that if you're running Win9X, you'll need to run vcvars32.bat | 
 | 98 |     before running nmake (this batch file is in your MSVC installation). | 
| Tim Peters | ca873ed | 2001-02-01 05:10:02 +0000 | [diff] [blame] | 99 |     TODO:  make this work like zlib (in particular, MSVC runs the prelink | 
 | 100 |     step in an enviroment that already has the correct envars set up). | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 101 |  | 
 | 102 | pyexpat | 
 | 103 |     Python wrapper for accelerated XML parsing.  Requires | 
 | 104 |         ftp://ftp.jclark.com/pub/xml/expat.zip | 
| Tim Peters | aff1284 | 2000-08-25 06:52:44 +0000 | [diff] [blame] | 105 |     Unpack into dist\expat. | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 106 |  | 
 | 107 |  | 
 | 108 | NOTE ON CONFIGURATIONS | 
 | 109 | ---------------------- | 
 | 110 | Under Build -> Configuration ..., you'll find several Alpha configurations, | 
 | 111 | such as "Win32 Alpha Release".  These do not refer to alpha versions (as in | 
 | 112 | alpha, beta, final), but to the DEC/COMPAQ Alpha processor.  Ignore them if | 
 | 113 | you're not building on an Alpha box. | 
 | 114 |  | 
 | 115 |  | 
| Tim Peters | f9a4a6e | 2000-07-01 20:38:27 +0000 | [diff] [blame] | 116 | YOUR OWN EXTENSION DLLs | 
| Tim Peters | 4b5fb07 | 2000-07-01 00:03:43 +0000 | [diff] [blame] | 117 | ----------------------- | 
 | 118 | If you want to create your own extension module DLL, there's an example | 
 | 119 | with easy-to-follow instructions in ../PC/example/; read the file | 
 | 120 | readme.txt there first. |