(go to: table of contents, index, prev: preparations)
This
Version 1.5.2-V007 comes as a complete kit with a new build
mechanism. It is strongly recommended that you do a new installation and not
attempt an upgrade.
Specify an owner UIC to be assigned to the files:
or use defaults:
A new download should not be necessary.
Even if you don't compile yourself you need to run the procedure:
There can be a problem if SYS$SCRATCH points to a logical
name search list. The 'pkg' test fails for some reason that I have not tried
to find out - please redefine SYS$SCRATCH in such a situation.
Pre-compiled objects kits might be available.
The following commands up to '@LINKD_PGEN' are also combined in procedure
BUILD_PYTHON.COM which you can use instead.
The whole translation and compilation process took about 1.5 hours on
a VAXstation 4000 modell 60.
The object kit should come with a set of configuration data that matches the
contents of the object libraries. Therefore you should run SETUP.COM again:
Beginning with Python for OpenVMS version 1.5.2-V007 some configuration changes
require a working Python executable. Please consider saving this file so you
have a fail back.
The procedure defines them dynamically:
Some files can be deleted after the tests:
The whole documentation translation process took about 40 minutes on a
VAXstation 4000 modell 60.
Test it:
To revert to non-threading mode:
$ _O = "/OWNER=[1,4]"
$ _O = ""
restore the Python distribution
$! -- temporary directory
$ set DEFAULT PYTHON_INS_TMP:
$!
$! -- extract BACKUP saveset
$ UNZIP -e PYTHON1_5_2.ZIP
$!
If you have downloaded the ".ZIP" file before 14-MAY-1999, then you need to
apply the following command to the BACKUP saveset, because the "-V" option
was ommitted inadvertently during the creation of PYTHON1_5_2.ZIP.
$ set FILE /ATTRIBUTES=(RFM:FIX,LRL:32256) PYTHON1_5_2.BCK
$! -- extract files from saveset
$ backup PYTHON1_5_2.BCK /SAVE_SET -
PYTHON_DISK:[*...] /TRUNCATE /VERIFY '_O'
$!
$! -- list contents of saveset
$ backup PYTHON1_5_2.BCK /SAVE_SET -
/LIST= PYTHON_DISK:[PYTHON]PYTHON1_5_2.LIS
$!
$! -- delete saveset - please keep ZIP archive
$ delete /log PYTHON1_5_2.BCK;*
$!
create additional directories
The intention is to keep the original directories as much unchanged as possible.
$ set DEFAULT PYTHON_VMS:
$ CREDIR = "CREATE/DIRECTORY ''_O' /PROTECTION=(G:RE,W:RE)/LOG"
$!
$ CREDIR []
$ CREDIR [.O_ALPHA]
$ CREDIR [.O_VAX]
$ CREDIR [.TMP]
$ delete /SYMBOL /LOCAL CREDIR
$!
All other directories will automatically be created during the restore of the
Python for OpenVMS distribution.
save some original files
These files will be replaced with modified ones from the Python for OpenVMS
distribution. A copy is made for easy access to the original files. BACKUP is
used because it retains the creation and revision date + time of the files.
The following type extensions are used:
$ set default PYTHON_DISK:[PYTHON.PYTHON-1_5_2.LIB]
$ backup COMPILEALL.PY;1, FTPLIB.PY;1, GETPASS.PY;1, SITE.PY;1, -
TEMPFILE.PY;1, USER.PY;1 *.PY$O;* /OWNER=ORIGINAL /LOG
$!
$ set DEFAULT PYTHON_DISK:[PYTHON.PYTHON-1_5_2.LIB.TEST]
$ backup TEST_RGBIMG.PY;1, TEST_SIGNAL.PY;1, TEST_SUPPORT.PY;1 -
*.PY$O;* /OWNER=ORIGINAL /LOG
$!
$ set DEFAULT PYTHON_DISK:[PYTHON.PYTHON-1_5_2.LIB.TEST.OUTPUT]
$ backup TEST_MIMEWRITER.;1 *.$O /OWNER=ORIGINAL /LOG
$!
$ set DEFAULT PYTHON_DISK:[PYTHON.PYTHON-1_5_2.MODULES]
$ backup FCNTLMODULE.C, MAIN.C, PYTHON.C, SELECTMODULE.C, -
SIGNALMODULE.C, SOCKETMODULE.C, TIMEMODULE.C, -
_LOCALEMODULE.C *.C$O -
/BY_OWNER=ORIGINAL /LOG
$ backup TIMING.H *.H$O /BY_OWNER=ORIGINAL /LOG
$!
$ set DEFAULT PYTHON_DISK:[PYTHON.PYTHON-1_5_2.OBJECTS]
$ backup FILEOBJECT.C *.C$O /BY_OWNER=ORIGINAL /LOG
$!
$ set DEFAULT PYTHON_DISK:[PYTHON.PYTHON-1_5_2.PYTHON]
$ backup IMPORT.C *.C$O /BY_OWNER=ORIGINAL /LOG
$!
extract the Python for OpenVMS distribution
$! -- list contents of .ZIP file
$ set DEFAULT PYTHON_DISK:[PYTHON]
$!
$ define /USER_MODE SYS$OUTPUT [PYTHON]PYTHON-1_5_2-V007SRC.LIS
$ UNZIP -l PYTHON_INS_TMP:PYTHON-1_5_2-V007SRC.ZIP
$!
$! -- extract files/directories from ZIPped file
$ set PROTECTION= (S:RWED,O:RWED,G:RE,W:RE) /DEFAULT
$ define /USER_MODE SYS$OUTPUT -
PYTHON_DISK:[PYTHON]PYTHON-1_5_2-V007SRC.UNZIP
$ UNZIP -e -o PYTHON_INS_TMP:PYTHON-1_5_2-V007SRC.ZIP
$!
There are some files that have been saved with OpenVMS specific file attributes,
because they contain lines with explicit <LF> characters which ZIP/UNZIP
would otherwise corrupt. (The SRC kit is created without the "-V" option).
$ set DEFAULT PYTHON_VMS:
$ set DEFAULT [.DOC]
$!
$ UNZIP -e CVT__RNO.ZIP
$!
$ delete CVT__RNO.ZIP;*
$!
configure for compilation
$ set DEFAULT PYTHON_VMS:
$ @ SETUP
Note that during first-time execution of the procedure
SETUP.COM it creates a subdirectory named [.PYTHON_TMP]
where the logical name SYS$SCRATCH points to.
translate and compile or install objects
The source kit (SRC) of the Python for OpenVMS
distribution does not contain any pre-translated or pre-compiled files in order
to save space.
convert data files
Some data files need to be converted to indexed sequential format:
$! -- convert CONFIG_MODULES.TXT to CONFIG_MODULES.DAT
$ @ PYTHON_TOOLS:CVT_CONFIG_MODULES.COM
$!
$! -- convert CONFIG_OLB.TXT to CONFIG_OLB.DAT
$ @ PYTHON_TOOLS:CVT_CONFIG_OLB.COM
$!
$! -- convert VMSDAT_VMSVER.TXT to VMSDAT_VMSVER.DAT
$ @ PYTHON_TOOLS:CVT_VMSDAT_VMSVER
$!
$! -- convert VMSDAT_VMSVER.TXT to VMSDAT_VMSVER.MAR
$ @ PYTHON_VMS:VMSVER2MAR.COM VMSDAT_VMSVER.TXT
translate VMSDEF modules
These modules contain OpenVMS version information, item codes, bitmasks and
constants:
$ set DEFAULT PYTHON_VMS:
$!
$ @ VMSDEF2MAR-ALL ! calls VMSDEF2MAR.COM
$!
$! -- create VMSDEF_DIRECTORY.MAR
$ @ VMSDEF_BLDDIR2MAR.COM
translate configuration
Details of the configuration process
are in the 'General Manual'.
$ @ CONFIG_INITTAB2MAR CONFIG.DAT
Beginning with version 1.5.2-V007 CONFIG_INITTAB2MAR.COM takes the information
automatically from the logical names that have been established by SETUP.COM.
$ @ MODULEMETHODS2MAR PYVMS__METHODS.DAT "." "."
$ @ MODULEMETHODS2MAR VMS_LBR__METHODS.DAT "." "."
$ @ MODULEMETHODS2MAR VMS_LIB__METHODS.DAT "." "."
$ @ MODULEMETHODS2MAR VMS_SMG__METHODS.DAT "." "."
$ @ MODULEMETHODS2MAR VMS_SYS__METHODS.DAT "." "."
compile for the DCL environment
$ @ PYTHON_VMS:BLDRUN "$ALL"
install objects
If you can not compile yourself, but found a suitable objects kit you
might be able to do an installation like this:
$ set DEFAULT PYTHON_DISK:[PYTHON]
$ _ARCH = "ALPHA"
$ if (F$GETSYI("CPU").le.127) then $ _ARCH = "VAX"
$ UNZIP -e -o PYTHON_INS_TMP:PYTHON-1_5_2-V007OBJ_'_ARCH'.ZIP
$ @ PYTHON_VMS:SETUP
You should re-do the steps 'convert data files' and
'translate configuration'.
LINK - create executables
Make sure you have already executed the procedure SETUP.COM so that the LINK
procedures will pick up the correct object libraries. It is unlikely that you
ever need 'PGEN', but the procedure is there.
$ @ PYTHON_VMS:LINK_PY
$!
$ @ PYTHON_VMS:LINKD_PGEN
setup and go
Python for OpenVMS needs some symbols:
@@maintenance note: Symbol list could be moved to a different chapter.
$ @SETUP
$ PYTHON
Python 1.5.2 (V007, Sat Aug 5 20:38:12 2000) [DECC] on OpenVMS VAX
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
portions Copyright 1996-2000 Uwe Zessin
>>>
Beginning with version 1.5.2-V005 the date printed is dynamically taken
from the image header's link date - the code is in VMS__GETBUILDINFO.C.
Beginning with version 1.5.2-V007 the architecture name (Alpha, VAX) is
also printed.
compile Python files
For performance reasons the '.PY' files from the Python library should be
pre-compiled, because non-privileged users can not create '.PYC' files in
that directories and each call would result in a new (in memory) compilation.
$ set DEFAULT PYTHON_VMS:
$ @ SETUP
$ @ PYTHON_TOOLS:COMPILEALL
This adds 136 '.PYC' files with about 2670 blocks.
run tests
This is an example - the actual output might look different.
$ set DEFAULT PYTHON_VMS
$ @ SETUP
$ set DEFAULT PYTHON_TMP1:
$ python
Python 1.5.2 (V007, Sat Aug 5 20:38:12 2000) [DECC] on OpenVMS VAX
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
portions Copyright 1996-2000 Uwe Zessin
>>> import test.autotest
test_grammar
test_opcodes
test_operations
test_builtin
test_exceptions
test_types
test_al
test test_al skipped -- an optional feature could not be imported
test_array
test_audioop
test_binascii
test_bsddb
test test_bsddb skipped -- an optional feature could not be imported
test_cd
test test_cd skipped -- an optional feature could not be imported
test_cl
test test_cl skipped -- an optional feature could not be imported
test_cmath
test_cpickle
test_crypt
test test_crypt skipped -- an optional feature could not be imported
test_dbm
test test_dbm skipped -- an optional feature could not be imported
test_dl
test test_dl skipped -- an optional feature could not be imported
test_errno
test_fcntl
test test_fcntl skipped -- an optional feature could not be imported
test_gdbm
test test_gdbm skipped -- an optional feature could not be imported
test_gl
test test_gl skipped -- an optional feature could not be imported
test_grp
test test_grp skipped -- an optional feature could not be imported
test_gzip
test test_gzip skipped -- an optional feature could not be imported
test_imageop
test_imgfile
test test_imgfile skipped -- an optional feature could not be imported
test_long
test_math
test_md5
test_mimewriter
test_new
test_nis
test test_nis skipped -- an optional feature could not be imported
test_ntpath
test_operator
test_pickle
test_pkg
test_popen2
test test_popen2 skipped -- an optional feature could not be imported
test_pow
test_pwd
test test_pwd skipped -- an optional feature could not be imported
test_re
test_regex
test_rfc822
test_rgbimg
test_rotor
test_select
test test_select crashed -- exceptions.AttributeError : popen
test_sha
test_signal
test test_signal skipped -- an optional feature could not be imported
test_socket
test test_socket crashed -- socket.error : (65535, 'no logical name match')
test_strftime
test test_strftime failed -- Writing: 'Conflict for %I (hour (01-12)):',
expected: ''
test_strop
test_struct
test_sunaudiodev
test test_sunaudiodev skipped -- an optional feature could not be imported
test_thread
(hangs)
$ delete /LOG PYTHON_DISK:[PYTHON.PYTHON-1_5_2.LIB.TEST]*.PYC;*
Other files are left in the subdirectory
[.PYTHON_TMP] that has been created by the SETUP.COM procedure
in the directory that the logical name SYS$SCRATCH points to.
convert documentation to RUNOFF format
$ set DEFAULT PYTHON_VMS:
$ set DEFAULT [.DOC.GENMAN]
$ @ CVT_DOC "*"
$!
$ set DEFAULT [-.INSMAN]
$ @ CVT_DOC "*"
$!
$ set DEFAULT [-.REFMAN]
$ @ CVT_DOC "*"
$!
$ set DEFAULT [-.DEMO]
$ @ CVT_DOC "*"
thread support
$ set DEFAULT PYTHON_VMS:
$ @ SETUP
You can use the following command for a full rebuild:
$ @ BUILD_PYTHON
Link the executable:
$ @ LINK_PY
$ @ SETUP
$ set DEFAULT [.DEMO]
$ PYTHON
[...]
>>> import thread1.py
Note that no more work has been done regarding threads.