To synchronize the release version of the Makefile and Meson build
systems, pull the version info from a shared file.
When building the Meson shared library, we strip off the optional '-rc1'
suffix as Meson requires library versions use only X.Y.Z versioning.
This increases the minimum Meson version from 0.56.0 to 0.57.0. Notably 0.56.0 is the version Debian buster-backports and Debian bullseye still use.
https://repology.org/project/meson/versions
When building pylibfdt from the released tarballs[1] setup.py will fail
with the following.
LookupError: setuptools-scm was unable to detect version for dtc.
Make sure you're either building from a fully intact git repository or
PyPI tarballs. Most other sources (such as GitHub's tarballs, a git
checkout without the .git folder) don't contain the necessary metadata
and will not work.
seutptools_scm supports a 'fallback_version' that will use the provided
string as the version when the git repo is not available.
The SETUPTOOLS_SCM_PRETEND_VERSION was needed as ./setup.py would fail
without it. As setuptools_scm will fail if there is not git repo, and
the github workflow container does not include the source code git repo.
A previous commit added "fallback_version" to setuptools_scm which
instructs it to use the version from VERSION.txt when the git repo is
missing. So this hack is no longer needed.
This increases the minimum Meson version from 0.56.0 to 0.57.0. Notably 0.56.0 is the version Debian buster-backports and Debian bullseye still use. https://repology.org/project/meson/versions
Implements suggestion from https://github.com/dgibson/dtc/pull/95#issuecomment-1546933095