# Toolset Configuration

Depending on your source code, different toolsets might be required to be installed on the VM where CLi is installed. These toolsets basically mimic your (customer's) build environment.

CLI carries a set of toolsets to help simplify the process. The toolset configuration is maintained by Lineaje CLI in JSON files. Modify them only if necessary.

```
# Go inside the directory where CLI is extracted 
$ cd veecli 
# Use jq to see the Toolset JSON content files 
$ cat third_party/runtimes-config.json | jq . | less 
$ cat third_party/tools-config.json | jq . | less 
```

If your source code requires any toolset that is not carried by Lineaje CLI, follow the below steps to install the appropriate version of the toolset that your source code needs.

### Python Toolset

If your source code requires python, please setup and configure appropriate version of python.

#### Native python Toolset

SBOM generation can also be done using the default Python available in the system.

```
# Verify python is available in the environment. 
$ which python 
# Verify the minimum version of pipdeptree available in the environment is 2.3.3 and above 
$ pip show pipdeptree 
# Install “pipdeptree” using the following command, if not installed 
$ sudo pip install pipdeptree==2.3.3 
# Verify that python can be used to create virtual environments 
$ python -m venv /tmp/python-venv 
```

#### Setup python for Ubuntu (22.04)

Check what version of python your code requires and install the correct version. Steps to install Python 3.10 for ubuntu 22.04 is shown below for illustration

```
# Go inside the directory where CLI is extracted 
$ cd veecli 
 
# Update APT Package Index Cache, sudo is required for this 
$ sudo apt-get update 
# Install the following packages from the default APT repository, sudo is required for this 
$ sudo apt-get install apt-utils pkg-config git tar wget build-essential unzip jq -y 
$ sudo apt-get install libssl-dev libpq-dev libffi-dev libsqlite3-dev -y  
$ sudo apt-get install python3-pip python3-venv -y 
 
# NOTE: Ensure that the following steps are executed inside the extracted veecli folder 
# Download and locally compile Python 3.10 
$ wget -q https://www.python.org/ftp/python/3.10.8/Python-3.10.8.tgz 
$ tar -xzf Python-3.10.8.tgz 
$ mkdir -p third_party/linux/python310 
$ cd Python-3.10.8 
$ ./configure -prefix=$(pwd)/../third_party/linux/python310 > /dev/null 2>&1 
$ make install > /dev/null 2>&1 
$ cd - 
 
# Verify that Python 3.10 binary was correctly compiled by checking for its presence 
$ ls -al third_party/linux/python310/bin/python3.10 
 
# Install tools required for dependency generation 
$ sudo pip install pipdeptree==2.3.3 
 
# Cleanup files 
$ rm -f Python-3.10.8.tgz
```

###
