Installing Sumo

Preface

Sumo is available on pypi, as a debian or rpm package and as a tar.gz or wheel file.

Requirements

Sumo requires Python version 3.9 or newer.

Sumo is tested on debian and Fedora Linux distributions but should run on all Linux distributions. It probably also runs on other flavors of Unix, probably even MacOS, but this is not tested.

It may run on windows, particularly the Windows Subsystem for Linux or the Cygwin environment, but this is also not tested.

Install methods

Quickstart

If you just want to give sumo a try without going too much into installation details, you can use the following recipe. Note that this creates the directories ‘VENV’ and ‘SUMO’ in your HOME directory:

cd $HOME
python -m venv VENV
source VENV/bin/activate
pip install epics-sumo
echo "source $HOME/VENV/bin/activate" > VENV/setenv.sh
sumo help completion-script >> VENV/setenv.sh
sumo config new SUMO sumo-free-database INITIAL
source $HOME/VENV/setenv.sh

With source $HOME/VENV/setenv.sh your shell is set up to use sumo.

Now you may use sumo, for example as shown at Using sumo.

Download and install with pip

pip is the python package manager. It is easy to use, the only disadvantage is that on Linux when run as root it circumvents your package manager.

The following chapters show various methods for installing sumo with pip.

Install in a virtual environment

Python virtual environment an easy way to install python programs and libraries in a separate directory that doesn`t interfere with the rest of your system.

If you do not yet have a virtual environment, create and activate one with:

python -m venv DIRECTORY
source DIRECTORY/bin/activate

Now install epics-sumo with:

pip install epics-sumo

Now continue at The sumo configuration file

Install in your home

This installs epics-sumo in your home directory, see pip –user. Just enter:

pip install --user epics-sumo

Now continue at The sumo configuration file

Install at PYTHONUSERBASE

If environment variable PYTHONUSERBASE is set, the following command installs epics-sumo there:

pip install --user epics-sumo

Now continue at The sumo configuration file

Global installation

When you have administrator rights, you install epics-sumo globally like this:

sudo pip install epics-sumo

Now continue at The sumo configuration file

Install with pip from a file or directory

Install from downloaded *.tar.gz or *.whl file [1] [2]:

pip install FILENAME

Install from source directory [1] [3]:

pip install DIRECTORY

Now continue at The sumo configuration file

Global installation with the system package manager (Linux)

On systems with debian package manager (debian/ubuntu/suse…) [2] [4]:

dpkg -i PACKAGEFILE

On systems with rpm package manager (fedora/RHEL/CentOS…) [2] [5]:

rpm -ivh PACKAGEFILE

Now continue at The sumo configuration file

The sumo configuration file

In order to use sumo on your system you should create a configuration file.

The easiest way create configuration file and the sumo directory SUMODIR is to use sumo config new.

If you are new to sumo, simply enter this commmand:

sumo config new SUMODIR sumo-free-database INITIAL

This installs the sumo-free-database. dependency database in directory SUMODIR/database.

See Configuration Files for a complete description of configuration files.

See sumo.config examples for examples of configuration files.

Command completion

It is highly recommended that you set up command completion as described at Command completion.

Using sumo

Here is a first example how to use sumo.

You can download and build EPICS Base. Note that downloading the sources may take about 30 seconds. Do not be alarmed by compiler warnings during the build process, they are harmless:

sumo build new BASE:R3-15-9 --makeflags "-sj" --progress

After the build is finished, here are more commands you can play with: