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