-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (54 loc) · 1.18 KB
/
Makefile
File metadata and controls
66 lines (54 loc) · 1.18 KB
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
# Nightmare Project - Makefile(Python)
# Copyright(C) 2020, Team Gorgeous Bubble, All Rights Reserved.
# Python Commands
PYTHON = python3
# Binary Parameters
PYBASE = $(shell pwd)
PYBIN = $(PYBASE)/bin
MKBIN = $(shell mkdir -p $(PYBIN))
# Docker Commands
DOCKER = docker
DOCKERBUILD = $(DOCKER) build
DOCKERRUN = $(DOCKER) run
# Application
APPNAME = nightmare
APPDIST = $(APPNAME).tar.gz
APPPATH = $(PYBIN)/$(APPNAME)
# Build
all: build
.PHONY: help
help:
@echo "make build"
@echo " build app as a binary"
@echo "make clean"
@echo " clean build cache files"
@echo "make venv"
@echo " run venv"
@echo "make lint"
@echo " run lint"
@echo "make test"
@echo " run tests"
.PHONY: build
build:
pyinstaller -n $(APPNAME) -F main.py
.PHONY: dist
dist: build
.PHONY: clean
clean:
rm -rf build
rm -rf dist
rm -rf log
rm -rf *.spec
@find . -name '*.pyc' -delete
@find . -name '__pycache__' -type d | xargs rm -fr
@find . -name '.pytest_cache' -type d | xargs rm -fr
.PHONY: venv
venv:
$(PYTHON) -m venv venv
source ./venv/bin/activate
.PHONY: test
test:
$(PYTHON) -m pytest
.PHONY: lint
lint:
$(PYTHON) -m pylint