Skip to content

Instantly share code, notes, and snippets.

@elgertam
Forked from jedie/install_pipsi.sh
Created October 29, 2017 05:02
Show Gist options
  • Save elgertam/2d50ea280d2395dd2bbedbb169c59d2e to your computer and use it in GitHub Desktop.
Save elgertam/2d50ea280d2395dd2bbedbb169c59d2e to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# https://github.com/mitsuhiko/pipsi
# NOTE: THIS IS BROKEN! Pipsi will install packages, then
# display "Did not find any scripts. Uninstalling."
# Behavior similar to https://github.com/mitsuhiko/pipsi/issues/89
CMD=pipsi
VENV_DIR=~/.local/venvs/pipsi
BIN_DIR=~/.local/bin
PACKAGES=$(cat <<EOF
virtualenv
-e git+https://github.com/mitsuhiko/pipsi.git#egg=pipsi
EOF
)
set -e
(
set -x
/usr/bin/env python -m venv "${VENV_DIR}"
)
(
cd "${VENV_DIR}/bin/"
source ./activate
set -x
"${VENV_DIR}/bin/pip" install -U pip
"${VENV_DIR}/bin/pip" install ${PACKAGES}
mkdir -p "${BIN_DIR}"
ln -s "${VENV_DIR}/bin/${CMD}" "${BIN_DIR}/"
)
${CMD} --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment