From 570245558a53615d658acd84739411ab64099cec Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sat, 13 Feb 2021 12:45:33 +0100 Subject: [PATCH] try to detect OS for venv stuff --- Makefile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 71e29a7..78204e1 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,32 @@ VENV = venv +ifeq ($(OS), Windows_NT) + BIN=$(VENV)/Scripts +else + BIN=$(VENV)/bin +endif + all: lint test $(VENV): requirements.txt requirements-dev.txt setup.py python3 -m venv $(VENV) - $(VENV)/bin/python3 -m pip install --upgrade -r requirements.txt - $(VENV)/bin/python3 -m pip install --upgrade -r requirements-dev.txt - $(VENV)/bin/python3 -m pip install -e . + $(BIN)/python3 -m pip install --upgrade -r requirements.txt + $(BIN)/python3 -m pip install --upgrade -r requirements-dev.txt + $(BIN)/python3 -m pip install -e . touch $(VENV) test: $(VENV) - $(VENV)/bin/python3 -m pytest + $(BIN)/python3 -m pytest .PHONY: test lint: $(VENV) - $(VENV)/bin/python3 -m flake8 + $(BIN)/python3 -m flake8 .PHONY: lint release: $(VENV) - $(VENV)/bin/python3 setup.py sdist bdist_wheel - $(VENV)/bin/twine upload dist/* + $(BIN)/python3 setup.py sdist bdist_wheel + $(BIN)/twine upload dist/* .PHONY: release clean: