bindings/python: make target to set up env

This commit is contained in:
Aaron Miller 2023-06-30 13:41:51 -07:00 committed by AT
parent ac5c8e964f
commit 6a74e515e1

View File

@ -2,9 +2,12 @@ SHELL:=/bin/bash -o pipefail
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PYTHON:=python3
venv:
env:
if [ ! -d $(ROOT_DIR)/env ]; then $(PYTHON) -m venv $(ROOT_DIR)/env; fi
dev: env
source env/bin/activate; pip install black isort pytest; pip install -e .
documentation:
rm -rf ./site && mkdocs build
@ -22,4 +25,4 @@ isort:
source env/bin/activate; isort --ignore-whitespace --atomic -w 120 gpt4all
test:
source env/bin/activate; pytest -s gpt4all/tests
source env/bin/activate; pytest -s gpt4all/tests