Building the Python wheel

This page covers how to build the Python wheel yourself, rather than getting it from PyPi or GitHub. Building yourself can reduce risk of supply attacks and might be necessary depending on your organizational rules.

Pre-requisites

The following software is needed to build:

Environment variables

There are 2 different ways of informing the build process where zoslib and OpenSSL are located. The first is if you have done a full zOpen install, then you can use the ZOPEN_ROOTFS environment variable. If you have installed OpenSSL and zoslib individually, i.e. in your home directory, then you can specify OPENSSL_ROOT and ZOSLIB_ROOT. If ZOPEN_ROOTFS is not specified then both OPENSSL_ROOT and ZOSLIB_ROOT must be set.

If using the user installation method you can put zoslib and OpenSSL in a folder in your z/OS Unix home directory. Then in your .zprofile or .profile point the to the relevant folders:

# SEAR dependencies
OPENSSL_ROOT = /home/<your RACF id>/software/openssl
ZOSLIB_ROOT = /home/<your RACF id>/software/zoslib

Initiating the build process

First you will need to clone down the source code with git

git clone https://github.com/Mainframe-Renewal-Project/sear.git

Then you will want to create a Python virtual environment and install the build and setuptools packages in it.

pip install build && pip install setuptools

Once you have all the necessary tools do a git clone

python -m build

After the build process is done a wheel will appear in ./dist/


This site uses Just the Docs, a documentation theme for Jekyll.