Python for OpenVMS -installation manual PAGE 1 title page __ | \ | | _ |__/ | | - / \ -O- | \ / \_/ \_/ | | ___ / / | \/ / | /\ |- ( )--| \/ / /\ | / / --- Copyright, 1996 - 2001 by Uwe Zessin ------------------------------------------------------------------------ Python for OpenVMS - Installation Manual July 2001 This manual describes the installation of 'Python' on OpenVMS. Software Version: 2.1.1-V001 Uwe Zessin, Germany ------------------------------------------------------------------------ 27-JUL-2001 ZE. Python for OpenVMS -installation manual PAGE 2 the Python license 0.1 the Python license (copied from LICENSE.) A. HISTORY OF THE SOFTWARE ========================== Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI) in the Netherlands as a successor of a language called ABC. Guido is Python's principal author, although it includes many contributions from others. The last version released from CWI was Python 1.2. In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI) in Reston, Virginia where he released several versions of the software. Python 1.6 was the last of the versions released by CNRI. In 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. Python 2.0 was the first and only release from BeOpen.com. Following the release of Python 1.6, and after Guido van Rossum left CNRI to work with commercial software developers, it became clear that the ability to use Python with software available under the GNU Public License (GPL) was very desirable. CNRI and the Free Software Foundation (FSF) interacted to develop enabling wording changes to the Python license. Python 1.6.1 is essentially the same as Python 1.6, with a few minor bug fixes, and with a different license that enables later versions to be GPL-compatible. Python 2.1 is a derivative work of Python 1.6.1, as well as of Python 2.0. After Python 2.0 was released by BeOpen.com, Guido van Rossum and the other PythonLabs developers joined Digital Creations. All intellectual property added from this point on, starting with Python 2.1 and its alpha and beta releases, is owned by the Python Software Foundation (PSF), a non-profit modeled after the Apache Software Foundation. See http://www.python.org/psf/ for more information about the PSF. Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible. B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON =============================================================== PSF LICENSE AGREEMENT --------------------- 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 2.1.1 software in source or binary form and its associated documentation. 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide Python for OpenVMS -installation manual PAGE 3 the Python license license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 2.1.1 alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001 Python Software Foundation; All Rights Reserved" are retained in Python 2.1.1 alone or in any derivative version prepared by Licensee. 3. In the event Licensee prepares a derivative work that is based on or incorporates Python 2.1.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 2.1.1. 4. PSF is making Python 2.1.1 available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.1.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 2.1.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.1.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By copying, installing or otherwise using Python 2.1.1, Licensee agrees to be bound by the terms and conditions of this License Agreement. BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0 ---------------------------------------------- BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization ("Licensee") accessing and otherwise using this software in source or binary form and its associated documentation ("the Software"). 2. Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and Python for OpenVMS -installation manual PAGE 4 the Python license otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee. 3. BeOpen is making the Software available to Licensee on an "AS IS" basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 5. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 6. This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the "BeOpen Python" logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page. 7. By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement. CNRI OPEN SOURCE GPL-COMPATIBLE LICENSE AGREEMENT ------------------------------------------------- 1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation. 2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 1995-2001 Corporation for National Research Initiatives; All Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the Python for OpenVMS -installation manual PAGE 5 the Python license quotes): "Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: http://hdl.handle.net/1895.22/1013". 3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1. 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By clicking on the "ACCEPT" button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement. ACCEPT CWI PERMISSIONS STATEMENT AND DISCLAIMER Python for OpenVMS -installation manual PAGE 6 the Python license ---------------------------------------- Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------------ 22-JUL-2001 ZE. Python for OpenVMS -installation manual PAGE 7 the Python for OpenVMS license 0.2 the Python for OpenVMS license Copyright 1996-2001, by Uwe Zessin This software is provided to you free of charge. Use at your own risk - if it doesn't work, I disclaim all responsibility. This software may be freely distributed as long as it is accompanied by the copyright notice. If you change this software, you may re-distribute it only if you keep the original notes AND an additional notice identifying you and indicating that you have changed it. ------------------------------------------------------------------------ I have found this wording somewhere on the Internet and liked it. Unfortunately I haven't noted the author's name so I cannot give credit. ------------------------------------------------------------------------ 22-JUL-2001 ZE. Python for OpenVMS -installation manual PAGE 8 table of contents CONTENTS 0.1 the Python license . . . . . . . . . . . . . . . . 2 0.2 the Python for OpenVMS license . . . . . . . . . . 7 CHAPTER 1 Introduction 1.1 Welcome . . . . . . . . . . . . . . . . . . . . . 1-1 CHAPTER 2 files from the Python distribution 2.1 the Python core files . . . . . . . . . . . . . . 2-1 2.2 the Python documentation . . . . . . . . . . . . . 2-1 CHAPTER 3 files from the Python for OpenVMS distribution 3.1 the Python for OpenVMS source kit . . . . . . . . 3-1 3.2 the Python for OpenVMS documentation . . . . . . . 3-1 3.3 precompiled object code . . . . . . . . . . . . . 3-3 3.4 tools to build Python on OpenVMS . . . . . . . . . 3-3 CHAPTER 4 preparations 4.1 disk space calculations . . . . . . . . . . . . . 4-1 4.2 select directory for the installation . . . . . . 4-2 4.3 logical names . . . . . . . . . . . . . . . . . . 4-2 4.4 create directories . . . . . . . . . . . . . . . . 4-3 4.5 foreign commands . . . . . . . . . . . . . . . . . 4-3 4.6 store software kits . . . . . . . . . . . . . . . 4-4 4.7 OpenVMS patches . . . . . . . . . . . . . . . . . 4-4 CHAPTER 5 installing and building 5.1 restore the Python for OpenVMS distribution . . . 5-1 5.2 create additional directories . . . . . . . . . . 5-2 5.3 configure for compilation . . . . . . . . . . . . 5-2 5.4 translate and compile or install objects . . . . . 5-3 5.4.1 convert data files . . . . . . . . . . . . . . . 5-3 5.4.2 translate VMSDEF modules . . . . . . . . . . . . 5-4 5.4.3 translate configuration . . . . . . . . . . . . 5-4 5.4.4 compile for the DCL environment . . . . . . . . 5-4 5.4.5 install objects . . . . . . . . . . . . . . . . 5-4 5.4.6 LINK - create executables . . . . . . . . . . . 5-4 5.5 setup and go . . . . . . . . . . . . . . . . . . . 5-5 5.6 compile Python files . . . . . . . . . . . . . . . 5-5 5.7 run tests . . . . . . . . . . . . . . . . . . . . 5-6 5.8 convert documentation to RUNOFF format . . . . . . 5-7 5.9 add components . . . . . . . . . . . . . . . . . . 5-8 5.10 install HTML documentation . . . . . . . . . . . . 5-8 Python for OpenVMS -installation manual PAGE 9 table of contents 5.11 thread support . . . . . . . . . . . . . . . . . . 5-9 INDEX INDEX-1 CHAPTER 1 Introduction __ | \ | | _ |__/ | | - / \ -O- | \ / \_/ \_/ | | ___ / / | \/ / | /\ |- ( )--| \/ / /\ | / / --- 1.1 Welcome to the Python programming language running on the OpenVMS operating system. This is the 'Installation Manual'. This manual tells you which software you need, where to get it from and the steps to get Python running on OpenVMS. Please try to read the entire manual before you start. Descriptions of modules with their interface routines, defined symbols and VMS objects are in the 'Reference Manual'. Other information is in the 'General Manual'. More examples are in the 'Demoes Manual'. ------------------------------------------------------------------------ 11-APR-2000 ZE. CHAPTER 2 files from the Python distribution 2.1 the Python core files For Python for OpenVMS version 2.1.1-V001 the core files are folded into the OpenVMS distribution. A number of files which are not needed for OpenVMS have been removed from the kit to save some disk space (about 11000 blocks). --- For your information: the original files were downloaded from: - http://www.python.org/ftp/python/2.1.1/ (file Python-2.1.1.tgz - 12086 blocks) ------------------------------------------------------------------------ 2.2 the Python documentation The Python documentation is decoupled from the interpreter distribution. Start at: - http://www.python.org/ftp/python/doc/2.1.1/ (file html-2.1.1.tgz - 2220 blocks) Note that the 'Python for OpenVMS documentation' only describes OpenVMS specifics, however, a kit with OpenVMS friendly filenames is available from: Python for OpenVMS -installation manual PAGE 2-2 files from the Python distribution - http://www.decus.de/~zessin/python2/kits/html2_1_1.zip (2323 blocks) ------------------------------------------------------------------------ 22-JUL-2001 ZE. CHAPTER 3 files from the Python for OpenVMS distribution 3.1 the Python for OpenVMS source kit The 'source kit' countains all required files. - http://www.decus.de/~zessin/python2/kits/ python2_1_1-v001src.zip (about 9950 blocks) ------------------------------------------------------------------------ 3.2 the Python for OpenVMS documentation The whole documention is included in the 'source kit'. Please note that not all parts are current. The format of the OpenVMS specific error messages has changed, but the reference manual has not been fully updated, yet. The documentation is available in different forms: HTML documentation The '.HTML' files are distributed within the 'source kit' that was mentioned above. You can put these files on a web server or directly read them with a browser. See the 'General Manual' for more details. Keep the [.VMS.DOC] tree intact, because there are hyperlinks between the 'manuals'. simple text format These are files that have been run through a text formatter but they don't contain any information about bold printing. The individual pages are separated by FormFeed characters. Maximum page size is 66 lines, but there are no empty filler lines before a FormFeed character. You can send these files to a printer that doesn't understand that or read them Python for OpenVMS -installation manual PAGE 3-2 files from the Python for OpenVMS distribution directly with a text editor. All four manuals are separately available: * the 'Installation Manual' - http://www.decus.de/~zessin/python2/doc/insman/insman.txt about 100 blocks * the 'General Manual' - http://www.decus.de/~zessin/python2/doc/genman/genman.txt about 285 blocks * the 'Reference Manual' - http://www.decus.de/~zessin/python2/doc/refman/refman.txt about 2050 blocks * the 'Demoes Manual' - http://www.decus.de/~zessin/python2/doc/demo/demo.txt about 95 blocks printer format These are files that have been run through the RUNOFF text formatter. They contain information for bold printing. Two variants are available: * A '.MEM' file for output on line printers. This file can be converted to the 'simple text format ('.TXT')' mentioned above. * A '.LNI' file for output on printers understanding ANSI sequences. All 4 manuals are stored in an OpenVMS text library. The library contains another file (README_TLB.TXT) with detailed instructions how to extract the manuals from the library, how to convert a '.MEM' file to a '.TXT' file to get the 'simple text format' mentioned above and how to re-apply the correct record attributes to the '.MEM' and '.TXT' files. Download: * http://www.decus.de/~zessin/python2/kits/ python2_1_1-v001doc.tlb about 2050 blocks After the download to an OpenVMS system do a: $ LIBRARY /EXTRACT= README_TLB.TXT - /OUTPUT= README_TLB.TXT - PYTHON2_1_1-V001DOC.TLB See file 'README_TLB.TXT' for further details. Note that the Python for OpenVMS documentation only describes the OpenVMS related parts. You should download the Python documentation, Python for OpenVMS -installation manual PAGE 3-3 files from the Python for OpenVMS distribution too. ------------------------------------------------------------------------ 3.3 precompiled object code For very specific configurations I MIGHT make precompiled object code available. They may NOT work on your configuration! I'm sorry, but that is the best you can expect from a 'hobby project'. Start at http://www.decus.de/~zessin/python2/obj.html to see if and what versions are available. ------------------------------------------------------------------------ 3.4 tools to build Python on OpenVMS Beginning with version 1.5.2-V001 you only need the UNZIP tool that is used to extract (and decompress) a single or multiple files from a '.ZIP' archive. Explaining this tool in more detail is beyond the scope of this manual, sorry. You should be able to get along with it if you follow the instructions in the 'installing and building' section of this manual. I have made available executable files of the tools that I use. They can be downloaded from: - http://www.decus.de/~zessin/python/tools.html Of course, there is NO guarantee that they work for you. The 'General Manual' of the Python for OpenVMS documentation has pointers where more up-to date versions (perhaps including source) can be found. ------------------------------------------------------------------------ 27-JUL-2001 ZE. CHAPTER 4 preparations This section describes how the environment for the installation and building process is to be prepared. ------------------------------------------------------------------------ 4.1 disk space calculations The following information should help you to calculate the amount of disk space required during and after installation. Sizes are taken from a disk with a cluster size of 4. PYTHON2_1_1-V001.ZIP - about 9950 blocks Can be stored anywhere, however this file should be saved for future use. The BACKUP save-set from this '.ZIP' file is about 38250 blocks big. translated documentation - about 11130 blocks Is stored in the Python tree by running CVT_DOC.COM in each subdirectory of [.VMS.DOC]. Required only if the HTML documentation in the source tree is translated to text or printer formats. The number of blocks includes '.RNO' and other RUNOFF temporary files. compiled Python code - about 4550 blocks After building the interpreter the source code from the Python library should be pre-compiled. Python documentation - 14446 blocks This is the directory tree [PYTHON.HTML2_1_1...] which is from the file HTML2_1_1.ZIP. Total space used on OpenVMS VAX is at least 76,000 blocks (/noDEBUG /OPTIMIZE, all modules enabled, threading enabled) on a disk with a cluster size of 4 blocks. These numbers are from the 2.1.1-V001 version. Updates contain bugfixes for existing files and new functionality in new files so the final disk space that is required very likely will be higher (did you Python for OpenVMS -installation manual PAGE 4-2 preparations expect something else?). 4.2 select directory for the installation The top-level of the directory tree is assumed to be named [PYTHON]. The current Python environment requires 6 directory levels. All instructions so far assume that the [PYTHON] directory is directly stored in the master file directory ([000000]) of a disk (e.g. DSA3: or DKA100:). No tests have been done to use a concealed logical name for the 'disk'. 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. It will also change the logical names PYTHON_EXEC_PREFIX_P: and PYTHON_EXEC_PREFIX_V: and will create a new directory. See the 'General Manual', 'path support' for details. 4.3 logical names A number of logical names are used to point to certain directories. The person who installs the software should be able to type in the commands from the instructions directly or use cut and paste without changes. The following logical names are currently used: PYTHON_DISK Device on which the software is to be installed. Using a concealed device might be possible, but has not been tested. PYTHON_DOC_DEMO Directory of the 'Demoes Manual'. It is used by the DEMO_EXTRACT.PY script. See 'extracting demoes from the manual' in the 'Demoes Manual'. PYTHON_INCLUDE Python include directories - these can be used by other modules that are used to enhance Python, but do not live in it's directory tree. PYTHON_INS_TMP A temporary directory for scratch space during the installation. PYTHON_INS_TOOLS A directory that contains executables of the tools (UNZIP) that are used during the installation. PYTHON_OLB Python for OpenVMS -installation manual PAGE 4-3 preparations Architecture-specific (Alpha, VAX) directory tree that contains object libraries and object files of the Python core interpreter, OpenVMS support and extensions. PYTHON_TOOLS Directory for tools that are delivered with Python for OpenVMS. PYTHON_VMS Almost all of the files from the port to OpenVMS are in this directory tree. --- The procedure PYTHON_LOGICALS.COM in the [.VMS] subdirectory will take care for some of them: $ @ DSA3:[PYTHON.PYTHON2_1_1.VMS]PYTHON_LOGICALS 1 Other names are created by the SETUP.COM procedure in the same directory, because this procedure defines the configuration and some logicals depend on the configuration. $ @ PYTHON_VMS:SETUP The logical name PYTHON_INS_TMP need to be defined by you. 4.4 create directories $ create /DIRECTORY /PROTECTION=(G:RE;W:RE) PYTHON_INS_TMP: 4.5 foreign commands Place the executable of the UNZIP tool into PYTHON_INS_TOOLS:. The processor architecture should be part of the filename, e.g. UNZIP_ALPHA.EXE Define a foreign command for UNZIP. The following example can be put into a command procedure to work on Alpha and VAX systems. $ _ARCH = "ALPHA" $ if (F$GETSYI("CPU").le.127) then $ _ARCH = "VAX" $ UNZIP == "$PYTHON_INS_TOOLS:UNZIP_''_ARCH'.EXE" $ delete /SYMBOL /LOCAL _ARCH @@ This does not work for version 2.1.1-V001 - please use a different directory. Python for OpenVMS -installation manual PAGE 4-4 preparations 4.6 store software kits Store the files that you have downloaded into PYTHON_INS_TMP: or download them now into that directory. 4.7 OpenVMS patches See the 'patches' chapter in the 'General Manual' whether you might have to apply one to your OpenVMS system. ------------------------------------------------------------------------ 27-JUL-2001 ZE. CHAPTER 5 installing and building This chapter describes the steps to build Python on OpenVMS. Version 2.1.1-V001 is distributed as a single, complete kit. There is no upgrade from older versions available. ------------------------------------------------------------------------ Specify an owner UIC to be assigned to the files: $ _O = "/OWNER=[1,4]" or use defaults: $ _O = "" The procedure PYTHON_LOGICALS.COM which is used to define the logical names is not there, yet - use a workaround. $ DEFINE PYTHON_DISK DSA3: 5.1 restore the Python for OpenVMS distribution $! -- temporary directory $ set DEFAULT PYTHON_INS_TMP: $! $! -- extract BACKUP saveset $ UNZIP -e PYTHON2_1_1-V001.ZIP $! $! -- extract files from saveset $ backup PYTHON2_1_1-V001.BCK /SAVE_SET - PYTHON_DISK:[*...] /TRUNCATE /VERIFY '_O' $! $! -- list contents of saveset $ backup PYTHON2_1_1-V001.BCK /SAVE_SET - /LIST= PYTHON_DISK:[PYTHON]PYTHON2_1_1-V001.LIS $! $! -- delete saveset - please keep the ZIP archive Python for OpenVMS -installation manual PAGE 5-2 installing and building $ delete /log PYTHON2_1_1-V001.BCK;* $! 5.2 create additional directories The intention is to keep the original directories as much unchanged as possible. First, however, establish the logical names: $ @ PYTHON_DISK:[PYTHON.PYTHON2_1_1.VMS]PYTHON_LOGICALS 1 $ @ PYTHON_VMS:SETUP $ set DEFAULT PYTHON_VMS: $ CREDIR = "CREATE/DIRECTORY ''_O' /PROTECTION=(G:RE,W:RE)/LOG" $! $ CREDIR [.TMP] $! $ CREDIR [PYTHON.SITE-PACKAGES] $! $ CREDIR [PYTHON.PREFIX2_1_1.INCLUDE] $ CREDIR [PYTHON.PREFIX2_1_1.LIB] $! $ delete /SYMBOL /LOCAL CREDIR $! Move 2 directories to the PREFIX area: $ rename [PYTHON.PYTHON2_1_1]INCLUDE.DIR - [PYTHON.PREFIX2_1_1.INCLUDE]PYTHON2_1.DIR $ rename [PYTHON.PYTHON2_1_1]LIB.DIR - [PYTHON.PREFIX2_1_1.LIB]PYTHON2_1.DIR 5.3 configure for compilation If you intend to compile the source code yourself, please review the contents of file SETUP.COM The logical name PYTHON_CFG_CXX controls whether the main module PYTHON.C is to be compiled with the DEC / Compaq C++ compiler and the CXXLINK command to be used to build the executable. This does NOT mean that you can build Python for OpenVMS with the DEC / Compaq C++ compiler!! This does NOT work, sorry, you need the DEC / Compaq C compiler. The logical name PYTHON_CFG_DEBUG controls whether object code should be generated with /DEBUG/noOPTIMIZE. The logical name PYTHON_CFG_THREADS controls if the interpreter should be build with thread support. You need to recompile ALL modules for a Python for OpenVMS -installation manual PAGE 5-3 installing and building change - instructions are at the end of this chapter. --- Even if you don't compile yourself you need to run the procedure: $ 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. After some other changes (Debug/noDebug, Thread/noThread) a different directory is created for the logical name PYTHON_EXEC_PREFIX_V: while SETUP.COM is run the first time after the change. 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. 5.4 translate and compile or install objects The Python for OpenVMS distribution does not contain any pre-translated or pre-compiled files in order to save space. 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. 5.4.1 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 Python for OpenVMS -installation manual PAGE 5-4 installing and building 5.4.2 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 5.4.3 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 "." "." 5.4.4 compile for the DCL environment $ @ PYTHON_VMS:BLDRUN "$ALL" 5.4.5 install objects Instructions need to be in the objects kit. 5.4.6 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 for OpenVMS -installation manual PAGE 5-5 installing and building $! $ @ PYTHON_VMS:LINKD_PGEN 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. 5.5 setup and go Python for OpenVMS needs some symbols: PYTHON A foreign command pointing to the executable. PYTHONPATH Information where the library is. PYTHONSTARTUP Points to a file. In VMS speak this is an 'initialization file' that Python executes on startup. PYTHONUNBUFFERED Tell Python to use unbuffered I/O. @@maintenance note: Symbol list could be moved to a different chapter. The procedure defines them dynamically: $ @ SETUP Now you can run Python on OpenVMS: $ PYTHON Python 2.1.1 (V001, Sat Jul 21 11:50:41 2001) [DECC] on OpenVMS VAX \ (D_float) Type "copyright", "credits" or "license" for more information. >>> The date printed is dynamically taken from the image header's link date - the code is in VMS__GETBUILDINFO.C. 5.6 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. Python for OpenVMS -installation manual PAGE 5-6 installing and building $ set DEFAULT PYTHON_VMS: $ @ SETUP $ @ PYTHON_TOOLS:COMPILEALL This adds 164 '.PYC' files with about 4550 blocks. 5.7 run tests On OpenVMS VAX which does not support the T_float (IEEE) floating point format it is necessary to disable parts of a test: $ set DEFAULT PYTHON_PREFIX_V: $ set DEFAULT [.LIB.PYTHON2_1_1.TEST] $ edit/edt TEST_COMPLEX.PY substitute /test_div(complex(1e/#@@test_div(complex(1e/%whole exit $ Note that the UIC of the process must match the owner UIC of the directory - else one of the tests will fail. This is an example - the actual output might look different. $ set DEFAULT PYTHON_PREFIX_V: $ set DEFAULT [.LIB.PYTHON2_1_1.TEST] $ python REGRTEST.PY test_grammar test_opcodes test_operations ... test_format The actual stdout doesn't match the expected stdout. This much did match (between asterisk lines): ********************************************************************** test_format ********************************************************************** Then ... We expected (repr): '' But instead we got: "'%#x' % 0 == '0x000' != '0x0'" test test_format failed -- Writing: "'%#x' % 0 == '0x000' != '0x0'",\ expected: '' On OpenVMS VAX V6.2 this test fails, although the ECO VAXCRTL11_062 is installed. This is a bug in the C RTL. test_funcattrs ... test_thread On OpenVMS VAX V6.2 this test hangs. The process can be resumed by a series of rapid calls to 'vms_sys.wake() from another process while Python for OpenVMS -installation manual PAGE 5-7 installing and building pressing on the testing process' screen. Some files can be deleted after the tests: $ delete /LOG PYTHON_DISK:[PYTHON.PYTHON2_1_1.LIB.TEST]*.PYC;*, - TEST_RGBIMG.RGB;*, TEST_TMP.;* 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. $ set DEFAULT PYTHON_TMP_V: $ SHOW DEFAULT $ DELETE [...]*.*;*,;,;,;,; Warning! This will delete all files in this directory tree - make sure you are at the correct location! 5.8 convert documentation to RUNOFF format The Python for OpenVMS distribution contains full sources to format the files for line printer or text output. You do not need to download the files 'python2_1_1-v001doc.tlb', 'demo.txt', 'insman.txt', 'genman.txt' or 'refman.txt' from the Internet if you have the 'Python for OpenVMS source kit' and access to this chapter. You do not need to execute these commands unless you want to generate the '.TXT' files. $ 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 "*" ------------------------------------------------------------------------ Python for OpenVMS -installation manual PAGE 5-8 installing and building 5.9 add components The base kit does not include the following components: VMS_LBR, VMS_MAIL, VMS_SMG The following steps are necessary to add one or more components: Register: $ set DEFAULT PYTHON_VMS: $! $ python PYTHON_TOOLS:REGISTER_CONFIG.PY - R PYTHON_VMS:CONFIG_VMS_LBR.TXT $ python PYTHON_TOOLS:REGISTER_CONFIG.PY - R PYTHON_VMS:CONFIG_VMS_MAIL.TXT $ python PYTHON_TOOLS:REGISTER_CONFIG.PY - R PYTHON_VMS:CONFIG_VMS_SMG.TXT Some configuration data files have been updated and need to be processed again: $ @ PYTHON_TOOLS:CVT_CONFIG_MODULES.COM $ @ PYTHON_TOOLS:CVT_CONFIG_OLB.COM $ @ CONFIG_INITTAB2MAR CONFIG.DAT $ @ BLDRUN VMS_MACRO CONFIG_INITTAB The component(s) can now be built: $ @ BLDRUN C:PYTHON.VMS_LBR $ @ BLDRUN C:PYTHON.VMS_MAIL $ @ BLDRUN C:PYTHON.VMS_SMG $! $ @ LINK_PY ------------------------------------------------------------------------ 5.10 install HTML documentation There is a link from [.DOC]DOCU.HTML to the Python documentation. $ set DEFAULT PYTHON_INS_TMP: $ UNZIP -e HTML2_1_1.ZIP $! $ set DEFAULT PYTHON_DISK:[PYTHON] $ BACKUP PYTHON_INS_TMP:HTML2_1_1.BCK /SAVE_SET - [*...] /TRUNCATE /VERIFY '_O' $! $ DELETE PYTHON_INS_TMP:HTML2_1_1.BCK;* ------------------------------------------------------------------------ Python for OpenVMS -installation manual PAGE 5-9 installing and building 5.11 thread support Use your text editor of choice to change the procedure SETUP.COM to define the logical name PYTHON_CFG_THREADS to "1" and run it: $ set DEFAULT PYTHON_VMS: $ @ SETUP Notice that the logical names PYTHON_EXEC_PREFIX_P: and PYTHON_EXEC_PREFIX_V: have changed. On the first run SETUP.COM creates a new directory for this configuration. You can use the following command for a full rebuild: $ @ BUILD_PYTHON Test it: $ @ SETUP $ set DEFAULT [.DEMO] $ PYTHON [...] >>> import thread1.py Note that no more work has been done regarding threads. --- To revert to non-threading mode: - undo the change to logical name PYTHON_CFG_THREADS - re-run SETUP.COM - re-compile all modules and link the executable again with BUILD_PYTHON.COM ------------------------------------------------------------------------ 26-JUL-2001 ZE. * Index PAGE INDEX-1 INDEX files PYTHON_DOC_DEMO, 4-2 SETUP.COM, 5-2 PYTHON_INCLUDE, 4-2 files PYTHON_INS_TMP, 4-2, 5-1 demo.txt, 3-2, 5-7 PYTHON_INS_TOOLS, 4-2 genman.txt, 3-2, 5-7 PYTHON_OLB, 4-2 insman.txt, 3-2, 5-7 PYTHON_TOOLS, 4-3 python2_1_1-V001.zip, 3-1 PYTHON_VMS, 4-3 python2_1_1-v001doc.tlb, 3-2, 5-7 symbols README_TLB.TXT, 3-2 PYTHON, 5-5 refman.txt, 3-2, 5-7 PYTHONPATH, 5-5 PYTHONSTARTUP, 5-5 logical names PYTHONUNBUFFERED, 5-5 PYTHON_CFG_CXX, 5-2 PYTHON_CFG_DEBUG, 5-2 PYTHON_CFG_THREADS, 5-2, 5-9 tools PYTHON_DISK, 4-2 UNZIP, 3-3, 4-3