-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
61 lines (49 loc) · 1.15 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
.PHONY: virtual_env_set
virtual_env_set:
ifndef VIRTUAL_ENV
$(error VIRTUAL_ENV not set)
endif
### DEPENDENCIES ###
.PHONY: install
install: requirements/local.hash virtual_env_set
pip install -r requirements/local.hash
pip install -e . --no-deps
.PHONY: sync
sync: requirements/local.hash virtual_env_set
pip-sync requirements/local.hash
pip install -e . --no-deps
.PHONY: %-docker
%-docker: ## Could be lock-docker or upgrade-docker
docker run --rm -it -v $(PWD):/pcm $$(docker build -q .) /usr/bin/make $*-ubuntu
.PHONY: %-ubuntu
%-ubuntu: .venv38
.venv38/bin/python3 -m pip install tox
.venv38/bin/python3 -m tox -e $*
.venv38:
python3.8 -m venv .venv38
.PHONY: lock
lock: virtual_env_set
tox -e lock
.PHONY: upgrade
upgrade: virtual_env_set
tox -e upgrade
### CI ###
.PHONY: test
test:
tox
.PHONY: clean
clean:
rm -rf build dist pip-compile-multi.egg-info docs/_build
rm -rf .venv38
find . -name "*.pyc" -delete
find * -type d -name '__pycache__' | xargs rm -rf
.PHONY: build
build: clean
python setup.py sdist bdist_wheel
.PHONY: release
release: build
twine upload dist/*
### MISC ###
.PHONY: docs
docs: virtual_env_set
make -C docs html