Skip to content

Commit 5113d50

Browse files
committed
chore: add windows compatibility to init
1 parent d4aefe3 commit 5113d50

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

Makefile

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
SHELL := /bin/bash
2+
ifeq ($(OS),Windows_NT)
3+
PYTHON = python.exe
4+
ACTIVATE_VENV = venv\Scripts\activate
5+
else
6+
PYTHON = python3.11
7+
ACTIVATE_VENV = source venv/bin/activate
8+
endif
9+
PIP = $(PYTHON) -m pip
210

311
ifneq ("$(wildcard .env)","")
412
include .env
@@ -25,12 +33,14 @@ all: help
2533

2634
analyze:
2735
cloc . --exclude-ext=svg,json,zip --vcs=git
36+
2837
init:
38+
make clean && \
39+
$(PYTHON) -m venv venv && \
40+
$(ACTIVATE_VENV) && \
41+
$(PIP) install --upgrade pip && \
42+
$(PIP) install -r requirements.txt && \
2943
npm install && \
30-
python3.11 -m venv venv && \
31-
source venv/bin/activate && \
32-
pip install --upgrade pip && \
33-
pip install -r requirements.txt && \
3444
pre-commit install
3545

3646
activate:
@@ -42,10 +52,14 @@ test:
4252

4353
lint:
4454
pre-commit run --all-files && \
55+
pylint models && \
56+
flake8 . && \
57+
isort . && \
4558
black .
4659

4760
clean:
48-
rm -rf venv && rm -rf node_modules
61+
rm -rf venv && rm -rf node_modules && \
62+
find ./models/ -name __pycache__ -type d -exec rm -rf {} +
4963

5064
release:
5165
git commit -m "fix: force a new release" --allow-empty && git push

0 commit comments

Comments
 (0)