nutanix / calm-dsl

Keep Calm and DSL On!

Home Page:https://nutanix.github.io/calm-dsl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Improvement] add functionality for Windows specific Makefile targets

glover-chris opened this issue · comments

Describe the request
There are more and more Windows users utilizing Calm DSL and the current Makefile "dev" target is specific to Linux/Darwin python installations. Windows Python has different OS paths for binaries.
Current behaviour
Running "make dev" fails for Windows users configuring DSL.
Expected behaviour
Running "make dev" should work on windows.

A possible workaroound could be something like as follows: this example merely shows the "dev" target but all occurences of "venv/bin" should use the ${VENV_PATH} variable within the Makefile targets.

ifeq ($(OS),Windows_NT)
VENV_PATH = venv/Scripts
else
ifeq ($(UNAME_S),Linux)
VENV_PATH = venv/bin
endif
ifeq ($(UNAME_S),Darwin)
VENV_PATH = venv/bin
endif
endif

dev:
# Setup our python3 based virtualenv
# This step assumes python3 is installed on your dev machine
[ -f ${VENV_PATH}/Scripts/python ] || (python -m venv venv &&
${VENV_PATH}/pip install --upgrade pip setuptools)
${VENV_PATH}/pip install --no-cache -r requirements.txt -r dev-requirements.txt
${VENV_PATH}/python setup.py develop