blob: b5df029fb08b7079bb1b7e529fa233986c4f7f5a [file] [log] [blame]
Guido van Rossum082d2891997-05-16 16:24:09 +00001Welcome to the "PC" subdirectory of the Python distribution!
2************************************************************
3
4
5This "PC" subdirectory contains complete project files to make
6several PC ports of Python, as well as all the PC-specific
7Python source files. It should be located in the root of the
8Python distribution, and there should be directories "Modules",
9"Objects", "Python", etc. in the parent directory of this "PC"
10subdirectory.
11
12Be sure to read the documentation in the Python distribution. You
13must set the environment variable PYTHONPATH to point to your Python
14library directory. This is "../Lib", but you must use an absolute path,
15and perhaps copy it somewhere else. Be sure to include the Windows
16specific directory "win" too. If you use a DOS FAT file system and
17either a DOS or Windows 3.1x Python version, you should also put
18../Lib/dos_8x3 on your PYTHONPATH too, since it has DOS 8x3 names
19for the standard Python library names. So your autoexec.bat should have:
20 set PYTHONPATH=.;c:\python\lib;c:\python\lib\win
21for Windows NT or
22 set PYTHONPATH=.;c:\python\lib;c:\python\lib\win;c:\python\lib\dos_8x3
23for DOS or Windows 3.1x (change the path to the correct path).
24
25There are several add-in modules to build Python programs which use
26the native Windows operating environment. The ports here just make
27"QuickWin" and DOS Python versions which support a character-mode
28(console) environment. Look in www.python.org for Tkinter, PythonWin,
29WPY and wxPython.
30
31To make a Python port, start the Integrated Development Environment
32(IDE) of your compiler, and read in the native "project file"
33(or makefile) provided. This will enable you to change any source
34files or build settings so you can make custom builds.
35
36config.h An important configuration file specific to PC's.
37
38config.c The list of C modules to include in the Python PC
39 version. Manually edit this file to add or
40 remove Python modules.
41
42testpy.py A Python test program. Run this to test your
43 Python port. It should say "all tests OK".
44
45src A subdirectory used only for VC++ version 1.5 Python
46 source files. See below. The other compilers do not
47 use it. They reference the actual distribution
48 directories instead.
49
50
51Microsoft Visual C++ Version 4.0 (32-bit Windows)
52=================================================
53
54(While we have done all our testing with VC version 4.0, we are
55confident that the same procedure will work for versions 4.1 and 4.2.)
56
57The distributed Makefile is vc40.mak. This file is distributed with
58CRLF line separators, otherwise Developer Studio won't like it. It
59will NOT work from this PC directory. To use it, first copy it to the
60Python distribution directory, e.g. with this command:
61 copy vc40.mak ..
62To convert the Makefile into a project file, start Developer Studio,
63choose Open Workspace, change the file name pattern to *.mak, find and
64select the file vc40.mak, and click OK. Developer Studio will create
65additional project files vc40.ncb and vc40.mdp when you use the
66project. The project contains six targets, which should be built in
67this order:
68
69python14 The Python core as a DLL, named python14.dll.
70
71python The Python main program, named python.exe. This should
72 work as a console program under Windows 95 or NT, as well
73 as under Windows 3.1(1) when using win32s. It uses
74 python14.dll.
75
76_tkinter The optional _tkinter extension, _tkinter.dll; see below.
77
78ALl end products of the compilation are placed in the subdirectory
79vc40 (which Developer Studio creates); object files are placed in
80vc40/tmp. There are no separate Release and Debug project variants.
81Note that the python and _tkinter projects require that the
82python14.lib file exists in the vc40 subdirectory before they can be
83built.
84
85*** How to build the _tkinter extension ***
86
87This assumes that you have installed the Tcl/Tk binary distribution for
88Windows 95/NT with version numbers 7.5p1/4.1p1, in the default
89installation location (C:\tcl). (Ftp to ftp.sunlabs.com in /pub/tcl,
90file win41p1.exe.) You must also fetch and unpack the zip file
91vclibs41.zip which contains the files tcl75.lib and tk41.lib, and place
92those files in the PC subdirectory. In order to use _tkinter, the
93Tkinter.py module must be on PYTHONPATH. It is found in the
94Lib\tkinter subdirectory.
95
96
97Additional files and subdirectories for 32-bit Windows
98======================================================
99
100python_nt.def Exports definition file for python14.dll.
101
102python_nt.rc Resource compiler input for python14.dll.
103
104dl_nt.c, getpath_nt.c, import_nt.c
105 Additional sources used for 32-bit Windows features.
106
107main_nt.c Source for python.exe.
108
109dllbase_nt.txt A (manually maintained) list of base addresses for
110 various DLLs, to avoid run-time relocation.
111
112_tkinter.def The export definitions file for _tkinter.dll.
113
114make_nt.in Include file for nmake-based builds (unsupported).
115
116example_nt A subdirectory showing how to build an extension as a
117 DLL.
118
119setup_nt A subdirectory containing an experimental installer
120 using Python only.
121
122
123Microsoft Visual C++ Version 1.5 (16-bit Windows)
124=================================================
125
126Since VC++1.5 does not handle long file names, it is necessary
127to run the "makesrc.exe" program in this directory to copy
128Python files from the distribution to the directory "src"
129with shortened names. Included file names are shortened too.
130Do this before you attempt to build Python.
131
132The "makesrc.exe" program is a native NT program, and you must
133have NT, Windows 95 or Win32s to run it. Otherwise you will need
134to copy distribution files to src yourself.
135
136The makefiles are named *.mak and are located in directories
137starting with "vc15_". NOTE: When dependencies are scanned
138VC++ will create dependencies for directories which are not
139used because it fails to evaluate "#define" properly. You
140must manaully edit makefiles (*.mak) to remove references to
141"sys/" and other bad directories.
142
143vc15_lib A static Python library. Create this first because is
144 is required for vc15_w31.
145
146vc15_w31 A Windows 3.1x Python QuickWin (console-mode)
147 Python including sockets. Requires vc15_lib.
148
149
150Watcom C++ Version 10.6
151=======================
152
153The project file for the Watcom compiler is ./python.wpj.
154It will build Watcom versions in the directories wat_*.
155
156wat_dos A 32-bit extended DOS Python (console-mode) using the
157 dos4gw DOS extender. Sockets are not included.
158
159wat_os2 A 32-bit OS/2 Python (console-mode).
160 Sockets are not included.