-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·33 lines (24 loc) · 1.19 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.PHONY: clean create_environment requirements
#################################################################################
# GLOBALS #
#################################################################################
PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PROJECT_NAME = words-use
PYTHON_INTERPRETER = python3
#################################################################################
# COMMANDS #
#################################################################################
## Install Python Dependencies
requirements: test_environment
$(PYTHON_INTERPRETER) -m pip install -U pip setuptools wheel
$(PYTHON_INTERPRETER) -m pip install -r requirements.txt
## Delete all compiled Python files
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
## Set up python interpreter environment
create_environment:
$(PYTHON_INTERPRETER) -m venv $(PROJECT_DIR)/.venv
## Test python environment is setup correctly
test_environment: create_environment
$(PYTHON_INTERPRETER) test_environment.py