-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (34 loc) · 1.14 KB
/
Makefile
File metadata and controls
42 lines (34 loc) · 1.14 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
.PHONY: help venv test lint release release-test
VENV_NAME = venv
VENV_PYTHON = $(VENV_NAME)/bin/python
VENV_STAMP = $(VENV_NAME)/.venv-stamp
help:
@echo "make venv"
@echo " create local virtualenv"
@echo "make test"
@echo " run tests"
@echo "make lint"
@echo " run pylint and mypy"
venv: $(VENV_STAMP)
$(VENV_STAMP): requirements.txt
python3 -m venv $(VENV_NAME)
$(VENV_PYTHON) -m pip install -U pip
$(VENV_PYTHON) -m pip install -r requirements.txt
touch $(VENV_STAMP)
test: venv
$(VENV_PYTHON) -m pytest -v
lint: venv
$(VENV_PYTHON) -m pylint thunderstormAPI thunderstorm_cli.py
$(VENV_PYTHON) -m mypy thunderstormAPI thunderstorm_cli.py
release: venv
rm -rf ./dist/*
$(VENV_PYTHON) -m pip install --upgrade setuptools wheel twine
$(VENV_PYTHON) setup.py sdist bdist_wheel
$(VENV_PYTHON) -m twine check dist/*
$(VENV_PYTHON) -m twine upload dist/*
release-test: venv
rm -rf ./dist/*
$(VENV_PYTHON) -m pip install --upgrade setuptools wheel twine
$(VENV_PYTHON) setup.py sdist bdist_wheel
$(VENV_PYTHON) -m twine check dist/*
$(VENV_PYTHON) -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*