-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 754 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 754 Bytes
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
#
# Simple Makefile to build and install the wheel
# Ralph Schmieder, rschmied@cisco.com 2018
#
PYTHON := python3
WHEEL := dist/.built
.PHONY: all clean wheel
all: $(WHEEL)
check-env:
ifndef VIRTUAL_ENV
$(error venv undefined)
endif
SOURCES := ${shell find virltester -name '*.py'}
$(WHEEL): $(SOURCES) | check-env
@echo "### building wheel"
$(PYTHON) setup.py bdist_wheel --universal && touch $(WHEEL)
wheel: $(WHEEL)
clean:
@echo "### cleaning up"
find . -name '*.egg-info' -maxdepth 1 -exec rm -rf {} \;
find . -name 'build' -maxdepth 1 -exec rm -rf {} \;
rm -f dist/*.whl $(WHEEL)
install: $(WHEEL)
@echo "### installing the latest wheel"
$(eval TMP := ${shell ls -t dist/*.whl | head -1})
$(PYTHON) -mpip install --upgrade $(TMP)