sh << 'EOF'
set -e

sh -cx "python3 --version"

# initialize two venv in parallel
sh -cx "rm -rf .venv && python3 -m venv .venv" &
pids="$!"
sh -cx "rm -rf .venv-alt && python3 -m venv .venv-alt" &
pids="$pids $!"

wait $pids


# install one venv with only examples, the other with examples and pipenv
sh -cx ".venv/bin/pip install -v examples &>pip-install-examples.txt" &
pids="$!"
sh -cx ".venv-alt/bin/pip install -v examples pipenv &>pip-install-examples--pipenv.txt" &
pids="$pids $!"

wait $pids

# print the versions for each installed package
sh -cx ".venv/bin/pip show examples | grep 'Version:'"
sh -cx ".venv/bin/pip show examples | grep 'Version:'"
sh -cx ".venv-alt/bin/pip show pipenv | grep 'Version:'"

diff --side-by-side --recursive --brief \
    "$(find .venv -type d -path '**/site-packages/examples')" \
    "$(find .venv-alt -type d -path '**/site-packages/examples')"
EOF

