WIP: use Meson instead of setuptools to install and distribute BuildStream
We have talked from time to time about getting rid of setuptools. The discovery of issue #172 (closed) motivated me to actually prototype this to see if we can actually do it.
This branch demonstrates a pretty functional Meson port of our setuptools build system.
Upsides:
- pkg_resources is only imported if your project chooses to find plugins installed with Pip, so we speed up the start time of
bst - the build system will never download or install dependencies for you
- setuptools_scm is used to decide on a version number, as before
- man page generation runs for each build
- configure-time options are supported (no need to pass in options as environment variables any more)
- easy to integrate C code into the project at a later date if we need to
Downsides:
- every .py file is manually listed in the meson.build file, instead of being discovered manually
- every man .1 output file is listed manually as well
- no
--editablemode; you have toninja installevery time you make a change, or manually symlink thebuildstreampackage dir from your source tree into your Python library path
Not yet implemented:
- sphinx documentation generation
- distribution tarballs: the
ninja disttarget breaks because setuptools_scm can't discover the version number when run as part of the dist process as it runs outside the source repo -
BST_ARTIFACTS_ONLYmode
Let me know what you think of this; I can look into fixing the remaining issues if the general approach seems sound.
Edited by Sam Thursfield