| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 1 | This is a port of Python 2.6 to OS/2 using the EMX development tools | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 2 | ========================================================================= | 
 | 3 |  | 
 | 4 | What's new since the previous release | 
 | 5 | ------------------------------------- | 
 | 6 |  | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 7 | Another day, another version... | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 8 |  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 9 |  | 
 | 10 | Licenses and info about Python and EMX | 
 | 11 | -------------------------------------- | 
 | 12 |  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 13 | Please read the file README.Python-2.6 included in this package for  | 
 | 14 | information about Python 2.6.  This file is the README file from the  | 
 | 15 | Python 2.6 source distribution available via http://www.python.org/  | 
 | 16 | and its mirrors.  The file LICENCE.Python-2.6 is the text of the Licence  | 
 | 17 | from the Python 2.6 source distribution. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 18 |  | 
 | 19 | Note that the EMX package that this package depends on is released under  | 
 | 20 | the GNU General Public Licence.  Please refer to the documentation  | 
 | 21 | accompanying the EMX Runtime libraries for more information about the  | 
 | 22 | implications of this.  A copy of version 2 of the GPL is included as the  | 
 | 23 | file COPYING.gpl2. | 
 | 24 |  | 
 | 25 | Readline and GDBM are covered by the GNU General Public Licence.  I think  | 
 | 26 | Eberhard Mattes' porting changes to BSD DB v1.85 are also GPL'ed (BSD DB  | 
 | 27 | itself is BSD Licenced).  ncurses and expat appear to be covered by MIT  | 
 | 28 | style licences - please refer to the source distributions for more detail.   | 
| Andrew MacIntyre | 3dac89e | 2004-10-03 08:26:36 +0000 | [diff] [blame] | 29 | zlib is distributable under a very free license.  GNU UFC is under the  | 
 | 30 | GNU LGPL (see file COPYING.lib). | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 31 |  | 
 | 32 | My patches to the Python-2.x source distributions, and any other packages  | 
 | 33 | used in this port, are placed in the public domain. | 
 | 34 |  | 
 | 35 | This software is provided 'as-is', without any express or implied warranty. | 
 | 36 | In no event will the author be held liable for any damages arising from the  | 
 | 37 | use of the software. | 
 | 38 |  | 
 | 39 | I do hope however that it proves useful to someone. | 
 | 40 |  | 
 | 41 |  | 
 | 42 | Other ports | 
 | 43 | ----------- | 
 | 44 |  | 
 | 45 | There have been ports of previous versions of Python to OS/2. | 
 | 46 |  | 
 | 47 | The best known would be that by Jeff Rush, most recently of version  | 
 | 48 | 1.5.2.  Jeff used IBM's Visual Age C++ (v3) for his ports, and his  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 49 | patches have been included in the Python 2.6 source distribution. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 50 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 51 | Andy Zabolotny implemented a port of Python v1.5.2 using the EMX  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 52 | development tools.  His patches against the Python v1.5.2 source  | 
 | 53 | distribution have become the core of this port, and without his efforts  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 54 | this port wouldn't exist.  Andy's port also appears to have been  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 55 | compiled with his port of gcc 2.95.2 to EMX, which I have but have  | 
