forked from vyperlang/vyper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
82 lines (67 loc) · 1.81 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
SHELL := /bin/bash
ifeq (, $(shell which pip3))
pip := $(shell which pip3)
else
pip := $(shell which pip)
endif
.PHONY: test dev-deps lint clean clean-pyc clean-build clean-test docs
init:
python setup.py install
dev-init:
${pip} install .[dev]
test:
pytest
mypy:
tox -e mypy
lint:
tox -e lint
docs:
rm -f docs/vyper.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ -d 2 vyper/
$(MAKE) -C docs clean
$(MAKE) -C docs html
# To display docs, run:
# open docs/_build/html/index.html (macOS)
# start docs/_build/html/index.html (Windows)
# xdg-open docs/_build/html/index.html (Linux)
release: clean
python setup.py sdist bdist_wheel
twine check dist/*
#twine upload dist/*
freeze: clean init
echo Generating binary...
export OS="$$(uname -s | tr A-Z a-z)" && \
export VERSION="$$(PYTHONPATH=. python vyper/cli/vyper_compile.py --version)" && \
pyinstaller --clean --onefile vyper/cli/vyper_compile.py --name "vyper.$${VERSION}.$${OS}" --add-data vyper:vyper
clean: clean-build clean-docs clean-pyc clean-test
clean-build:
@echo Cleaning python build files...
@rm -fr build/
@rm -fr _build/ # docs build dir
@rm -fr dist/
@rm -fr *.egg-info
@rm -f vyper/version.py vyper/vyper_git_version.txt vyper/vyper_git_commithash.txt
@rm -f *.spec
clean-docs:
@echo Cleaning doc build files...
@rm -rf docs/_build/
@rm -f docs/modules.rst
@rm -f docs/vyper.rst
@rm -f docs/vyper.*.rst
clean-pyc:
@echo Cleaning python files...
@find . -name '*.pyc' -exec rm -f {} +
@find . -name '*.pyo' -exec rm -f {} +
@find . -name '*~' -exec rm -f {} +
@find . -name '__pycache__' -exec rmdir {} +
clean-test:
@echo Cleaning test files...
@find . -name 'htmlcov' -exec rm -rf {} +
@rm -fr coverage.xml
@rm -fr .coverage
@rm -fr .eggs/
@rm -fr .hypothesis/
@rm -fr .pytest_cache/
@rm -rf .tox/
@rm -fr .mypy_cache/