Guido van Rossum | 1bc716f | 1996-06-28 19:12:06 +0000 | [diff] [blame^] | 1 | Welcome to the "PC" subdirectory of the Python distribution! |
| 2 | |
| 3 | |
| 4 | This "PC" subdirectory contains complete project files to make |
| 5 | several PC ports of Python, as well as all the PC-specific |
| 6 | Python source files. It should be located in the root of the |
| 7 | Python distribution, and there should be directories "Modules", |
| 8 | "Objects", "Python", etc. in the parent directory of this "PC" |
| 9 | subdirectory. |
| 10 | |
| 11 | Be sure to read the documentation in the Python distribution. You |
| 12 | must set the environment variable PYTHONPATH to point to your Python |
| 13 | library directory. This is "../Lib", but you must use an absolute path, |
| 14 | and perhaps copy it somewhere else. Be sure to include the Windows |
| 15 | specific directory "win" too. If you use a DOS FAT file system and |
| 16 | either 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 |
| 18 | for the standard Python library names. So your autoexec.bat should have: |
| 19 | set PYTHONPATH=.;c:\python\lib;c:\python\lib\win |
| 20 | for Windows NT or |
| 21 | set PYTHONPATH=.;c:\python\lib;c:\python\lib\win;c:\python\lib\dos_8x3 |
| 22 | for DOS or Windows 3.1x (change the path to the correct path). |
| 23 | |
| 24 | There are several add-in modules to build Python programs which use |
| 25 | the 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, |
| 28 | WPY and wxPython. |
| 29 | |
| 30 | To 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 |
| 33 | files or build settings so you can make custom builds. |
| 34 | |
| 35 | config.h An important configuration file specific to PC's. |
| 36 | |
| 37 | config.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 | |
| 41 | testpy.py A Python test program. Run this to test your |
| 42 | Python port. It should say "all tests OK". |
| 43 | |
| 44 | src 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 | |
| 49 | Watcom C++ Version 10.6 |
| 50 | ======================= |
| 51 | |
| 52 | The project file for the Watcom compiler is ./python.wpj. |
| 53 | It will build Watcom versions in the directories wat_*. |
| 54 | |
| 55 | wat_dos A 32-bit extended DOS Python (console-mode) using the |
| 56 | dos4gw DOS extender. Sockets are not included. |
| 57 | |
| 58 | wat_os2 A 32-bit OS/2 Python (console-mode). |
| 59 | Sockets are not included. |
| 60 | |
| 61 | |
| 62 | Microsoft Visual C++ Version 4.0 (32-bit Windows) |
| 63 | ================================================= |
| 64 | |
| 65 | The project files are vc40.mdp, vc40.ncb and vc40.mak. They |
| 66 | will NOT work from this PC directory. To use them, first copy |
| 67 | them to the Python distribution directory with this command: |
| 68 | copy vc40.* .. |
| 69 | You may then want to remove them from here to prevent confusion. |
| 70 | |
| 71 | Once the project files are located in the directory just above |
| 72 | this one, start VC++ and read in the project. The targets are built |
| 73 | in the subdirectories vc40_*. |
| 74 | |
| 75 | vc40_dll The Python core built as an NT DLL. |
| 76 | |
| 77 | vc40_nt A Windows NT and 95 Python QuickWin (console-mode) |
| 78 | version of Python including sockets. It is |
| 79 | self-contained, and does not require any DLL's. |
| 80 | |
| 81 | |
| 82 | Microsoft Visual C++ Version 1.5 (16-bit Windows) |
| 83 | ================================================= |
| 84 | |
| 85 | Since VC++1.5 does not handle long file names, it is necessary |
| 86 | to run the "makesrc.exe" program in this directory to copy |
| 87 | Python files from the distribution to the directory "src" |
| 88 | with shortened names. Included file names are shortened too. |
| 89 | Do this before you attempt to build Python. |
| 90 | |
| 91 | The "makesrc.exe" program is a native NT program, and you must |
| 92 | have NT, Windows 95 or Win32s to run it. Otherwise you will need |
| 93 | to copy distribution files to src yourself. |
| 94 | |
| 95 | The makefiles are named *.mak and are located in directories |
| 96 | starting with "vc15_". NOTE: When dependencies are scanned |
| 97 | VC++ will create dependencies for directories which are not |
| 98 | used because it fails to evaluate "#define" properly. You |
| 99 | must manaully edit makefiles (*.mak) to remove references to |
| 100 | "sys/" and other bad directories. |
| 101 | |
| 102 | vc15_lib A static Python library. Create this first because is |
| 103 | is required for vc15_w31. |
| 104 | |
| 105 | vc15_w31 A Windows 3.1x Python QuickWin (console-mode) |
| 106 | Python including sockets. Requires vc15_lib. |