Skip to content

DOC: Package a standalone native library with Python bindings - #925

Open
businessdeveloper69 wants to merge 1 commit into
mesonbuild:mainfrom
businessdeveloper69:docs/native-library-bindings-verified
Open

businessdeveloper69 wants to merge 1 commit into
mesonbuild:mainfrom
businessdeveloper69:docs/native-library-bindings-verified

Conversation

@businessdeveloper69

@businessdeveloper69 businessdeveloper69 commented Nov 21, 2026 •

Copy link
Copy Markdown

Fixes #744.

The example builds a standalone C library from the repository root and its Python bindings from a subdirectory. The guide shows how to use a Meson dist script to include the native sources when a distributor builds the wheel from an sdist. This follows the layout discussed in Apache nanoarrow #644.

The regression builds wheels both from the checkout and from an unpacked sdist, and calls the compiled library. Both cases passed with Meson 0.64 and 1.12. The full Linux suite passed 158 tests with 17 skips, and the docs built with warnings treated as errors. I also rebuilt the detached sdist without Git or network access.

On native Windows CI, both cases passed with directory junctions on CPython 3.10 and 3.15 using MinGW.

AI assisted.

Use a local Meson subproject for the standalone C library and a dist
script to include its committed sources. Exercise both the checkout and
sdist build paths by installing the resulting wheels and calling C.

@rgommers rgommers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few initial comments:

  • This needs a separate TST commit for the new test package, it's more than just docs.
  • The docs look reasonable but the instruction to create a symlink is unhelpful. Nanoarrow has the symlink checked in, which makes much more sense.

@businessdeveloper69 do you actually understand all these changes in detail, or are we just seeing whatever your AI model (which one?) spits out?

@dnicolodi

Copy link
Copy Markdown
Member

The docs look reasonable

I am not so sure adding this documentation to the Creating a source distribution section is reasonable. The test is not particularly useful, as it does not test anything meson-python as control upon. If this package structure stops working there is nothing meson-python can do to fix it.

@dnicolodi

Copy link
Copy Markdown
Member

@rgommers The account that opened this PR forked ~50 GitHub repositories and opened ~100 PRs in the space of less than two hours.I would be very surprised if there will be any human follow-up on this.

@rgommers

Copy link
Copy Markdown
Contributor

Yeah I suspected as much. It now says @businessdeveloper69's activity is private. We can close it soon if no follow-up or it looks automated instead of a human.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a test package and docs for the "C/C++ lib with optional Python bindings" use case

3 participants