Skip to content

Commit e859d0e

Browse files
authored
Add new debian binary package for MicroPython (ev3dev#577)
* Add new debian binary package for MicroPython * depend on micropython-lib * update changelog
1 parent 89f36c5 commit e859d0e

3 files changed

Lines changed: 64 additions & 3 deletions

File tree

‎debian/changelog‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
python-ev3dev2 (2.0.0~beta3) stable; urgency=medium
1+
python-ev3dev2 (2.0.0~beta3) UNRELEASED; urgency=medium
22

33
[Daniel Walton]
44
* brickpi(3) support use of the Motor class
@@ -16,6 +16,9 @@ python-ev3dev2 (2.0.0~beta3) stable; urgency=medium
1616
* MoveJoyStick should use SpeedPercent
1717
* renamed GyroSensor rate_and_angle to angle_and_rate
1818

19+
[Kaelin Laundry]
20+
* Added new binary package for Micropython
21+
1922
[Viktor Garske]
2023
* Fixed error when using Motor.is_stalled
2124

‎debian/control‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Maintainer: ev3dev Python team <python-team@ev3dev.org>
33
Section: python
44
Priority: optional
55
Standards-Version: 3.9.8
6-
Build-Depends: python3-setuptools (>= 0.6b3), python3-all (>= 3.4), debhelper (>= 9), dh-python, python3-pillow
6+
Build-Depends: python3-setuptools (>= 0.6b3), python3-all (>= 3.4), debhelper (>= 9), dh-python, python3-pillow, mpy-cross
77
VCS-Git: https://github.com/ev3dev/ev3dev-lang-python.git
88
VCS-Browser: https://github.com/ev3dev/ev3dev-lang-python
99

@@ -15,3 +15,12 @@ Description: Python language bindings for ev3dev
1515
devices on hardware that is supported by ev3dev.org - a
1616
minimal Debian distribution optimized for the LEGO
1717
MINDSTORMS EV3.
18+
19+
Package: micropython-ev3dev2
20+
Architecture: all
21+
Depends: ${misc:Depends}, micropython, micropython-lib
22+
Description: Python language bindings for ev3dev for MicroPython
23+
This package is a pure Python binding to the peripheral
24+
devices on hardware that is supported by ev3dev.org - a
25+
minimal Debian distribution optimized for the LEGO
26+
MINDSTORMS EV3. This package is designed to run on MicroPython.

‎debian/rules‎

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,61 @@
11
#!/usr/bin/make -f
2+
#export DH_VERBOSE=1
23

3-
export PYBUILD_NAME=python3-ev3dev
4+
export PYBUILD_NAME=ev3dev2
45

56
VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1,p' | sed 's,~,,')
67

8+
mpy_files = \
9+
ev3dev2/__init__.mpy \
10+
ev3dev2/_platform/__init__.mpy \
11+
ev3dev2/_platform/brickpi.mpy \
12+
ev3dev2/_platform/brickpi3.mpy \
13+
ev3dev2/_platform/ev3.mpy \
14+
ev3dev2/_platform/evb.mpy \
15+
ev3dev2/_platform/fake.mpy \
16+
ev3dev2/_platform/pistorms.mpy \
17+
ev3dev2/auto.mpy \
18+
ev3dev2/button.mpy \
19+
ev3dev2/control/__init__.mpy \
20+
ev3dev2/control/GyroBalancer.mpy \
21+
ev3dev2/control/rc_tank.mpy \
22+
ev3dev2/control/webserver.mpy \
23+
ev3dev2/display.mpy \
24+
ev3dev2/fonts/__init__.mpy \
25+
ev3dev2/led.mpy \
26+
ev3dev2/motor.mpy \
27+
ev3dev2/port.mpy \
28+
ev3dev2/power.mpy \
29+
ev3dev2/sensor/__init__.mpy \
30+
ev3dev2/sensor/lego.mpy \
31+
ev3dev2/sound.mpy \
32+
ev3dev2/unit.mpy \
33+
ev3dev2/version.mpy \
34+
ev3dev2/wheel.mpy
35+
736
%:
837
dh $@ --with python3 --buildsystem=pybuild
938

39+
%.mpy: %.py
40+
mpy-cross -v -v -mcache-lookup-bc $<
41+
42+
# compile .py > .mpy
43+
override_dh_auto_build: $(mpy_files)
44+
# build python3 package
45+
dh_auto_build
46+
47+
# fail build if any files aren't installed into a package
48+
override_dh_install:
49+
dh_install --fail-missing
50+
51+
override_dh_auto_install:
52+
# install python3 package
53+
dh_auto_install
54+
# install .mpy files for micropython
55+
for d in $(mpy_files); do \
56+
install -D --mode=644 $$d debian/micropython-ev3dev2/usr/lib/micropython/ev3dev2/$${d#*/}; \
57+
done
58+
1059
override_dh_auto_configure:
1160
echo $(VERSION) > RELEASE-VERSION
1261
dh_auto_configure

0 commit comments

Comments
 (0)