-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meson build, replacing setuptools #109
base: main
Are you sure you want to change the base?
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. |
acb9ee0
to
8f62fd1
Compare
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 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) - 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). 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).
Rebased to current
|
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 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:
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). 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')