blob: c62620804607346bd73770dee6ff44fc9f8bc1ee [file] [log] [blame]
Guido van Rossum1bc716f1996-06-28 19:12:06 +00001Welcome to the "PC" subdirectory of the Python distribution!
Guido van Rossume982ee31996-09-06 21:46:10 +00002************************************************************
Guido van Rossum1bc716f1996-06-28 19:12:06 +00003
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
Guido van Rossum1bc716f1996-06-28 19:12:06 +000050
51Microsoft Visual C++ Version 4.0 (32-bit Windows)
52=================================================
53
Guido van Rossum331a8971996-08-22 00:28:34 +000054The distributed Makefile is vc40.mak. This file is distributed with
55CRLF line separators, otherwise Developer Studio won't like it. It
56will NOT work from this PC directory. To use it, first copy it to the
57Python distribution directory, e.g. with this command:
58 copy vc40.mak ..
59To convert the Makefile into a project file, start Developer Studio,
60choose Open Workspace, change the file name pattern to *.mak, find and
61select the file vc40.mak, and click OK. Developer Studio will create
62additional project files vc40.ncb and vc40.mdp when you use the
Guido van Rossume982ee31996-09-06 21:46:10 +000063project. The project contains six targets, which should be built in
Guido van Rossum331a8971996-08-22 00:28:34 +000064this order:
Guido van Rossum1bc716f1996-06-28 19:12:06 +000065
Guido van Rossum331a8971996-08-22 00:28:34 +000066python14 The Python core as a DLL, named python14.dll.
Guido van Rossum1bc716f1996-06-28 19:12:06 +000067
Guido van Rossume982ee31996-09-06 21:46:10 +000068python The Python main program, named python.exe. This should
69 work as a console program under Windows 95 or NT, as well
70 as under Windows 3.1(1) when using win32s. It uses
71 python14.dll.
Guido van Rossum1bc716f1996-06-28 19:12:06 +000072
Guido van Rossum331a8971996-08-22 00:28:34 +000073_tkinter The optional _tkinter extension, _tkinter.dll; see below.
74
Guido van Rossume982ee31996-09-06 21:46:10 +000075NumPy, multiarray, fast_umath
76 Optional projects to build Numerical Python.
Guido van Rossumcbc66761996-08-23 15:48:14 +000077
Guido van Rossum331a8971996-08-22 00:28:34 +000078ALl 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
Guido van Rossum983c5521996-09-05 03:15:22 +000087This assumes that you have installed the Tcl/Tk binary distribution for
88Windows 95/NT with version numbers 7.5p1/4.1p1, in the default
Guido van Rossum331a8971996-08-22 00:28:34 +000089installation location (C:\tcl). (Ftp to ftp.sunlabs.com in /pub/tcl,
Guido van Rossum983c5521996-09-05 03:15:22 +000090file 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
Guido van Rossum331a8971996-08-22 00:28:34 +000093Tkinter.py module must be on PYTHONPATH. It is found in the
94Lib\tkinter subdirectory.
Guido van Rossum1bc716f1996-06-28 19:12:06 +000095
Guido van Rossumcbc66761996-08-23 15:48:14 +000096*** How to build Numerical Python ***
97
98This has been tested only with NumPy 1.0alpha2. Unpack the NumPy
99tarfile so that it creates a NumPy subdirectory in the Python
100distribution directory. You need to create exports files
101NumPy/multiarray.def and NumPy/fast_umath.def (see PC/_tkinter.def for
102an example). Then build the targets NumPy, multiarray and fast_umath,
103in that order. To use Numerical Python you have to append NumPy/Lib
104to sys.path.
105
Guido van Rossum1bc716f1996-06-28 19:12:06 +0000106
Guido van Rossume982ee31996-09-06 21:46:10 +0000107Additional files and subdirectories for 32-bit Windows
108======================================================
109
110python_nt.def Exports definition file for python14.dll.
111
112python_nt.rc Resource compiler input for python14.dll.
113
114dl_nt.c, getpath_nt.c, import_nt.c
115 Additional sources used for 32-bit Windows features.
116
117main_nt.c Source for python.exe.
118
119dllbase_nt.txt A (manually maintained) list of base addresses for
120 various DLLs, to avoid run-time relocation.
121
122_tkinter.def The export definitions file for _tkinter.dll.
123
124make_nt.in Include file for nmake-based builds (unsupported).
125
126example_nt A subdirectory showing how to build an extension as a
127 DLL.
128
129setup_nt A subdirectory containing an experimental installer
130 using Python only.
131
132
Guido van Rossum1bc716f1996-06-28 19:12:06 +0000133Microsoft Visual C++ Version 1.5 (16-bit Windows)
134=================================================
135
136Since VC++1.5 does not handle long file names, it is necessary
137to run the "makesrc.exe" program in this directory to copy
138Python files from the distribution to the directory "src"
139with shortened names. Included file names are shortened too.
140Do this before you attempt to build Python.
141
142The "makesrc.exe" program is a native NT program, and you must
143have NT, Windows 95 or Win32s to run it. Otherwise you will need
144to copy distribution files to src yourself.
145
146The makefiles are named *.mak and are located in directories
147starting with "vc15_". NOTE: When dependencies are scanned
148VC++ will create dependencies for directories which are not
149used because it fails to evaluate "#define" properly. You
150must manaully edit makefiles (*.mak) to remove references to
151"sys/" and other bad directories.
152
153vc15_lib A static Python library. Create this first because is
154 is required for vc15_w31.
155
156vc15_w31 A Windows 3.1x Python QuickWin (console-mode)
157 Python including sockets. Requires vc15_lib.
Guido van Rossume982ee31996-09-06 21:46:10 +0000158
159
160Watcom C++ Version 10.6
161=======================
162
163The project file for the Watcom compiler is ./python.wpj.
164It will build Watcom versions in the directories wat_*.
165
166wat_dos A 32-bit extended DOS Python (console-mode) using the
167 dos4gw DOS extender. Sockets are not included.
168
169wat_os2 A 32-bit OS/2 Python (console-mode).
170 Sockets are not included.