-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·35 lines (26 loc) · 1012 Bytes
/
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
34
35
# Disable printing of all the makefile commands
MAKEFLAGS += --silent
.PHONY: setup-venv
PYTHON_VERSION = "3.10.9"
VENV_NAME := $(shell cat .python-version)
setup-venv: _install_python_version _install_virtualenv _install_pkg
_install_python_version:
# Ensures that the version of python required by CMP is installed
echo "-- Checking python pyenv $ installation..."
if pyenv versions | grep -q $(PYTHON_VERSION); then \
echo "- python $(PYTHON_VERSION) installation was found in pyenv"; \
else \
echo "- python $(PYTHON_VERSION) installation was not found in pyenv, installing it..."; \
pyenv install $(PYTHON_VERSION); \
fi
_install_virtualenv:
echo "-- Installing virtual env..."
echo "- Uninstalling previous venv..."
pyenv uninstall -f $(VENV_NAME)
echo "- Installing venv..."
pyenv virtualenv $(PYTHON_VERSION) $(VENV_NAME)
echo "- Upgrading pip..."
pip install --upgrade pip
_install_pkg:
echo "Installing cmp packages and dependencies..."
pip install -r requirements_dev.txt