#!/usr/bin/env bash
# automatically generated by auxilium

set -eE

if [ "$1" == "-p" ]
then
    export PIP_CONFIG_FILE=devops/pip/pip.conf
elif [ "$1" != "" ]
then
    echo "the only valid option is -p for exposing the pip.conf"
    exit 1
fi

UNAME=$(uname -s)
if [ $UNAME = "Linux"  ]
then
    CWD="$PWD"
elif [ $UNAME = "Darwin" ]
then
    CWD="$PWD"
else # windows
    CWD="."
fi

{% if "pip" in aux -%}
{% if aux.pip.use_uv -%}
pip install {{ aux.versions.uv }}
{%- endif %}
{% if aux.pip.use_uv %}uv {%endif%}pip install -e "$CWD[test,dev{% if "docs" in aux %},docs{%endif%}]"{% if aux.pip.editable_strict %} --config-settings editable_mode=strict{% endif %}
{%- endif %}
pre-commit install --config=devops/pre-commit/config.yaml
