Skip to content

[fork CI check] Only require jax to build where jaxlib has a wheel - #1

Closed
jdeast wants to merge 1 commit into
mainfrom
build-jax-optional-on-platforms-without-jaxlib
Closed

[fork CI check] Only require jax to build where jaxlib has a wheel#1
jdeast wants to merge 1 commit into
mainfrom
build-jax-optional-on-platforms-without-jaxlib

Conversation

@jdeast

@jdeast jdeast commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Fork-internal PR to exercise CI before opening upstream. Do not merge.

The JAX extension is already optional in CMakeLists: it probes for
jax.ffi.include_dir() and, when that fails, prints 'Skipping JAX extension'
and builds everything else. But pip resolves [build-system] requires in an
isolated environment before CMake runs, so that graceful path is
unreachable and the pinned jax==0.8.0 makes the extension mandatory in
practice.

Where jaxlib publishes no wheel this makes the sdist unbuildable. macOS
x86_64 is the case that bites: jaxlib's last wheel there is 0.4.38 and
jaxlib ships no sdist, so the build fails while installing build
dependencies, before any C++ is compiled.

Adding an environment marker keeps jax present everywhere wheels are built
(the cibuildwheel matrix is linux x86_64, macOS arm64 and win_amd64, all of
which have jaxlib wheels), so released wheels are unaffected and still
contain the extension. Simply dropping jax from requires would instead have
let CMake silently skip the extension during release builds, which is why
this uses a marker rather than a removal.
@jdeast jdeast closed this Aug 14, 2026
@jdeast jdeast reopened this Aug 14, 2026
@jdeast

jdeast commented Aug 14, 2026

Copy link
Copy Markdown
Owner Author

Superseded by exoplanet-dev#193 (this branch, opened upstream). Fork CI history retained here.

@jdeast jdeast closed this Aug 14, 2026
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