#!/bin/bash

if ! command -v pyenv &> /dev/null
then
    echo "pyenv not installed. Installing now"
    curl https://pyenv.run | bash
    echo "Follow the above prompt to setup pyenv and restart your shell session"
    echo '''
'''
    exit 1
fi

# Set correct python version
pyenv local
pyenv install -s

# Install flit manually, this is used to manage further python deps
pip install flit==3.8.0
python3 -m flit install --deps=develop

# Set up pre-commit hooks
pre-commit install
