-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (65 loc) · 2.1 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Makefile for the template_python_project
SHELL=/bin/bash
PYTHON_VERSION=3
PYTHON_BIN=venv/bin/
TESTS_FOLDER=tests
all:
$(MAKE) help
help:
@echo
@echo "-----------------------------------------------------------------------------------------------------------"
@echo " DISPLAYING HELP "
@echo "-----------------------------------------------------------------------------------------------------------"
@echo "make delete_venv"
@echo " Delete the current venv"
@echo "make create_venv"
@echo " Create a new venv for the specified python version"
@echo "make requirements"
@echo " Upgrade pip and install the requirements"
@echo "make setup"
@echo " Call setup.py install"
@echo "make clean_pyc"
@echo " Clean all the pyc files"
@echo "make clean_build"
@echo " Clean all the build folders"
@echo "make clean"
@echo " Call delete_venv clean_pyc clean_build"
@echo "make install"
@echo " Call clean create_venv requirements run_tests setup"
@echo "make help"
@echo " Display this message"
@echo "-----------------------------------------------------------------------------------------------------------"
install:
$(MAKE) clean
$(MAKE) create_venv
$(MAKE) requirements
$(MAKE) setup
clean:
$(MAKE) delete_venv
$(MAKE) clean_pyc
$(MAKE) clean_build
delete_venv:
@echo "Deleting venv.."
rm -rf venv
create_venv:
@echo "Creating venv.."
python$(PYTHON_VERSION) -m venv ./venv
requirements:
@echo "Upgrading pip.."
$(PYTHON_BIN)pip install --upgrade pip wheel setuptools
@echo "Installing requirements.."
$(PYTHON_BIN)pip install -r requirements.txt
pip2 install bluepy
setup:
$(PYTHON_BIN)python setup.py install
clean_pyc:
@echo "Cleaning pyc files.."
find . -name '*.pyc' -delete
find . -name '*.pyo' -delete
find . -name '*~' -delete
clean_build:
@echo "Cleaning build directories.."
rm --force --recursive build/
rm --force --recursive dist/
rm --force --recursive *.egg-info
.PHONY: delete_venv create_venv requirements setup clean_pyc clean_build clean help