@@ -25,35 +25,35 @@ all help:
2525
2626env : $(VIRTUAL_ENV )
2727
28+
2829$(VIRTUAL_ENV ) :
2930 if [ ! -d $( VIRTUAL_ENV) ]; then \
3031 echo " Creating Python virtual env in \` ${VIRTUAL_ENV} \` " ; \
31- python3 -m venv $(VIRTUAL_ENV ) ; \
32+ python3 -m venv $(VIRTUAL_ENV ) \
33+ source $(VIRTUAL_ENV ) /bin/activate;
34+ else \
35+ source $(VIRTUAL_ENV ) /bin/activate;
3236 fi
3337
38+
3439.PHONY : run
3540run : env
36- $(LOCAL_PYTHON ) -m gunicorn -w 4 wsgi:app
37-
38-
39- requirements : .requirements.txt
40- env : ./.venv/bin/activate
41-
41+ $(LOCAL_PYTHON ) -m gunicorn --config=gunicorn.conf.py
4242
43- .requirements.txt : requirements.txt
44- $(shell . .venv/bin/activate && pip install -r requirements.txt)
4543
4644.PHONY : install
4745install : env
4846 $(LOCAL_PYTHON ) -m pip install --upgrade pip setuptools wheel && \
4947 $(LOCAL_PYTHON ) -m pip install -r requirements.txt && \
5048 echo Installed dependencies in \` ${VIRTUAL_ENV} \` ;
5149
50+
5251.PHONY : deploy
5352deploy :
5453 make install && \
5554 make run
5655
56+
5757.PHONY : update
5858update : env
5959 $(LOCAL_PYTHON ) -m pip install --upgrade pip setuptools wheel && \
@@ -67,6 +67,7 @@ format: env
6767 isort --multi-line=3 . && \
6868 black .
6969
70+
7071.PHONY : lint
7172lint :
7273 flake8 . --count \
@@ -75,20 +76,21 @@ lint:
7576 --show-source \
7677 --statistics
7778
79+
7880.PHONY : clean
7981clean :
80- find . -name ' poetry.lock ' -delete
81- find . -name ' .coverage ' -delete
82- find . -name ' **/*.pyc ' -delete
83- find . -name ' poetry.lock' -delete
84- find . -name ' *.log' -delete
85- find . -name ' .DS_Store' -delete
86- find . -wholename ' **/*.pyc' -delete
87- find . -wholename ' **/*.html' -delete
88- find . -type d -wholename ' **/ __pycache__/ ' -exec rm -rf {} \;
89- find . -type d -wholename ' .venv' -exec rm -rf {} \;
90- find . -type d -wholename ' .pytest_cache' -exec rm -rf {} \;
91- find . -type d -wholename ' **/.pytest_cache' -exec rm -rf {} \;
92- find . -type d -wholename ' **/*.log' -exec rm -rf {} \;
93- find . -type d -wholename ' ./.reports/*' -exec rm -rf {} \;
94- find . -type d -wholename ' **/.webassets-cache/ ' -exec rm -rf {} \ ;
82+ find . -name ' .coverage ' -delete && \
83+ find . -name ' *.pyc ' -delete \
84+ find . -name ' __pycache__ ' -delete \
85+ find . -name ' poetry.lock' -delete \
86+ find . -name ' *.log' -delete \
87+ find . -name ' .DS_Store' -delete \
88+ find . -wholename ' **/*.pyc' -delete && \
89+ find . -wholename ' **/*.html' -delete && \
90+ find . -type d -wholename ' __pycache__' -exec rm -rf {} + && \
91+ find . -type d -wholename ' .venv' -exec rm -rf {} + && \
92+ find . -type d -wholename ' .pytest_cache' -exec rm -rf {} + && \
93+ find . -type d -wholename ' **/.pytest_cache' -exec rm -rf {} + && \
94+ find . -type d -wholename ' **/*.log' -exec rm -rf {} + && \
95+ find . -type d -wholename ' ./.reports/*' -exec rm -rf {} + && \
96+ find . -type d -wholename ' **/.webassets-cache' -exec rm -rf {};
0 commit comments