Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 1 | Welcome to the "PC" subdirectory of the Python distribution!
|
| 2 | ************************************************************
|
| 3 |
|
Guido van Rossum | 2028dd0 | 1998-05-26 14:20:15 +0000 | [diff] [blame] | 4 | (NOTE: the project files for MS VC++ 5.x are now in the PCbuild
|
| 5 | directory. See the file readme.txt there for instructions.)
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 6 |
|
| 7 | This "PC" subdirectory contains complete project files to make
|
| 8 | several PC ports of Python, as well as all the PC-specific
|
| 9 | Python source files. It should be located in the root of the
|
| 10 | Python distribution, and there should be directories "Modules",
|
| 11 | "Objects", "Python", etc. in the parent directory of this "PC"
|
Guido van Rossum | 1aa7e3a | 1997-05-19 14:16:21 +0000 | [diff] [blame] | 12 | subdirectory. Be sure to read the documentation in the Python
|
| 13 | distribution.
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 14 |
|
Guido van Rossum | 1aa7e3a | 1997-05-19 14:16:21 +0000 | [diff] [blame] | 15 | Python requires library files such as string.py to be available in
|
| 16 | one or more library directories. The search path of libraries is
|
| 17 | set up when Python starts. To see the current Python library search
|
| 18 | path, start Python and enter "import sys" and "print sys.path".
|
| 19 |
|
Guido van Rossum | 831c258 | 1997-08-14 22:57:33 +0000 | [diff] [blame] | 20 | All PC ports use this scheme to try to set up a module search path:
|
Guido van Rossum | 1aa7e3a | 1997-05-19 14:16:21 +0000 | [diff] [blame] | 21 |
|
Guido van Rossum | 831c258 | 1997-08-14 22:57:33 +0000 | [diff] [blame] | 22 | 1) The script location; the current directory without script.
|
| 23 | 2) The PYTHONPATH variable, if set.
|
| 24 | 3) For Win32 platforms (NT/95), paths specified in the Registry.
|
| 25 | 4) Default directories lib, lib/win, lib/test, lib/tkinter;
|
| 26 | these are searched relative to the environment variable
|
| 27 | PYTHONHOME, if set, or relative to the executable and its
|
| 28 | ancestors, if a landmark file (Lib/string.py) is found ,
|
| 29 | or the current directory (not useful).
|
| 30 | 5) The directory containing the executable.
|
| 31 |
|
| 32 | The best installation strategy is to put the Python executable (and
|
| 33 | DLL, for Win32 platforms) in some convenient directory such as
|
| 34 | C:/python, and copy all library files and subdirectories (using XCOPY)
|
| 35 | to C:/python/lib. Then you don't need to set PYTHONPATH. Otherwise,
|
| 36 | set the environment variable PYTHONPATH to your Python search path.
|
| 37 | For example,
|
Guido van Rossum | ffeb5938 | 1997-12-17 21:27:23 +0000 | [diff] [blame] | 38 | set PYTHONPATH=.;d:\python\lib;d:\python\lib\win;d:\python\lib\dos-8x3
|
Guido van Rossum | 1aa7e3a | 1997-05-19 14:16:21 +0000 | [diff] [blame] | 39 |
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 40 | There are several add-in modules to build Python programs which use
|
| 41 | the native Windows operating environment. The ports here just make
|
| 42 | "QuickWin" and DOS Python versions which support a character-mode
|
| 43 | (console) environment. Look in www.python.org for Tkinter, PythonWin,
|
| 44 | WPY and wxPython.
|
| 45 |
|
| 46 | To make a Python port, start the Integrated Development Environment
|
| 47 | (IDE) of your compiler, and read in the native "project file"
|
| 48 | (or makefile) provided. This will enable you to change any source
|
| 49 | files or build settings so you can make custom builds.
|
| 50 |
|
| 51 | config.h An important configuration file specific to PC's.
|
| 52 |
|
| 53 | config.c The list of C modules to include in the Python PC
|
| 54 | version. Manually edit this file to add or
|
| 55 | remove Python modules.
|
| 56 |
|
| 57 | testpy.py A Python test program. Run this to test your
|
Guido van Rossum | 831c258 | 1997-08-14 22:57:33 +0000 | [diff] [blame] | 58 | Python port. It should produce copious output,
|
| 59 | ending in a report on how many tests were OK, how many
|
| 60 | failed, and how many were skipped. Don't worry about
|
| 61 | skipped tests (these test unavailable optional features).
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 62 |
|
| 63 | src A subdirectory used only for VC++ version 1.5 Python
|
| 64 | source files. See below. The other compilers do not
|
| 65 | use it. They reference the actual distribution
|
| 66 | directories instead.
|
| 67 |
|
| 68 |
|
Guido van Rossum | e34b7de | 1997-05-19 20:01:57 +0000 | [diff] [blame] | 69 | Microsoft Visual C++ Version 4.x (32-bit Windows)
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 70 | =================================================
|
| 71 |
|
Guido van Rossum | e34b7de | 1997-05-19 20:01:57 +0000 | [diff] [blame] | 72 | (For historic reasons this uses the filename "vc40"; it has been tested
|
Guido van Rossum | 2028dd0 | 1998-05-26 14:20:15 +0000 | [diff] [blame] | 73 | most recently with VC 4.2. See ../PCbuild for VC 5.x.)
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 74 |
|
Guido van Rossum | 85f8b09 | 1997-12-15 18:31:32 +0000 | [diff] [blame] | 75 | NOTE: VC 4.2 support is eroding, as I no longer have a VC 4.2
|
Guido van Rossum | 7988206 | 1997-12-16 22:26:02 +0000 | [diff] [blame] | 76 | installation. Some newer files need to be added to the project.
|
Guido van Rossum | 85f8b09 | 1997-12-15 18:31:32 +0000 | [diff] [blame] | 77 |
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 78 | The distributed Makefile is vc40.mak. This file is distributed with
|
| 79 | CRLF line separators, otherwise Developer Studio won't like it. It
|
| 80 | will NOT work from this PC directory. To use it, first copy it to the
|
| 81 | Python distribution directory, e.g. with this command:
|
| 82 | copy vc40.mak ..
|
| 83 | To convert the Makefile into a project file, start Developer Studio,
|
| 84 | choose Open Workspace, change the file name pattern to *.mak, find and
|
| 85 | select the file vc40.mak, and click OK. Developer Studio will create
|
| 86 | additional project files vc40.ncb and vc40.mdp when you use the
|
| 87 | project. The project contains six targets, which should be built in
|
| 88 | this order:
|
| 89 |
|
Guido van Rossum | e34b7de | 1997-05-19 20:01:57 +0000 | [diff] [blame] | 90 | python15 The Python core as a DLL, named python15.dll.
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 91 |
|
| 92 | python The Python main program, named python.exe. This should
|
| 93 | work as a console program under Windows 95 or NT, as well
|
| 94 | as under Windows 3.1(1) when using win32s. It uses
|
Guido van Rossum | e34b7de | 1997-05-19 20:01:57 +0000 | [diff] [blame] | 95 | python15.dll.
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 96 |
|
| 97 | _tkinter The optional _tkinter extension, _tkinter.dll; see below.
|
| 98 |
|
Guido van Rossum | 1aa7e3a | 1997-05-19 14:16:21 +0000 | [diff] [blame] | 99 | All end products of the compilation are placed in the subdirectory
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 100 | vc40 (which Developer Studio creates); object files are placed in
|
| 101 | vc40/tmp. There are no separate Release and Debug project variants.
|
| 102 | Note that the python and _tkinter projects require that the
|
Guido van Rossum | e34b7de | 1997-05-19 20:01:57 +0000 | [diff] [blame] | 103 | python15.lib file exists in the vc40 subdirectory before they can be
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 104 | built.
|
| 105 |
|
| 106 | *** How to build the _tkinter extension ***
|
| 107 |
|
| 108 | This assumes that you have installed the Tcl/Tk binary distribution for
|
| 109 | Windows 95/NT with version numbers 7.5p1/4.1p1, in the default
|
| 110 | installation location (C:\tcl). (Ftp to ftp.sunlabs.com in /pub/tcl,
|
| 111 | file win41p1.exe.) You must also fetch and unpack the zip file
|
| 112 | vclibs41.zip which contains the files tcl75.lib and tk41.lib, and place
|
| 113 | those files in the PC subdirectory. In order to use _tkinter, the
|
| 114 | Tkinter.py module must be on PYTHONPATH. It is found in the
|
| 115 | Lib\tkinter subdirectory.
|
| 116 |
|
| 117 |
|
| 118 | Additional files and subdirectories for 32-bit Windows
|
| 119 | ======================================================
|
| 120 |
|
Guido van Rossum | e34b7de | 1997-05-19 20:01:57 +0000 | [diff] [blame] | 121 | python_nt.def Exports definition file for python15.dll.
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 122 |
|
Guido van Rossum | e34b7de | 1997-05-19 20:01:57 +0000 | [diff] [blame] | 123 | python_nt.rc Resource compiler input for python15.dll.
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 124 |
|
Guido van Rossum | 831c258 | 1997-08-14 22:57:33 +0000 | [diff] [blame] | 125 | dl_nt.c, import_nt.c
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 126 | Additional sources used for 32-bit Windows features.
|
| 127 |
|
Guido van Rossum | 831c258 | 1997-08-14 22:57:33 +0000 | [diff] [blame] | 128 | getpathp.c Default sys.path calculations (for all PC platforms).
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 129 |
|
| 130 | dllbase_nt.txt A (manually maintained) list of base addresses for
|
| 131 | various DLLs, to avoid run-time relocation.
|
| 132 |
|
| 133 | _tkinter.def The export definitions file for _tkinter.dll.
|
Guido van Rossum | 831c258 | 1997-08-14 22:57:33 +0000 | [diff] [blame] | 134 | (No longer needed; the /export:init_tkinter takes care
|
| 135 | of this.)
|
Guido van Rossum | 082d289 | 1997-05-16 16:24:09 +0000 | [diff] [blame] | 136 |
|
| 137 | make_nt.in Include file for nmake-based builds (unsupported).
|
| 138 |
|
| 139 | example_nt A subdirectory showing how to build an extension as a
|
| 140 | DLL.
|
| 141 |
|
| 142 | setup_nt A subdirectory containing an experimental installer
|
| 143 | using Python only.
|
| 144 |
|
| 145 |
|
| 146 | Microsoft Visual C++ Version 1.5 (16-bit Windows)
|
| 147 | =================================================
|
| 148 |
|
| 149 | Since VC++1.5 does not handle long file names, it is necessary
|
| 150 | to run the "makesrc.exe" program in this directory to copy
|
| 151 | Python files from the distribution to the directory "src"
|
| 152 | with shortened names. Included file names are shortened too.
|
| 153 | Do this before you attempt to build Python.
|
| 154 |
|
| 155 | The "makesrc.exe" program is a native NT program, and you must
|
| 156 | have NT, Windows 95 or Win32s to run it. Otherwise you will need
|
| 157 | to copy distribution files to src yourself.
|
| 158 |
|
| 159 | The makefiles are named *.mak and are located in directories
|
| 160 | starting with "vc15_". NOTE: When dependencies are scanned
|
| 161 | VC++ will create dependencies for directories which are not
|
| 162 | used because it fails to evaluate "#define" properly. You
|
| 163 | must manaully edit makefiles (*.mak) to remove references to
|
| 164 | "sys/" and other bad directories.
|
| 165 |
|
| 166 | vc15_lib A static Python library. Create this first because is
|
| 167 | is required for vc15_w31.
|
| 168 |
|
| 169 | vc15_w31 A Windows 3.1x Python QuickWin (console-mode)
|
| 170 | Python including sockets. Requires vc15_lib.
|
| 171 |
|
| 172 |
|
| 173 | Watcom C++ Version 10.6
|
| 174 | =======================
|
| 175 |
|
| 176 | The project file for the Watcom compiler is ./python.wpj.
|
| 177 | It will build Watcom versions in the directories wat_*.
|
| 178 |
|
| 179 | wat_dos A 32-bit extended DOS Python (console-mode) using the
|
| 180 | dos4gw DOS extender. Sockets are not included.
|
| 181 |
|
| 182 | wat_os2 A 32-bit OS/2 Python (console-mode).
|
| 183 | Sockets are not included.
|
Guido van Rossum | 0ba48ba | 1997-11-22 21:58:14 +0000 | [diff] [blame] | 184 |
|
Guido van Rossum | cee1dca | 1997-12-05 22:06:23 +0000 | [diff] [blame] | 185 |
|
Guido van Rossum | 0ba48ba | 1997-11-22 21:58:14 +0000 | [diff] [blame] | 186 | IBM VisualAge C/C++ for OS/2
|
| 187 | ============================
|
| 188 |
|
Guido van Rossum | cee1dca | 1997-12-05 22:06:23 +0000 | [diff] [blame] | 189 | See os2vacpp/readme.txt. This platform is supported by Jeff Rush.
|