#!/usr/bin/env bash
#
# Helper script to setup a virtualenv
#
# Copyright (C) 2025 The Tor Project, Inc.
# SPDX-License-Identifier: AGPL-3.0-or-later

# Parameters
DIRNAME="`dirname $0`"
BASEDIR="`cd $DIRNAME/.. &> /dev/null && pwd`"

# Set PIPFILE env
export PIPENV_PIPFILE=$BASEDIR/Pipfile

# Install
pipenv install || exit 1

# Display environment information
env
which pip
pipenv run python3 --version
pipenv run molecule --version
pipenv run pytest --version
pipenv run ansible --version
pipenv run ansible-lint --version
