-
Notifications
You must be signed in to change notification settings - Fork 49
/
Makefile
53 lines (39 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
DOCKER_ID_USER=eltonlaw
.PHONY: all build test upload install docs
all: test-local
install-local:
cd $(IMPYUTE_ROOT) && python setup.py develop
uninstall-local:
cd $(IMPYUTE_ROOT) && python setup.py develop --uninstall
test-local:
cd $(IMPYUTE_ROOT) && pytest
clean:
find . -type f -name '*.pyc' -delete
rebuild-pybase:
docker rmi -f $(DOCKER_ID_USER)/pybase
docker build -f Dockerfile.pybase -t $(DOCKER_ID_USER)/pybase .
pull-pybase:
docker pull $(DOCKER_ID_USER)/pybase
build:
if [[ "$(docker images -q eltonlaw/pybase 2> /dev/null)" != "" ]]; then \
$(MAKE) pull-pybase; \
fi
docker build -t impyute .
test: build
docker run impyute python2.7 -m pytest
docker run impyute python3.5 -m pytest
docker run impyute python3.6 -m pytest
docker run impyute python3.7 -m pytest
# Need to pip install `wheel` and `twine`
upload: build test docs
python3 setup.py bdist_wheel --universal
python3 setup.py sdist
twine upload dist/*
install:
python3 setup.py install
docs:
cd docs && $(MAKE) html
# Remember to call `docker login` first
push-pybase:
docker build -t $(DOCKER_ID_USER)/pybase -f Dockerfile.pybase .
docker push $(DOCKER_ID_USER)/pybase