apache / arrow-nanoarrow

Helpers for Arrow C Data & Arrow C Stream interfaces
https://arrow.apache.org/nanoarrow
Apache License 2.0
149 stars 34 forks source link

chore: Move bundling from CMake to Python #508

Closed paleolimbot closed 2 weeks ago

paleolimbot commented 3 weeks ago

Some of the work with the Meson build system has highlighted that the bundling is currently very inflexible because it's implemented in CMake. This was initially done because it made it easy to use configure_file() in CMake to keep the version information consistent, and because it allowed a straightforward path to testing the bundled files in the same way as the normal build.

This had the unfortunate side effect of requiring CMake to "build" the R or Python packages as is generally confusing, and used the CMake "install" in a confusing way (it installed sources). Instead, we can do this with a Python script (and call that from CMake, R, and Python). The testing of the namespaced builds is still done in CMake, which is essential to ensure that both build types are tested in the same way.

This also closes #485 by prefixing all nanoarrow includes with "nanoarrow/" in the source files. Many of them had to not use this prefix because when the files were bundled they weren't always bundled into a "nanoarrow/" directory. This feature has been moved to the bundling script which can now namespace or un-namespace the nanoarrow includes.