-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathMakefile
37 lines (29 loc) · 912 Bytes
/
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
# global python binary
PYTHON_BIN = $(shell which python3)
# virtual env directories and binaries
VENV_DIR = venv
VENV_PYTHON_BIN = $(VENV_DIR)/bin/python
PIP_BIN = $(VENV_DIR)/bin/pip
BLACK_BIN = $(VENV_DIR)/bin/black
TWINE_BIN = $(VENV_DIR)/bin/twine
.PHONY: lint test build docs deploy
# setup dev environment, eg. `make venv`
$(VENV_DIR): requirements.txt requirements.dev.txt
test -d $(VENV_DIR) || $(PYTHON_BIN) -m venv $(VENV_DIR) && $(PIP_BIN) install -U pip setuptools wheel
$(PIP_BIN) install -r requirements.txt
$(PIP_BIN) install -r requirements.dev.txt
touch $(VENV_DIR)
lint:
$(BLACK_BIN) .
test: ally/tests.py
$(VENV_PYTHON_BIN) ally/tests.py
build:
$(VENV_PYTHON_BIN) setup.py sdist bdist_wheel
docs:
rm -rf docs
mkdir docs
cd sphinx && make clean && make html
cp -a sphinx/_build/html/ docs
touch docs/.nojekyll
deploy:
$(TWINE_BIN) upload dist/*