Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/linux-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,29 @@ jobs:
ref: v1.29.0
path: integration/micropython

- name: Check out CircuitPython 11.0.0-alpha.1
- name: Check out CircuitPython 11.0.0-alpha.2
if: matrix.runtime == 'circuitpython'
uses: actions/checkout@v7
with:
repository: adafruit/circuitpython
ref: 11.0.0-alpha.1
ref: 11.0.0-alpha.2
path: integration/circuitpython

# CircuitPython addresses a qstr pool with 2-byte offsets, so a pool
# holds 64 KB of names, and LVGL 9.6's push the coverage build's past
# it. micropython-pydevices builds CircuitPython with two patches that
# make the offset size a setting, for the firmware's pools and for
# mpy-tool's frozen ones; ports/circuitpython asks for 4.
- name: Patch CircuitPython for 4-byte qstr offsets
if: matrix.runtime == 'circuitpython'
working-directory: integration/circuitpython
run: |
base=https://raw.githubusercontent.com/PyDevices/micropython-pydevices/9a241aaadd035b912605b5e0d218ee55068abeb1/patches/circuitpython
for p in 0001-qstr-offsets-of-four-bytes-when-a-build-asks.patch \
0010-mpy-tool-freezes-qstr-offsets-of-the-width-the-build-asks.patch; do
curl -fsSL "$base/$p" | git apply
done

- name: Install native build dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -96,6 +111,7 @@ jobs:
run: |
make -C circuitpython/mpy-cross -j"$(nproc)"
make -C circuitpython/ports/unix -j"$(nproc)" VARIANT=coverage \
CFLAGS_EXTRA=-DMICROPY_QSTR_OFFSET_BYTES=4 \
USER_C_MODULES="$GITHUB_WORKSPACE/integration/omnipython-lvgl/ports/circuitpython" \
FROZEN_MANIFEST="$GITHUB_WORKSPACE/integration/omnipython-lvgl/ports/circuitpython/manifest.py"

Expand Down
1 change: 1 addition & 0 deletions binding/api_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
_MODULE_ENUM_NAME_OVERRIDES = {
"animimg_part_t": "ANIM_IMAGE_PART",
"cache_reserve_cond_res_t": "CACHE_RESERVE_COND",
"lru_res_t": "LRU",
"indev_gesture_type_t": "INDEV_GESTURE",
"event_code_t": "EVENT",
"align_t": "ALIGN",
Expand Down
9 changes: 9 additions & 0 deletions binding/api_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ def function(self, name: str) -> PolicyDecision:
return PolicyDecision("private", reason=unsupported.reason)
if not name.startswith(self.module_prefix + "_"):
return PolicyDecision("private", reason="outside module prefix")
if name.endswith("_internal") and name != "lv_font_get_glyph_dsc_internal":
# Inline helpers from LVGL's private headers (LVGL 9.6 has 164,
# mostly lv_obj_get_style_*_internal), each behind a public
# function of the same name without the suffix, so binding them
# only costs flash. lv_font_get_glyph_dsc_internal stays: Python
# can't reach the public lv_font_get_glyph_dsc, whose name the
# font's own get_glyph_dsc callback field shadows, and only this
# one follows the font's fallbacks.
return PolicyDecision("private", reason="LVGL-internal helper")
return PolicyDecision(
"public",
available_on=self._available_on(name),
Expand Down
8 changes: 8 additions & 0 deletions binding/emit_c_cpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ def emit_c(ctx):
*/

{lv_headers}

/*
* The binding keeps every function LVGL marks deprecated callable until LVGL
* removes it, so a call to one here is not a warning (LVGL 9.6 and later).
*/
#ifdef LV_DEPRECATIONS_IGNORE_BEGIN
LV_DEPRECATIONS_IGNORE_BEGIN
#endif
""".format(
module_name=module_name,
target_banner=_target_banner,
Expand Down
8 changes: 8 additions & 0 deletions binding/emit_c_micropython_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ def emit_c(ctx):
*/

{lv_headers}

/*
* The binding keeps every function LVGL marks deprecated callable until LVGL
* removes it, so a call to one here is not a warning (LVGL 9.6 and later).
*/
#ifdef LV_DEPRECATIONS_IGNORE_BEGIN
LV_DEPRECATIONS_IGNORE_BEGIN
#endif
""".format(
module_name=module_name,
target_banner=_target_banner,
Expand Down
1 change: 1 addition & 0 deletions binding/emit_pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def read_lvgl_version_major_minor(repo_root: Optional[Path] = None) -> str:

repo_root = (repo_root or Path(__file__).resolve().parent.parent).resolve()
for version_file in (
repo_root / "lvgl" / "include" / "lvgl" / "lv_version.h",
repo_root / "lvgl" / "lv_version.h",
repo_root / "lvgl" / "lvgl.h",
):
Expand Down
Loading
Loading