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