This is a patch to compile Python 1.2 on OpenVMS VAX V6.1 with
DEC C V5.0. Hopefully it'll work for you too. It might even work
with other versions of VMS or DEC C, or maybe even on an Alpha.
This port was inspired by the one done by Donn Cave, but since I couldn't
get it to work on 'my' machine, I decided to try to do it myself.
First you have to get a pristine Python 1.2 distribution and patch it.
Untar the sources, and copy everything from the `files' directory into
the top source directory of Python (i.e. files/Include/ndir.h should
go into Python-1.2/Include). Finally move to the top directory of the
source tree and type `patch -p0 < python-vms.diff'.
To build Python just type `@BUILD.COM' from the top directory.
If you're lucky enough to have `jam' (a make-like utility written by
Christopher Seiwald), you _do_ want to use `JAMBUILD.COM' instead.
One very iportant note. The files ndir.h, filutils.h, ndir.c and
filutils.c are from the GPLed port of GNU Emacs to VMS. I have spoken
with the author, and he stated that as long as these files are
distributed in source form, it's ok. This means that if you want to
distribute a precompiled version of Python for VMS without the sources
you _do_ have to rewrite the posix.listdir() function so to not use
these four files any more. Please read the file COPYING for more
information on what you can and can't do with these files.
Random notes:
The `CLEAN.COM' script just cleans out all the files created by a
build, a good way to start over when something has gone wrong.
The create_mangle, vms_mangle.sh and vms_demangle.sh are some quick
and dirty utilities that I wrote to be able to move the sources back
and forth between a Unix and a VMS system.
The search path for the import statement is the current directory
first, and the logical `PY$LIB' second. This is an example of a
logical: `DEFINE PY$LIB USER:[WINGEL.PYTHON.LIB]'.
It is possible to get threading working if you have the DECthreads
package installed. You have to compile thread.c and link with an
option-file with a line saying `sys$share:cma$open_rtl.exe/share'.
Unfortunately, some parts of the DEC C Runtime Library isn't thread
safe (especially the sockets stuff) so threading under VMS is at best
a curiosity so far.
Finally, the VMS-support is not even close to finished, first of all,
almost none of the posixpath-functions have been rewritten for VMS,
and the networking libraries have a lot of limitations. But, Python
under VMS has been very useful for me, and I hope that it will be
useful for you too.
Have fun,
Christer (
[email protected]), November 21, 1995