-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (54 loc) · 1.17 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
.ONESHELL:
SHELL = /bin/bash
default: update
VIRTUAL_ENV?=~/venv/hack-assembler
venv:
@python3 -m venv $(VIRTUAL_ENV)
.PHONY: init
init: venv ## Initialize environment
@source $(VIRTUAL_ENV)/bin/activate
@pip -q install flake8 twine pytest-mock
.PHONY: clean
clean: venv
@source $(VIRTUAL_ENV)/bin/activate
@python setup.py clean
@rm -rf dist
@rm -rf .tox
@rm -rf build
@rm -rf .pytest_cache
@find . -name "*.pyc" -delete
@rm -rf *.egg-info
@rm -rf .eggs
@pip uninstall hack-assembler -y
.PHONY: check
check: venv
@source $(VIRTUAL_ENV)/bin/activate
@flake8 --ignore=W605,E501 assembler
.PHONY: tests
tests: venv
@source $(VIRTUAL_ENV)/bin/activate
$(MAKE) clean
$(MAKE) install
@pytest
.PHONY: install
install: venv
@source $(VIRTUAL_ENV)/bin/activate
@python setup.py install
.PHONY: update
update: venv
@source $(VIRTUAL_ENV)/bin/activate
$(MAKE) clean
$(MAKE) check
$(MAKE) install
@clear
.PHONY: sdist
sdist: venv
@source $(VIRTUAL_ENV)/bin/activate
$(MAKE) clean
@python setup.py sdist
.PHONY: upload
upload: venv
@source $(VIRTUAL_ENV)/bin/activate
$(MAKE) clean
$(MAKE) sdist
@twine upload --username __token__ --password $(TWINE_PASSWORD) dist/*