diff --git a/py-polars/Makefile b/py-polars/Makefile index fc636fcbcd2e..94774bc641ec 100644 --- a/py-polars/Makefile +++ b/py-polars/Makefile @@ -2,7 +2,13 @@ PYTHONPATH= SHELL=/bin/bash -VENV = .venv +VENV_DEFAULT=.venv + +ifeq ($(VIRTUAL_ENV), ) + VENV=VENV_DEFAULT +else + VENV=$(VIRTUAL_ENV) +endif ifeq ($(OS),Windows_NT) VENV_BIN=$(VENV)/Scripts @@ -10,10 +16,16 @@ else VENV_BIN=$(VENV)/bin endif + .venv: ## Set up virtual environment and install requirements python3 -m venv $(VENV) $(MAKE) requirements + +testing: ## stuff + ## https://gist.github.com/rueycheng/42e355d1480fd7a33ee81c866c7fdf78 + @echo $(dir $(VENV_BIN)) + .PHONY: requirements requirements: .venv ## Install/refresh all project requirements $(VENV_BIN)/python -m pip install --upgrade pip