-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (22 loc) · 935 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
.PHONY: requirements requirements-upgrade freeze run cloc clean
requirements:
-@echo "### Installing requirements"
-@pip install -r requirements.txt
requirements-upgrade:
-@echo "### Upgrading requirements"
-@pip freeze | cut -d = -f 1 | xargs pip install -U
freeze:
-@echo "### Freezing python packages to requirements.txt"
-@pip freeze > requirements.txt
run:
@python main.py
cloc:
-@echo "### Counting lines of code within the project"
-@echo "# Total:" ; find . -iregex '.*\.py\|.*\.js\|.*\.html\|.*\.css' -type f -exec cat {} + | wc -l
-@echo "# Python:" ; find . -name '*.py' -type f -exec cat {} + | wc -l
-@echo "# JavaScript:" ; find . -name '*.js' -type f -exec cat {} + | wc -l
-@echo "# HTML:" ; find . -name '*.html' -type f -exec cat {} + | wc -l
-@echo "# CSS:" ; find . -name '*.css' -type f -exec cat {} + | wc -l
clean:
-@echo "### Cleaning *.pyc files "
-@find . -name '*.pyc' -exec rm -f {} \;