1.  get Zope 2.6, and unpack.

2.  change directory into the top-level directory of the unpacked source.

3.  python setup.py build_ext -i
    (its a good idea to redirect stdout/stderr to record error messages, 
    especially as I encountered some source files with truncated names, 
    probably a problem with the version of tar that I used to unpack the 
    source.  the affected files were several levels below the 
    lib\python\Products\PluginIndexes\TextIndex\Splitter subdirectory - 
    simply renaming them to the expected name resolved the problem)

4.  python setup.py install --home=<zope_home> \
                            --install-platlib=<zope_home>
                            --install-purelib=<zope_home>
    (<zope_home> is the full drive/path to the Zope root directory)

5.  make sure that %ETC% contains passwd/group files (such as those included
    in the Python EMX port binary distribution) with an entry for the "user" 
    Zope is to be run as.

6.  change directory to the Zope root directory, and edit z2.py to comment 
    out the check for the sticky bit on the Zope root directory (OS/2 doesn't 
    support this Unix security measure) - lines 842-850 in the copy I have.

7.  manually create a subdirectory (in the Zope root) called var.
    (which for some reason doesn't get created in step 4)

8.  create the initial user authentication file with the command

    python zpasswd.py inituser

9.  create an OS/2 command file that sets the appropriate environment 
    variables, then starts the main Zope script.

    Because OS/2+EMX don't really support daemonising processes (at least 
    the way Unix does), the Zope script should be started with the -D 
    (debug) option.

    You will also need the -u option with the name of the Zope "user" 
    from step 5.

    The script I created (z2.cmd) looks like:

    ---8<---8<---8<---
    @echo off
    rem
    rem  wrapper for python/zope, makes sure environment set
    rem
    if "%PYTHONHOME%"=="" set PYTHONHOME=F:\Python
    if "%PYTHONPATH%"=="" set PYTHONPATH=%PYTHONHOME%/Lib;%PYTHONHOME%/Lib/plat-os2emx;%PYTHONHOME%/Lib/lib-dynload;%PYTHONHOME%/Lib/site-packages
    if "%ZOPE_X_DRV%"=="" set ZOPE_X_DRV=F:
    if "%ZOPE_X_PATH%"=="" set ZOPE_X_PATH=Zope
    if "%ZOPE_HOME%"=="" set ZOPE_HOME=%ZOPE_X_DRV%\%ZOPE_X_PATH%
    if "%TERMINFO%"=="" set TERMINFO=%PYTHONHOME%/Terminfo
    if "%TERM%"=="" set TERM=ansi
    set BEGINLIBPATH=%PYTHONHOME%
    %ZOPE_X_DRV%
    cd \%ZOPE_X_PATH%
    %PYTHONHOME%\python z2.py %1 %2 %3 %4 %5 %6 %7 %8 %9
    ---8<---8<---8<---

    with Zope being started with the command:

    z2 -D -u zope

    Refer to the Zope documentation for other environment variables 
    which could/should be set in this script.

10. After successfully starting Zope (which takes a few seconds even 
    on a 1.4GHz Athlon), access the running server from a browser using 
    the URL 
      http://localhost:8080/ 
    (or whichever alternate port you've chosen).

    You should be able to log into the management interface, using the 
    user/password created in step 8, with the URL 
      http://localhost:8080/manage
    (or from the link on the default page).
