Meson build, replacing setuptools#109
Conversation
f663297 to
f38145f
Compare
|
Rebased and squashed. Regarding the remaining issue (cannot produce correct sdist that doesn't include the massive mmCoreAndDevices), there are 3 possible solutions I can think of:
Given that this Meson-based build does not add any user-facing benefits, I'm inclined to take the first approach and keep this draft PR open and maintained until we're ready. It has already served to iron out at least some of the issues we'll likely encounter when moving MMCoreJ to Meson. |
8f62fd1 to
998863f
Compare
|
Rebased to current
|
|
Rebased, and added commit to eliminate the mmCoreAndDevices submodule and instead use the mmcore mirror repo (micro-manager/mmCoreAndDevices#687) via Meson wrap.
|
77cd1e7 to
a586983
Compare
|
Removed the commit to temporarily build wheels on PR; see this build for wheels. |
Add Meson build file. Use meson-python so that `python -m build` just works via pyproject.toml. Move the single source of truth for the version number from _version.py (now generated) to meson.build. The Meson build has several advantages: - Build details of MMDevice and MMCore come from their own build files, rather than being duplicated here in setup.py - Editable installs truly work (even if C++ files are edited) (Caveat: beware of importing pymmcore from the source root) (Another caveat: with uv, caching may cause tricky issues) - Since we are using a true C++ build system, controlling build options is much easier and cleaner than it was with setuptools The main disadvantage is that MANIFEST.in can no longer be used to control what gets included in the sdist (meson-python uses `meson dist` to produce the sdist, which includes all version-controlled files). The sdist (source distribution for PyPI) now contains the whole of mmCoreAndDevices and more (33 MiB). While technically functional, we should fix this before merging this change.
This fixes the sdist; it now contains just the needed files. Note that an mmdevice.wrap is explicitly included, in order to override the one provided by mmcore, so that we pin the version.
|
Last force-push touches only maintainer-notes.md. |
Limitation: The sdist (source distribution for PyPI) now contains the whole of mmCoreAndDevices and more (33 MiB). While technically functional, we should fix this before merging this change.Update mmCoreAndDevices to latest (which has meson.build for MMCore and MMDevice).
Add Meson build file.
Use meson-python so that
python -m buildjust works via pyproject.toml.Move the single source of truth for the version number from _version.py (now generated) to meson.build.
The Meson build has several advantages:
The main disadvantage is that MANIFEST.in can no longer be used to control what gets included in the sdist (meson-python usesmeson distto produce the sdist, which includes all version-controlled files). However, once we are ready to use MMDevice and MMCore from independent repositories, this will no longer be an issue (and ends up being simpler than the error-prone MANIFEST.in).dependency('threads')dependency('threads')