-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (41 loc) · 1.01 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
PIP :=pip
PYTHON :=python
NAME :=driving_gridworld
LIB_NAME :=driving_gridworld
.PHONY: default
default: install
.PHONY: test
test: setup.py
$(PYTHON) setup.py -q test --addopts '-x $(ARGS)'
.PHONY: test-cov
test-cov: ARGS=--cov $(LIB_NAME) --cov-report term:skip-covered
test-cov: test
.PHONY: testv
testv: ARGS=-vs
testv: test
.PHONY: install
install: requirements.txt
$(PIP) install -r requirements.txt $(ARGS)
.PHONY: install-dev
install-dev: requirements.txt
$(PIP) install -r requirements.txt -e . $(ARGS)
.PHONY: clean
clean:
-find . -name "*.pyc" -delete
-find . -name "__pycache__" -delete
-find $(LIB_NAME) -name "*.so" -delete
-rm -rf .cache *.egg .eggs *.egg-info build 2> /dev/null
.PHONY: clean-tmp
clean-tmp:
-rm -rf tmp
.PHONY: build
build: .build
.build: setup.py $(LIB_NAME)/__init__.py
$(PYTHON) setup.py sdist bdist_wheel
touch $@
.PHONY: release
release: .build
twine upload dist/*
.PHONY: release-test
release-test: .build
twine upload --repository-url https://test.pypi.org/legacy/ dist/*