Skip to content

Commit feb6a88

Browse files
committed
Add separate make install command.
1 parent 0e8196c commit feb6a88

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
include .env
12
PROJECT_NAME := $(shell basename $CURDIR)
3+
ENVIRONMENT := ${ENVIRONMENT}
24
VIRTUAL_ENV := $(CURDIR)/.venv
35
LOCAL_PYTHON := $(VIRTUAL_ENV)/bin/python3
46

7+
58
define HELP
69
Manage $(PROJECT_NAME). Usage:
710

811
make run - Run $(PROJECT_NAME) locally.
12+
make devinstall - Create local virtualenv & install dependencies for dev environments.
913
make install - Create local virtualenv & install dependencies.
1014
make deploy - Set up project & run locally.
1115
make update - Update dependencies via Poetry and output resulting `requirements.txt`.
@@ -29,7 +33,6 @@ $(VIRTUAL_ENV):
2933
echo "Creating Python virtual env in \`${VIRTUAL_ENV}\`"; \
3034
python3 -m venv $(VIRTUAL_ENV); \
3135
fi
32-
poetry config virtualenvs.path $(VIRTUAL_ENV)
3336

3437
.PHONY: run
3538
run: env
@@ -39,8 +42,8 @@ run: env
3942
dev: env
4043
$(LOCAL_PYTHON) -m uvicorn asgi:api --reload --port 9300
4144

42-
.PHONY: install
43-
install: env
45+
.PHONY: devinstall
46+
devinstall: env
4447
$(shell . $(VIRTUAL_ENV)/bin/activate)
4548
$(LOCAL_PYTHON) -m pip install --upgrade pip setuptools wheel && \
4649
LDFLAGS="-L$(/opt/homebrew/bin/brew --prefix openssl)/lib -L$(/opt/homebrew/bin/brew --prefix re2)/lib" && \
@@ -52,6 +55,13 @@ install: env
5255
poetry install --with dev --sync
5356
echo Installed dependencies in \`${VIRTUAL_ENV}\`;
5457

58+
.PHONY: install
59+
install: env
60+
$(shell . $(VIRTUAL_ENV)/bin/activate)
61+
$(LOCAL_PYTHON) -m pip install --upgrade pip setuptools wheel
62+
$(LOCAL_PYTHON) -m pip install -r requirements.txt
63+
echo Installed dependencies in \`${VIRTUAL_ENV}\`;
64+
5565
.PHONY: deploy
5666
deploy:
5767
make install && \

0 commit comments

Comments
 (0)