-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (38 loc) · 1.37 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
# Current version
# VERSION ?= 1.0.3
.DEFAULT_GOAL:=help
PATH := $(PATH):$(PWD)/bin
SHELL := env PATH=$(PATH) /bin/bash
OS = $(shell uname -s | tr '[:upper:]' '[:lower:]')
ARCH = $(shell uname -m | sed 's/x86_64/amd64/')
OSOPER = $(shell uname -s | tr '[:upper:]' '[:lower:]' | sed 's/darwin/apple-darwin/' | sed 's/linux/linux-gnu/')
ARCHOPER = $(shell uname -m )
.PHONY: help clean build install uninstall
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
all: build
clean: ## Cleanup the project folders
$(info Make: Cleaning up things)
python setup.py clean
build: clean ## Build the project
$(info Make: Build the project)
python setup.py clean
python setup.py sdist bdist_wheel
builddb: ## Build new db
$(info Make: Build the database)
cd mlw; python build_database.py
install: ## Install in editable mode
$(info Make: Install in editable mode)
pip install -e ./
run: ## Run server application
$(info Make: Run the server)
python mlw/server.py
uninstall: ## Uninstall package
$(info Make: Uninstall package.)
pip uninstall mlw
upload: build ## Upload the project to Pypi
$(info Make: Upload the project to Pypi)
twine upload dist/*
test: ## Run unit tests
$(info Make: Run unit tests.)
pytest