Skip to content

fix(build): allow pure wheels without a compiler - #925

Merged
petercorke merged 3 commits into
petercorke:mainfrom
Afloat16:fix/pure-wheel-no-compiler
Nov 18, 2026
Merged

petercorke merged 3 commits into
petercorke:mainfrom
Afloat16:fix/pure-wheel-no-compiler

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The documented RTB_PURE_WHEEL=1 build still enables C and C++ in project() and resolves Python development headers and nanobind unconditionally. A machine without a compiler therefore cannot build the pure-Python wheel, even though both native extensions are disabled.

Change

Configure the project with no languages initially. Enable C/C++ and locate the extension-only dependencies inside the existing RTB_BUILD_EXTENSIONS branch. Compiled builds keep the same extension configuration.

Validation

  • The original pure-wheel build failed during CMake configuration because no C/C++ compiler was available.
  • RTB_PURE_WHEEL=1 CC=rtb-no-c-compiler CXX=rtb-no-cxx-compiler python -m pip wheel --no-deps .: successfully produced roboticstoolbox_python-1.5.0-py3-none-any.whl.
  • Inspected the archive: Root-Is-Purelib: true, Tag: py3-none-any, and no .so, .pyd or .dll files.
  • PYTHONPATH=src python -m pytest tests/test_fknm_fallback.py -q: 33 passed, 42 skipped. Native-extension comparison cases were skipped because the extensions are unavailable.
  • git diff --check passed.

A native build was not run locally because this environment has no compiler.

Main-branch update

Updated with main at cee0023535988e4ae9490c81d639a46f2311b8fd in merge commit 347780fa9769d74b4ec52bc27dccb65944e4896b. The original PR patch is byte-for-byte unchanged relative to the updated base, and git diff --check passes.

Fresh CI for the updated head records the new build and test results. The local validation figures above describe the original submission.

CI note: mypy reports the same eight errors in blocks/mobile.py and blocks/arm.py as current main. Both files and the type-check configuration are unchanged by this PR. The current workflow runs this check as advisory with continue-on-error: true.

Primary contributor: Afloat16, who has reviewed the original submission.

AI assistance for this follow-up: ChatGPT (GPT-6 Astra Pro), used for main-branch synchronization and verification.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@Afloat16
Afloat16 marked this pull request as ready for review November 3, 2026 13:56
Refresh the branch with main cee0023. The existing PR patch and all changed file blobs remain unchanged.

Co-Authored-By: ChatGPT (GPT-6 Astra Pro)
@Afloat16

Copy link
Copy Markdown
Contributor Author

Updated the branch with current main (cee0023535) in 347780fa, preserving the original fix byte-for-byte. On the new head, all 15 OS/Python test combinations, test-core, the required All tests passed aggregate, and coverage passed.

The remaining docs-build failure occurs after successful Sphinx and pure-wheel builds. The real-Pyodide step logs jsDelivr request failures for prompt_toolkit and sqlite3, then ends with 0 different frames pushed for 8 steps. The same check passes on current main; the Pyodide check/bootstrap, docs workflow and PyPlot source are unchanged here. A download problem is a possibility, but the cause has not been reproduced or confirmed.

Could a maintainer rerun that docs job? I do not have access to rerun the upstream job. The separate advisory mypy result matches the same eight errors on current main, with the baseline linked in the description. Once the docs result is clarified, could you review this focused pure-wheel fix for merge?

@petercorke
petercorke merged commit f307d7b into petercorke:main Nov 18, 2026
24 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 18, 2026
@petercorke

Copy link
Copy Markdown
Owner

Thank you, merged. I built on main and on your branch with no C or C++ compiler available: main stops in CMake, and yours gives a py3-none-any wheel with no extensions, while a normal build still makes both _fknm_c and _frne_c. The pure wheel is what the JupyterLite and release builds use, so this closes a real gap. One question for the record: did an AI assistant help with this change? A sentence is enough.

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.

2 participants