Skip to content

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

Open
Afloat16 wants to merge 1 commit into
petercorke:mainfrom
Afloat16:fix/pure-wheel-no-compiler
Open

Afloat16 wants to merge 1 commit 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.

@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

This branch has not been deployed

No deployments
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.

1 participant