| Andrew MacIntyre | fae8953 | 2003-06-09 08:15:14 +0000 | [diff] [blame] | 56 | chosen not to use for the binary distribution of this port (see item 16  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 57 | of the "YOU HAVE BEEN WARNED" section below). | 
 | 58 |  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 59 | It is possible to have these earlier ports still usable after installing  | 
 | 60 | this port - see the README.os2emx.multiple_versions file, contributed by | 
 | 61 | Dr David Mertz, for a suggested approach to achieving this. | 
 | 62 |  | 
 | 63 |  | 
 | 64 | Software requirements | 
 | 65 | --------------------- | 
 | 66 |  | 
 | 67 | This package requires the EMX Runtime package, available from the  | 
 | 68 | Hobbes (http://hobbes.nmsu.edu/) and LEO (http://archiv.leo.org/)  | 
 | 69 | archives of OS/2 software.  I have used EMX version 0.9d fix04 in  | 
 | 70 | developing this port. | 
 | 71 |  | 
 | 72 | My development system is running OS/2 v4 with fixpack 12. | 
 | 73 |  | 
 | 74 | 3rd party software which has been linked into dynamically loaded modules: | 
 | 75 | - ncurses      (see http://dickey.his.com/ for more info, v5.2) | 
 | 76 | - GNU Readline (Kai Uwe Rommel's port available from Hobbes or LEO, v2.1) | 
 | 77 | - GNU GDBM     (Kai Uwe Rommel's port available from Hobbes or LEO, v1.7.3) | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 78 | - zlib         (derived from Hung-Chi Chu's port of v1.1.3, v1.1.4) | 
 | 79 | - expat        (distributed with Python, v1.95.6) | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 80 | - GNU UFC      (Kai Uwe Rommel's port available from LEO, v2.0.4) | 
 | 81 |  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 82 |  | 
 | 83 | About this port | 
 | 84 | --------------- | 
 | 85 |  | 
 | 86 | I have attempted to make this port as complete and functional as I can,  | 
 | 87 | notwithstanding the issues in the "YOU HAVE BEEN WARNED" section below. | 
 | 88 |  | 
 | 89 | Core components: | 
 | 90 |  | 
 | 91 | Python.exe is linked as an a.out executable, ie using EMX method E1  | 
 | 92 | to compile & link the executable.  This is so that fork() works (see  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 93 | "YOU HAVE BEEN WARNED" item 1). | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 94 |  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 95 | Python26.dll is created as a normal OMF DLL, with an OMF import  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 96 | library and module definition file.  There is also an a.out (.a) import  | 
| Andrew MacIntyre | ffcf899 | 2002-08-18 06:28:21 +0000 | [diff] [blame] | 97 | library to support linking the DLL to a.out executables.  The DLL  | 
 | 98 | requires the EMX runtime DLLs. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 99 |  | 
 | 100 | This port has been built with complete support for multithreading. | 
 | 101 |  | 
 | 102 | Modules: | 
 | 103 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 104 | With the exception of modules that have a significant code size, or are  | 
 | 105 | not recommended or desired for normal use, the standard modules are now  | 
 | 106 | built into the core DLL rather than configured as dynamically loadable  | 
 | 107 | modules.  This is for both reasons of performance (startup time) and  | 
 | 108 | memory use (lots of small DLLs fragment the address space). | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 109 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 110 | I haven't yet changed the building of Python's dynamically loadable  | 
 | 111 | modules over to using the DistUtils. | 
 | 112 |  | 
 | 113 | See "YOU HAVE BEEN WARNED" item 3 for notes about the fcntl module, and  | 
 | 114 | "YOU HAVE BEEN WARNED" item 10 for notes about the pwd and grp modules. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 115 |  | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 116 | This port supports case sensitive module import semantics, matching  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 117 | the Windows release.  This can be deactivated by setting the PYTHONCASEOK  | 
 | 118 | environment variable (the value doesn't matter) - see "YOU HAVE BEEN WARNED"  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 119 | item 12. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 120 |  | 
 | 121 | Optional modules: | 
 | 122 |  | 
 | 123 | Where I've been able to locate the required 3rd party packages already  | 
 | 124 | ported to OS/2, I've built and included them. | 
 | 125 |  | 
| Georg Brandl | 1158a33 | 2009-06-04 09:30:30 +0000 | [diff] [blame] | 126 | These include ncurses (_curses, _curses_panel), | 
| Andrew MacIntyre | 3dac89e | 2004-10-03 08:26:36 +0000 | [diff] [blame] | 127 | GNU GDBM (gdbm, dbm), zlib (zlib), GNU Readline (readline), and GNU UFC  | 
 | 128 | (crypt). | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 129 |  | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 130 | Expat is now included in the Python release sourceball, and the pyexpat  | 
 | 131 | module is always built. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 132 |  | 
 | 133 | I have built these modules statically linked against the 3rd party  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 134 | libraries.  Unfortunately my attempts to use the dll version of GNU  | 
 | 135 | readline have been a dismal failure, in that when the dynamically  | 
 | 136 | linked readline module is active other modules immediately provoke a  | 
 | 137 | core dump when imported. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 138 |  | 
 | 139 | Only the BSD DB package (part of the BSD package distributed with EMX)  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 140 | needs source modifications to be used for this port, pertaining to use  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 141 | of errno with multithreading. | 
 | 142 |  | 
 | 143 | The other packages, except for ncurses and zlib, needed Makefile changes  | 
 | 144 | for multithreading support but no source changes. | 
 | 145 |  | 
 | 146 | The _curses_panel module is a potential problem - see "YOU HAVE BEEN  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 147 | WARNED" item 13. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 148 |  | 
 | 149 | Upstream source patches: | 
 | 150 |  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 151 | No updates to the Python 2.6 release have become available. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 152 |  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 153 | Library and other distributed Python code: | 
 | 154 |  | 
 | 155 | The Python standard library lives in the Lib directory.  All the standard  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 156 | library code included with the Python 2.6 source distribution is included  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 157 | in the binary archive, with the exception of the dos-8x3 and tkinter  | 
 | 158 | subdirectories which have been omitted to reduce the size of the binary  | 
 | 159 | archive - the dos-8x3 components are unnecessary duplicates and Tkinter  | 
 | 160 | is not supported by this port (yet).  All the plat-* subdirectories in the  | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 161 | source distribution have also been omitted, except for the plat-os2emx  | 
 | 162 | subdirectory. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 163 |  | 
 | 164 | The Tools and Demo directories contain a collection of Python scripts.   | 
 | 165 | To reduce the size of the binary archive, the Demo/sgi, Demo/Tix,  | 
 | 166 | Demo/tkinter, Tools/audiopy and Tools/IDLE subdirectories have been  | 
 | 167 | omitted as not being supported by this port.  The Misc directory has  | 
 | 168 | also been omitted. | 
 | 169 |  | 
 | 170 | All subdirectories omitted from the binary archive can be reconstituted  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 171 | from the Python 2.6 source distribution, if desired. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 172 |  | 
 | 173 | Support for building Python extensions: | 
 | 174 |  | 
 | 175 | The Config subdirectory contains the files describing the configuration  | 
 | 176 | of the interpreter and the Makefile, import libraries for the Python DLL,  | 
 | 177 | and the module definition file used to create the Python DLL.  The  | 
 | 178 | Include subdirectory contains all the standard Python header files  | 
 | 179 | needed for building extensions. | 
 | 180 |  | 
 | 181 | As I don't have the Visual Age C++ compiler, I've made no attempt to  | 
 | 182 | have this port support extensions built with that compiler. | 
 | 183 |  | 
 | 184 |  | 
 | 185 | Packaging | 
 | 186 | --------- | 
 | 187 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 188 | This port is packaged as follows: | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 189 | - python-2.6-os2emx-bin-03????.zip  (binaries, library modules) | 
 | 190 | - python-2.6-os2emx-src-03????      (patches+makefiles for non-Python code) | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 191 |  | 
 | 192 | As all the Python specific patches for the port are now part of the  | 
 | 193 | Python release tarball, only the patches and makefiles involved in  | 
 | 194 | building external libraries for optional extensions are included in  | 
 | 195 | the source archive. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 196 |  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 197 | Documentation for the Python language, as well as the Python 2.6  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 198 | source distibution, can be obtained from the Python website  | 
 | 199 | (http://www.python.org/) or the Python project pages at Sourceforge  | 
 | 200 | (http://sf.net/projects/python/). | 
 | 201 |  | 
 | 202 |  | 
 | 203 | Installation | 
 | 204 | ------------ | 
 | 205 |  | 
 | 206 | Obtain and install, as per the included instructions, the EMX runtime  | 
 | 207 | package. | 
 | 208 |  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 209 | Unpack this archive, preserving the subdirectories, in the root directory  | 
 | 210 | of the drive where you want Python to live. | 
 | 211 |  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 212 | Add the Python directory (eg C:\Python26) to the PATH and LIBPATH  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 213 | variables in CONFIG.SYS. | 
 | 214 |  | 
 | 215 | You should then set the PYTHONHOME and PYTHONPATH environment variables  | 
 | 216 | in CONFIG.SYS. | 
 | 217 |  | 
 | 218 | PYTHONHOME should be set to Python's top level directory.  PYTHONPATH  | 
 | 219 | should be set to the semicolon separated list of principal Python library  | 
 | 220 | directories. | 
 | 221 | I use: | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 222 |   SET PYTHONHOME=F:/Python26 | 
 | 223 |   SET PYTHONPATH=F:/Python26/Lib;F:/Python26/Lib/plat-os2emx; | 
 | 224 |                  F:/Python26/Lib/lib-dynload;F:/Python26/Lib/site-packages | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 225 |  | 
 | 226 | NOTE!:  the PYTHONPATH setting above is linewrapped for this document - it  | 
 | 227 | should all be on one line in CONFIG.SYS! | 
 | 228 |  | 
 | 229 | If you wish to use the curses module, you should set the TERM and TERMINFO  | 
 | 230 | environment variables appropriately. | 
 | 231 |  | 
 | 232 | If you don't already have ncurses installed, I have included a copy of the  | 
 | 233 | EMX subset of the Terminfo database included with the ncurses-5.2 source  | 
 | 234 | distribution.  This can be used by setting the TERMINFO environment variable  | 
 | 235 | to the path of the Terminfo subdirectory below the Python home directory. | 
 | 236 | On my system this looks like: | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 237 |   SET TERMINFO=F:/Python26/Terminfo | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 238 |  | 
 | 239 | For the TERM environment variable, I would try one of the following: | 
 | 240 |   SET TERM=ansi | 
 | 241 |   SET TERM=os2 | 
 | 242 |   SET TERM=window | 
 | 243 |  | 
 | 244 | You will have to reboot your system for these changes to CONFIG.SYS to take  | 
 | 245 | effect. | 
 | 246 |  | 
 | 247 | If you wish to compile all the included Python library modules to bytecode,  | 
 | 248 | you can change into the Python home directory and run the COMPILEALL.CMD  | 
 | 249 | batch file. | 
 | 250 |  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 251 | You can execute the regression tests included with the Python 2.6 source  | 
 | 252 | distribution by changing to the Python 2.6 home directory and executing the  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 253 | REGRTEST.CMD batch file.  The following tests are known to fail at this  | 
 | 254 | time: | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 255 | - test_mhlib (I don't know of any port of MH to OS/2); | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 256 | - test_strptime (see "YOU HAVE BEEN WARNED" item 22); | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 257 | - test_time (see "YOU HAVE BEEN WARNED" item 22); | 
 | 258 | - test_posixpath (see "YOU HAVE BEEN WARNED" item 23). | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 259 |  | 
 | 260 | Note that some of the network related tests expect the loopback interface | 
 | 261 | (interface "lo", with IP address 127.0.0.1) to be enabled, which from my | 
 | 262 | experience is not the default configuration.  Additionally, test_popen2 | 
 | 263 | expects the "cat" utility (such as found in ports of the GNU tools) to | 
 | 264 | be installed. | 
 | 265 |  | 
 | 266 |  | 
 | 267 | Building from source | 
 | 268 | -------------------- | 
 | 269 |  | 
 | 270 | With the EMX port now checked into Python's CVS repository, the build  | 
 | 271 | infrastructure is part of the Python release sourceball. | 
 | 272 |  | 
 | 273 | Prerequisites | 
 | 274 |  | 
 | 275 | First and foremost, you need an operational EMX development installation -  | 
 | 276 | EMX v0.9d with fix04 (the latest at time of writing) & the gcc 2.8.1  | 
 | 277 | compiler released by Eberhard Mattes is the recommended setup. | 
 | 278 |  | 
 | 279 | If you have a different version of gcc installed, see "YOU HAVE BEEN  | 
 | 280 | WARNED" item 16. | 
 | 281 |  | 
 | 282 | Other items of software required:- | 
 | 283 |  | 
 | 284 | - GNU make (I'm using v3.76.1) | 
 | 285 | - rm, cp, mkdir from the GNU file utilities package | 
 | 286 | - GNU find | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 287 | - GNU sed | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 288 |  | 
 | 289 | Procedure | 
 | 290 |  | 
 | 291 | 0. all changes mentioned apply to files in the PC/os2emx subdirectory  | 
 | 292 |    of the Python release source tree.  make is also executed from this  | 
 | 293 |    directory, so change into this directory before proceeding. | 
 | 294 |  | 
 | 295 | 1. decide if you need to change the location of the Python installation. | 
 | 296 |    If you wish to do this, set the value of the Makefile variable LIB_DIR  | 
 | 297 |    to the directory you wish to use for PYTHONHOME  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 298 |    (eg /usr/local/lib/python2.6). | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 299 |  | 
 | 300 |    If you want Python to find its library without the PYTHONHOME  | 
 | 301 |    environment variable set, set the value of the Makefile variable  | 
 | 302 |    FIXED_PYHOME to "yes" (uncomment the appropriate line). | 
 | 303 |  | 
 | 304 | 2. If you wish the Python executables (python.exe, pythonpm.exe & pgen.exe)  | 
 | 305 |    to be installed in a directory other than the PYTHONHOME directory, set  | 
 | 306 |    the value of the Makefile variable EXE_DIR to the appropriate directory. | 
 | 307 |  | 
| Georg Brandl | fa2c61a | 2011-02-20 10:41:31 +0000 | [diff] [blame] | 308 | 3. If you wish the Python core DLL (python33.dll) to be installed in a  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 309 |    directory other than the directory in which the Python executables are  | 
 | 310 |    installed (by default, the PYTHONHOME directory), set the value of the  | 
 | 311 |    Makefile variable DLL_DIR to the appropriate directory.  This DLL must  | 
 | 312 |    be placed in a directory on the system's LIBPATH, or that gets set  | 
 | 313 |    with BEGINLIBPATH or ENDLIBPATH. | 
 | 314 |  | 
 | 315 | 4. If you have installed any of the libraries that can be used to build  | 
 | 316 |    optional Python modules, set the value of the relevant HAVE_<package>  | 
 | 317 |    Makefile variable to "yes".  The Makefile currently supports: | 
 | 318 |  | 
 | 319 |    library               Makefile variable | 
 | 320 |    ........................................ | 
 | 321 |    zlib (1.1.4)          HAVE_ZLIB | 
 | 322 |    GNU UltraFast Crypt   HAVE_UFC | 
 | 323 |    Tcl/Tk                HAVE_TCLTK (not known to work) | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 324 |    GNU Readline          HAVE_GREADLINE | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 325 |    ncurses               HAVE_NCURSES | 
 | 326 |    GNU gdbm              HAVE_GDBM | 
 | 327 |    libbz2                HAVE_BZ2 | 
| Andrew MacIntyre | 578371f | 2005-02-17 12:46:34 +0000 | [diff] [blame] | 328 |    OpenSSL               HAVE_OPENSSL | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 329 |  | 
 | 330 |    Please note that you need to check that what you have installed  | 
 | 331 |    is compatible with Python's build options.  In particular, the  | 
 | 332 |    BSD DB v1.85 library needs to be rebuilt with a source patch for  | 
 | 333 |    multithread support (doesn't change the library's reentrant status  | 
 | 334 |    but allows it to be linked to Python which is multithreaded).   | 
 | 335 |    Widely available binary packages of other librarys & DLLs are  | 
 | 336 |    not built/linked with multithread support.  Beware! | 
 | 337 |  | 
 | 338 |    Also note that the Makefile currently expects any libraries to be  | 
 | 339 |    found with the default library search path.  You may need to add  | 
 | 340 |    -L switches to the LDFLAGS Makefile variable if you have installed  | 
 | 341 |    libraries in directories not in the default search path (which can  | 
 | 342 |    be controlled by the LIBRARY_PATH environment variable used by EMX). | 
 | 343 |  | 
 | 344 | 5. make | 
 | 345 |  | 
 | 346 |    It is usually a good idea to redirect the stdout and stderr streams  | 
 | 347 |    of the make process to log files, so that you can review any messages.  | 
 | 348 |  | 
 | 349 | 6. make test | 
 | 350 |  | 
 | 351 |    This runs the Python regression tests, and completion is a sign of  | 
 | 352 |    a usable build.  You should check the list of skipped modules to  | 
 | 353 |    ensure that any optional modules you selected have been built;  | 
 | 354 |    checking the list of failures against the list of known failures  | 
 | 355 |    elsewhere in this document is also prudent. | 
 | 356 |  | 
 | 357 | 7. make install | 
 | 358 |    >>>>>> NOT YET COMPLETE <<<<<<  | 
 | 359 |  | 
 | 360 | 8. change to a directory outside the Python source tree and start Python.  | 
 | 361 |    Check the version and build date to confirm satisfactory installation. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 362 |  | 
 | 363 |  | 
 | 364 | YOU HAVE BEEN WARNED!! | 
 | 365 | ---------------------- | 
 | 366 |  | 
 | 367 | I know about a number of nasties in this port. | 
 | 368 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 369 | 1.  Eberhard Mattes, author of EMX, writes in his documentation that fork()  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 370 | is very inefficient in the OS/2 environment.  It also requires that the  | 
 | 371 | executable be linked in a.out format rather than OMF.  Use the os.exec  | 
 | 372 | and/or the os.spawn family of functions where possible. | 
 | 373 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 374 | 2.  In the absence of GNU Readline, terminating the interpreter requires a  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 375 | control-Z (^Z) followed by a carriage return.  Jeff Rush documented this  | 
 | 376 | problem in his Python 1.5.2 port.  With Readline, a control-D (^D) works  | 
 | 377 | as per the standard Unix environment. | 
 | 378 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 379 | 3.  EMX only has a partial implementation of fcntl().  The fcntl module  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 380 | in this port supports what EMX supports.  If fcntl is important to you,  | 
 | 381 | please review the EMX C Library Reference (included in .INF format in the  | 
 | 382 | EMXVIEW.ZIP archive as part of the complete EMX development tools suite). | 
 | 383 | Because of other side-effects I have modified the test_fcntl.py test  | 
 | 384 | script to deactivate the exercising of the missing functionality. | 
 | 385 |  | 
| Georg Brandl | 1158a33 | 2009-06-04 09:30:30 +0000 | [diff] [blame] | 386 | 4.  The readline module has been linked against ncurses rather than the  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 387 | termcap library supplied with EMX. | 
 | 388 |  | 
| Georg Brandl | 1158a33 | 2009-06-04 09:30:30 +0000 | [diff] [blame] | 389 | 5.  I have configured this port to use "/" as the preferred path separator  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 390 | character, rather than "\" ('\\'), in line with the convention supported  | 
 | 391 | by EMX.  Backslashes are still supported of course, and still appear in  | 
 | 392 | unexpected places due to outside sources that don't get normalised. | 
 | 393 |  | 
| Georg Brandl | 1158a33 | 2009-06-04 09:30:30 +0000 | [diff] [blame] | 394 | 6.  While the DistUtils components are now functional, other  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 395 | packaging/binary handling tools and utilities such as those included in | 
 | 396 | the Demo and Tools directories - freeze in particular - are unlikely to  | 
 | 397 | work.  If you do get them going, I'd like to know about your success. | 
 | 398 |  | 
| Georg Brandl | 1158a33 | 2009-06-04 09:30:30 +0000 | [diff] [blame] | 399 | 7.  I haven't set out to support the [BEGIN|END]LIBPATH functionality  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 400 | supported by one of the earlier ports (Rush's??).  If it works let me know. | 
 | 401 |  | 
| Georg Brandl | 1158a33 | 2009-06-04 09:30:30 +0000 | [diff] [blame] | 402 | 8. As a result of the limitations imposed by EMX's library routines, the  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 403 | standard extension module pwd only synthesises a simple passwd database,  | 
 | 404 | and the grp module cannot be supported at all. | 
 | 405 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 406 | I have written pure Python substitutes for pwd and grp, which can process  | 
 | 407 | real passwd and group files for those applications (such as MailMan) that  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 408 | require more than EMX emulates.  I have placed pwd.py and grp.py in  | 
 | 409 | Lib/plat-os2emx, which is usually before Lib/lib-dynload (which contains  | 
 | 410 | pwd.pyd) in the PYTHONPATH.  If you have become attached to what pwd.pyd  | 
 | 411 | supports, you can put Lib/lib-dynload before Lib/plat-os2emx in PYTHONPATH  | 
 | 412 | or delete/rename pwd.py & grp.py. | 
 | 413 |  | 
 | 414 | pwd.py & grp.py support locating their data files by looking in the  | 
 | 415 | environment for them in the following sequence: | 
 | 416 | pwd.py:  $ETC_PASSWD             (%ETC_PASSWD%) | 
 | 417 |          $ETC/passwd             (%ETC%/passwd) | 
 | 418 |          $PYTHONHOME/Etc/passwd  (%PYTHONHOME%/Etc/passwd) | 
 | 419 | grp.py:  $ETC_GROUP              (%ETC_GROUP%) | 
 | 420 |          $ETC/group              (%ETC%/group) | 
 | 421 |          $PYTHONHOME/Etc/group   (%PYTHONHOME%/Etc/group) | 
 | 422 |  | 
| Andrew MacIntyre | b0f5e5a | 2003-07-10 12:55:30 +0000 | [diff] [blame] | 423 | The ETC_PASSWD and ETC_GROUP environment variables are intended to allow  | 
 | 424 | support for multiple passwd/grp files, where other applications may not  | 
 | 425 | support as wide a variety of input variations (drive remappings,  | 
 | 426 | separators etc). | 
 | 427 |  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 428 | Both modules support using either the ":" character (Unix standard) or  | 
 | 429 | ";" (OS/2, DOS, Windows standard) field separator character, and pwd.py  | 
 | 430 | implements the following drive letter conversions for the home_directory and  | 
 | 431 | shell fields (for the ":" separator only): | 
 | 432 |          $x  ->  x: | 
 | 433 |          x;  ->  x: | 
 | 434 |  | 
| Andrew MacIntyre | b0f5e5a | 2003-07-10 12:55:30 +0000 | [diff] [blame] | 435 | Example versions of passwd and group are in the Etc subdirectory.  The  | 
 | 436 | regression tests (test_pwd and test_grp) will fail if valid password and  | 
 | 437 | group files cannot be found, but should pass otherwise. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 438 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 439 | Be aware that Python's pwd & group modules are for reading password and  | 
 | 440 | group information only. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 441 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 442 | 11. EMX's termios routines don't support all of the functionality now  | 
 | 443 | exposed by the termios module - refer to the EMX documentation to find  | 
 | 444 | out what is supported. | 
 | 445 |  | 
 | 446 | 12. The case sensitive import semantics introduced in Python 2.1 for other  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 447 | case insensitive but case preserving file/operating systems (Windows etc),  | 
 | 448 | have been incorporated into this port, and are active by default.  Setting  | 
 | 449 | the PYTHONCASEOK environment variable (to any value) reverts to the  | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 450 | previous (case insensitive) semantics.  This can be an issue with some  | 
 | 451 | file management utilities that do not preserve the case of file and | 
 | 452 | directory names. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 453 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 454 | 13. Because I am statically linking ncurses, the _curses_panel  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 455 | module has potential problems arising from separate library data areas. | 
 | 456 | To avoid this, I have configured the _curses_.pyd (imported as  | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 457 | "_curses_panel") to import the ncurses symbols it needs from _curses.dll  | 
 | 458 | (which is the curses module, but with a .dll extension rather than .pyd  | 
 | 459 | so that the dynamic loader can actually import the symbols from it as a  | 
 | 460 | DLL). | 
 | 461 |  | 
 | 462 | The site module (Lib/site.py) has code added to tweak BEGINLIBPATH so | 
 | 463 | that _curses.dll is found when _curses_panel is imported.  If you have | 
 | 464 | problems attempting to use the _curses_panel support please let me know, | 
 | 465 | and I'll have another look at this. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 466 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 467 | 14. sys.platform reports "os2emx" instead of "os2".  os.name still  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 468 | reports "os2".  This change was to make it easier to distinguish between  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 469 | the VAC++ build (formerly maintained by Michael Muller) and the EMX build  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 470 | (this port), principally for DistUtils. | 
 | 471 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 472 | 15. it appears that the %W substitution in the EMX strftime() routine has  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 473 | an off-by-one bug.  strftime was listed as passing the regression tests  | 
 | 474 | in previous releases, but this fact appears to have been an oversight in  | 
 | 475 | the regression test suite.  To fix this really requires a portable  | 
 | 476 | strftime routine - I'm looking into using one from FreeBSD, but its not  | 
 | 477 | ready yet. | 
 | 478 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 479 | 16. I have successfully built this port with Andy Zabolotny's ports of  | 
| Georg Brandl | 1158a33 | 2009-06-04 09:30:30 +0000 | [diff] [blame] | 480 | pgcc 2.95 and gcc 3.2.1, in addition to EM's gcc 2.8.1. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 481 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 482 | I have not attempted to compile Python with any version of gcc prior to  | 
 | 483 | v2.8.1. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 484 |  | 
| Andrew MacIntyre | bac1ea9 | 2003-07-16 13:31:11 +0000 | [diff] [blame] | 485 | This release sees the default optimisation change to  | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 486 | "-O3 -fomit-frame-pointer -mprobe".  This works fine too for pgcc 2.95  | 
 | 487 | but not for gcc 3.2.1. | 
| Andrew MacIntyre | bac1ea9 | 2003-07-16 13:31:11 +0000 | [diff] [blame] | 488 |  | 
 | 489 | With gcc 3.2.1, -O3 causes 2 unexpected test failures: test_format and  | 
 | 490 | test_unicode.  Both these tests pass if -O2 is instead of -O3 with this  | 
 | 491 | compiler, and the performance difference is negligible (in contrast to  | 
 | 492 | gcc 2.8.1 and pgcc 2.95, where the performance difference between the  | 
 | 493 | 2 optimisation settings approaches 10%). | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 494 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 495 | 17.  os.spawnv() and os.spawnve() expose EMX's library routines rather  | 
 | 496 | than use the emulation in os.py. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 497 |  | 
 | 498 | In order to make use of some of the features this makes available in  | 
 | 499 | the OS/2 environment, you should peruse the relevant EMX documentation  | 
 | 500 | (EMXLIB.INF in the EMXVIEW.ZIP archive accompanying the EMX archives  | 
 | 501 | on Hobbes or LEO).  Be aware that I have exposed all the "mode" options  | 
 | 502 | supported by EMX, but there are combinations that either cannot be  | 
 | 503 | practically used by/in Python or have the potential to compromise your  | 
 | 504 | system's stability. | 
 | 505 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 506 | 18.  pythonpm.exe used to be just python.exe with the WINDOWAPI linker  | 
 | 507 | option set in the pythonpm.def file.  In practice, this turns out to do  | 
 | 508 | nothing useful. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 509 |  | 
 | 510 | I have written a replacement which wraps the Python DLL in a genuine  | 
 | 511 | Presentation Manager application.  This version actually runs the  | 
 | 512 | Python interpreter in a separate thread from the PM shell, in order  | 
 | 513 | that PythonPM has a functioning message queue as good PM apps should. | 
 | 514 | In its current state, PythonPM's window is hidden.  It can be displayed,  | 
 | 515 | although it will have no content as nothing is ever written to the  | 
 | 516 | window.  Only the "hide" button is available.  Although the code  | 
 | 517 | has support for shutting PythonPM down when the Python interpreter is  | 
 | 518 | still busy (via the "control" menu), this is not well tested and given  | 
 | 519 | comments I've come across in EMX documentation suggesting that the  | 
 | 520 | thread killing operation has problems I would suggest caution in  | 
 | 521 | relying on this capability. | 
 | 522 |  | 
 | 523 | PythonPM processes commandline parameters normally.  The standard input,  | 
 | 524 | output and error streams are only useful if redirected, as PythonPM's  | 
 | 525 | window is not a console in any form and so cannot accept or display  | 
 | 526 | anything.  This means that the -i option is ineffective. | 
 | 527 |  | 
 | 528 | Because the Python thread doesn't create its own message queue, creating  | 
 | 529 | PM Windows and performing most PM operations is not possible from within  | 
 | 530 | this thread.  How this will affect supporting PM extensions (such as  | 
 | 531 | Tkinter using a PM port of Tcl/Tk, or wxPython using the PM port of  | 
 | 532 | WxWindows) is still being researched. | 
 | 533 |  | 
 | 534 | Note that os.fork() _DOES_NOT_WORK_ in PythonPM - SYS3175s are the result  | 
 | 535 | of trying.  os.spawnv() _does_ work.  PythonPM passes all regression tests  | 
 | 536 | that the standard Python interpreter (python.exe) passes, with the exception  | 
 | 537 | of test_fork1 and test_socket which both attempt to use os.fork(). | 
 | 538 |  | 
 | 539 | I very much want feedback on the performance, behaviour and utility of  | 
 | 540 | PythonPM.  I would like to add a PM console capability to it, but that  | 
 | 541 | will be a non-trivial effort.  I may be able to leverage the code in  | 
 | 542 | Illya Vaes' Tcl/Tk port, which would make it easier. | 
 | 543 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 544 | 19.  os.chdir() uses EMX's _chdir2(), which supports changing both drive  | 
 | 545 | and directory at once.  Similarly, os.getcwd() uses EMX's _getcwd()  | 
 | 546 | which returns drive as well as path. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 547 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 548 | 20.  pyconfig.h is installed in the Include subdirectory with all  | 
 | 549 | other include files. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 550 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 551 | 21.  the default build explicitly sets the number of file handles  | 
 | 552 | available to a Python process to 250.  EMX default is 40, which is  | 
 | 553 | insufficient for the tempfile regression test (test_tempfile) which  | 
 | 554 | tries to create 100 temporary files. | 
| Andrew MacIntyre | ffcf899 | 2002-08-18 06:28:21 +0000 | [diff] [blame] | 555 |  | 
 | 556 | This setting can be overridden via the EMXOPT environment variable: | 
 | 557 |   set EMXOPT=-h250 | 
 | 558 | is equivalent to the setting currently used.  The emxbind utility (if you  | 
 | 559 | have it installed) can also be used to permanently change the setting in  | 
 | 560 | python.exe - please refer to the EMX documentation for more information. | 
 | 561 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 562 | 22.  a pure python strptime module is now part of the Python standard | 
 | 563 | library, superceding a platform specific extension module. This module | 
 | 564 | leverages the strftime module, and as a result test_strptime fails | 
 | 565 | due to the EMX strftime bug in item 20 above. | 
 | 566 |  | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 567 | 23.  test_posixpath attempts to exercise various Posix path related | 
 | 568 | functionality.  Most of the sub-tests pass, but the "ismount" and | 
 | 569 | "samestat" subtests fail: | 
 | 570 | - EMX provides not satisfactory mount point emulation, so "ismount" | 
 | 571 |   cannot succeed; | 
 | 572 | - EMX documents that successive stat() calls will produce different | 
 | 573 |   results, so "samestat" cannot succeed. | 
 | 574 |  | 
 | 575 | test_posixpath should skip these tests on EMX. | 
 | 576 |  | 
| Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 577 | 24.  I have reports of BitTorrent not working.  It appears that the | 
 | 578 | EMX select() emulation, possibly in concert with bugs in the TCP/IP | 
 | 579 | stack, runs into problems under the stress imposed by this application. | 
 | 580 | I think it suffices to say that BitTorrent is a fair stress test of a | 
 | 581 | system's networking capability. | 
| Andrew MacIntyre | c2138af | 2003-12-02 12:23:07 +0000 | [diff] [blame] | 582 |  | 
 | 583 | 25.  In the absence of an EMX implementation of the link() function, I've  | 
 | 584 | implemented a crude Python emulation, in the file  | 
 | 585 | Lib/plat-os2emx/_emx_link.py.  This is imported into the os module, and  | 
 | 586 | becomes available as os.link() in the normal way. | 
 | 587 |  | 
 | 588 | The emulation copies the source file in binary mode, and will fail if  | 
 | 589 | disk space is exhausted. The call fails if the target already exists.  | 
 | 590 | There are no guarantees to thread safety with this emulation - beware! | 
 | 591 |  | 
 | 592 | The emulation was written to support a link() based file locking system  | 
 | 593 | used in GNU Mailman. | 
 | 594 |  | 
| Andrew MacIntyre | b888200 | 2004-04-11 12:05:28 +0000 | [diff] [blame] | 595 | 26.  AF_UNIX sockets, otherwise known as Unix domain sockets, are now | 
 | 596 | supported.  Unfortunately, there are some traps arising from the | 
 | 597 | implementation in IBM's TCP/IP stack:- | 
 | 598 | - the path name must start with '\\socket\\' ('/socket/' won't work!), | 
 | 599 |   with the length of the full path name less than 108 characters; | 
 | 600 | - unlike Unix, the socket endpoints don't exist in the filesystem; | 
 | 601 | - by default, sockets are in binary mode. | 
 | 602 |  | 
| Andrew MacIntyre | 3dac89e | 2004-10-03 08:26:36 +0000 | [diff] [blame] | 603 | 27.  As of Python 2.4, the mpz, rotor and xreadlines modules have been  | 
 | 604 | dropped from the Python source tree. | 
 | 605 |  | 
| Andrew MacIntyre | 578371f | 2005-02-17 12:46:34 +0000 | [diff] [blame] | 606 | 28.  The subprocess module was added to the standard library relatively | 
 | 607 | late in the 2.4 development cycle.  Unfortunately I haven't had the | 
 | 608 | round tuits to adapt the module to the EMX environment yet, and | 
 | 609 | test_subprocess has a number of failures as a result. | 
 | 610 |  | 
 | 611 | 29.  The default stack size for threads has been 64k.  This is proving | 
 | 612 | insufficient for some codebases, such as Zope.  The thread stack size | 
| Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 613 | still defaults to 64k, but this can now be increased via the stack_size() | 
 | 614 | function exposed by the threading & thread modules as well as by defining | 
| Andrew MacIntyre | 578371f | 2005-02-17 12:46:34 +0000 | [diff] [blame] | 615 | THREAD_STACK_SIZE to an appropriate value in the Makefile (which contains | 
 | 616 | a commented out definition for 128kB thread stacks).  I have seen | 
 | 617 | references to heavy Zope/Plone usage requiring 1MB thread stacks on | 
 | 618 | FreeBSD and Linux, but doubt that for most likely usage on OS/2 that | 
 | 619 | more than 256kB is necessary.  The size of the required stacks (main  | 
 | 620 | and thread) can vary significantly depending on which version of gcc | 
| Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 621 | is used along with the compiler optimisations selected.  Note that the | 
 | 622 | main thread stack size is set during linking and is currently 2MB. | 
| Andrew MacIntyre | 578371f | 2005-02-17 12:46:34 +0000 | [diff] [blame] | 623 |  | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 624 | ... probably other issues that I've not encountered, or don't remember :-( | 
 | 625 |  | 
 | 626 | If you encounter other difficulties with this port, which can be  | 
 | 627 | characterised as peculiar to this port rather than to the Python release, | 
 | 628 | I would like to hear about them.  However I cannot promise to be able to do  | 
 | 629 | anything to resolve such problems.  See the Contact section below... | 
 | 630 |  | 
 | 631 |  | 
 | 632 | To do... | 
 | 633 | -------- | 
 | 634 |  | 
 | 635 | In no particular order of apparent importance or likelihood... | 
 | 636 |  | 
 | 637 | - support Tkinter and/or alternative GUI (wxWindows??) | 
 | 638 |  | 
 | 639 |  | 
 | 640 | Credits | 
 | 641 | ------- | 
 | 642 |  | 
 | 643 | In addition to people identified above, I'd like to thank: | 
 | 644 | - the BDFL, Guido van Rossum, and crew for Python; | 
 | 645 | - Dr David Mertz, for trying out a pre-release of this port; | 
 | 646 | - the Python-list/comp.lang.python community; | 
 | 647 | - John Poltorak, for input about pwd/grp. | 
 | 648 |  | 
 | 649 | Contact | 
 | 650 | ------- | 
 | 651 |  | 
 | 652 | Constructive feedback, negative or positive, about this port is welcome  | 
 | 653 | and should be addressed to me at the e-mail addresses below. | 
 | 654 |  | 
| Andrew MacIntyre | 631e87f | 2003-04-21 14:33:04 +0000 | [diff] [blame] | 655 | I have a private mailing list for announcements of fixes & updates to  | 
 | 656 | this port.  If you wish to receive such e-mail announcments, please send  | 
 | 657 | me an e-mail requesting that you be added to this list. | 
| Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 658 |  | 
 | 659 | Andrew MacIntyre | 
 | 660 | E-mail: andymac@bullseye.apana.org.au, or andymac@pcug.org.au | 
 | 661 | Web:    http://www.andymac.org/ | 
 | 662 |  | 
| Christian Heimes | 292d351 | 2008-02-03 16:51:08 +0000 | [diff] [blame] | 663 | 28 January, 2008. |