Skip to content

Instantly share code, notes, and snippets.

@danieltomasz
Last active August 11, 2023 11:20
Show Gist options
  • Save danieltomasz/15a7eb5b127c44720be09015ba2eb70c to your computer and use it in GitHub Desktop.
Save danieltomasz/15a7eb5b127c44720be09015ba2eb70c to your computer and use it in GitHub Desktop.
Quick makefile to install project from gitgub
.ONESHELL:
.PHONY: install
PROJECT?=python-design
VERSION?=3.11.4
VENV=${PROJECT}-${VERSION}
VENV_DIR=$(shell pyenv root)/versions/${VENV}
PYTHON=${VENV_DIR}/bin/python
install:
@echo "Installing ${VENV}"
env PYTHON_CONFIGURE_OPTS=--enable-shared pyenv install --skip-existing ${ENV}
pyenv virtualenv ${VERSION} ${VENV} || true
pyenv local ${VENV}
${PYTHON} -m pip install --upgrade pip
${PYTHON} -m pip install -r requirements.txt
update:
$(PYTHON) -m pip install --upgrade -r requirements.txt --upgrade-strategy=eager
install-kernel:
${PYTHON} -m PYDEVD_DISABLE_FILE_VALIDATION=1 ipykernel install --user --name ${VENV}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment