forked from ev3dev/ev3dev-lang-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
26 lines (21 loc) · 782 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
# Makefile to assist developers while modifying and testing changes before release
# Note: to re-install a release of EV3DEV2, use `sudo apt-get --reinstall install python3-ev3dev2`
OUT := build
MPYCROSS := /usr/bin/mpy-cross
MPYC_FLAGS := -v -v -mcache-lookup-bc
PYS := $(shell find ./ev3dev2 -type f \( -iname "*.py" ! -iname "setup.py" \))
MPYS := $(PYS:./%.py=${OUT}/%.mpy)
vpath %.py .
${OUT}/%.mpy: %.py
@mkdir -p $(dir $@)
${MPYCROSS} ${MPYC_FLAGS} -o $@ $<
install:
python3 setup.py install
micropython-install: ${MPYS}
cp -R $(OUT)/* /usr/lib/micropython/
clean:
find . -name __pycache__ | xargs rm -rf
find . -name *.pyc | xargs rm -rf
format:
yapf --style .yapf.cfg --in-place --exclude tests/fake-sys/ --recursive .
python3 -m flake8 --config=.flake8.cfg .