Skip to content

pymavlink: add build-pymavlink.yml for riscv64 wheels - #1744

Merged
luhenry merged 7 commits into
mainfrom
pymavlink
Sep 12, 2026
Merged

luhenry merged 7 commits into
mainfrom
pymavlink

Conversation

@luhenry

@luhenry luhenry commented Sep 11, 2026

Copy link
Copy Markdown
Member

Compiles pymavlink.dfindexer.dfindexer_cy, a small Cython/C extension for fast BIN-log offset scanning. Upstream publishes no riscv64 wheel.

Mirrors upstream's python-publish.yml (build-sdist + build-wheels jobs), same sdist -> cibuildwheel bdist split as build-cffi.yml.

Differs from upstream

  • Sdist built once on x86_64, not per-OS/arch - only riscv64 matters here, no need for upstream's full OS/arch matrix.

Testing

  • Runs the real tests/ suite from the sdist against the installed wheel, plus numpy (registry-only for riscv64) and a setuptools<82 pin (pkg_resources, removed in 82) for CIBW_TEST_REQUIRES.
  • Deselects test_mavlogdump.py, test_mavxml.py, and test_wp.py's RallyTest/FenceTest - they read fixture files upstream's own sdist packaging leaves out.
  • Deselects test_wp.py::MAVWPTest::test_save - passes only when it's the first test file to import pymavlink.mavutil, since that module picks its MAVLink dialect once at import time from an env var; reproducible with the real upstream wheel too.

License: OK

Built on cp312; 45 passed, 3 deselected.

CIBW_TEST_SOURCES stages relative to cibuildwheel's invocation cwd (the
workspace root), not package-dir, so 'tests' never matched the sdist
extracted into ./pymavlink. {project}/tests in CIBW_TEST_COMMAND already
resolves against package-dir and needs no staging.
{project} expands to package-dir's parent (the whole copied cwd), not
package-dir itself; {package} is the one that maps to ./pymavlink inside
the container, so {project}/tests looked for a nonexistent workspace-root
tests directory instead of the real one.
test_trim.py and test_wp.py import pkg_resources at module level;
cibuildwheel's test venv is built with --no-setuptools, so it's not
present unless requested explicitly.
setuptools 82.0.0 (2026-02-08) removed pkg_resources entirely (pypa/setuptools#5007);
test_trim.py/test_wp.py still import it at module level, so an unpinned
setuptools resolves to a version that no longer has it.
mavutil.set_dialect() runs once at import time, picking its dialect from
the MAVLINK20 env var. test_wp.py sets that var before importing mavutil,
but earlier test files in the same pytest run (test_fgFDM.py etc.) import
mavutil first with the var unset, caching the wrong dialect for the rest
of the run. Reproducible with the real upstream wheel too - not riscv64
specific, just an ordering fragility in the test suite's module-level
side effects.
--deselect's absolute-path node id (/project/pymavlink/tests/test_wp.py::...)
did not match pytest's own relative node id for the same test (pytest ran
from a different rootdir than {package}), so it silently deselected nothing.
-k with both the class and function name as required substrings reaches the
same test without colliding with test_mavparm.py's unrelated test_saveload.
luhenry added a commit that referenced this pull request Sep 11, 2026
@luhenry
luhenry merged commit e2f5b49 into main Sep 12, 2026
11 checks passed
@luhenry
luhenry deleted the pymavlink branch September 12, 2026 19:28
@luhenry luhenry linked an issue Sep 13, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pymavlink riscv64 support

1 participant