forked from SamWhited/HttpUploadComponent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (35 loc) · 821 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
38
39
40
41
42
43
44
45
46
47
REBUILD_FLAG =
VENV=env
BIN=$(VENV)/bin
ACTIVATE=source $(BIN)/activate
.PHONY: all
all: test build
$(VENV): $(VENV)/bin/activate
$(VENV)/bin/activate: requirements.txt
test -d $(VENV) || pyvenv $(VENV)
$(ACTIVATE); pip install -r requirements.txt
touch $(BIN)/activate
.PHONY: test
test: $(VENV)
$(ACTIVATE); tox $(REBUILD_FLAG)
dist/*.whl: setup.py httpupload/*.py
python setup.py bdist_wheel
dist/*.tar.gz: setup.py httpupload/*.py
python setup.py sdist bdist
.PHONY: wheel
wheel: dist/*.whl
.PHONY: dist
dist: dist/*.tar.gz
.PHONY: build
build: wheel dist
.PHONY: upload
upload: clean
python setup.py sdist bdist bdist_wheel upload
.PHONY: clean
clean:
find . -iname '*.pyc' | xargs rm -f
find . -iname '__pycache__' -type d | xargs rm -rf
rm -rf .tox
rm -rf build
rm -rf dist
rm -rf $(VENV)