Skip to content

Commit

Permalink
Small updates to build and docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdlaird committed Oct 25, 2024
1 parent a148607 commit ed44cca
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
.PHONY: all nopyc clean virtualenv install test
.PHONY: all nopyc clean install test

SHELL := /usr/bin/env bash
PYTHON_BIN ?= python
PROJECT_VENV ?= venv

all: virtualenv install
all: test

virtualenv:
@if [ ! -d "venv" ]; then \
$(PYTHON_BIN) -m pip install virtualenv --user; \
$(PYTHON_BIN) -m virtualenv venv; \
fi
venv:
$(PYTHON_BIN) -m pip install virtualenv --user
$(PYTHON_BIN) -m virtualenv $(PROJECT_VENV)

install: virtualenv
install: venv
@( \
source venv/bin/activate; \
source $(PROJECT_VENV)/bin/activate; \
python -m pip install -r requirements.txt -r requirements-dev.txt; \
)

Expand All @@ -22,10 +21,10 @@ nopyc:
find . -name __pycache__ | xargs rm -rf || true

clean: nopyc
rm -rf _build dist *.egg-info venv
rm -rf _build dist *.egg-info $(PROJECT_VENV)

test: install
@( \
source venv/bin/activate; \
source $(PROJECT_VENV)/bin/activate; \
pytest -v; \
)

0 comments on commit ed44cca

Please sign in to comment.