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: define version #135
Conversation
Otherwise, the installed .pc file contains "Version: undefined". Signed-off-by: Sam James <sam@gentoo.org>
Thanks for the submission. Care to comment @stephanlachnit and @Tachi107? |
This seems correct. From the Meson documentation on pkgconfig.generate (and similar wording for declare_dependency):
When building inih from git master:
When building it with this PR:
Defining the version means that it is possible to trivially require a specific version range as a dependency using pkg-config or a Meson subproject. |
This seems appropriate, thanks :) |
See #123. |
Yeah it needs an update on every release but it seems that they don't occur that often, so it shouldn't be a huge maintenance burden. Of course @benhoyt is the one who should ultimately decide whether or not he wants to update it on every release |
Perhaps a release script would help? Also, recent versions of Meson can read the version from a And also in the long term I someday plan to add support for setuptools_scm like automatic git-based versioning. |
@thesamesam Do the versions of Meson that matter support this |
https://mesonbuild.com/Reference-manual_functions.html#project You would need to set the It was released on Feb 14, 2021. Debian stable has 0.56 but stable backports has 0.61.2 and you can pip install it either way on any distro that isn't stuck with python 3.5 that is practically ancient on top of being end of life. |
Thanks @eli-schwartz. Hmmm, seems maybe a bit premature to me in that case, given key distros don't even have that version. I believe |
I've bumped up to 55 in a subsequent commit and release r55: https://github.com/benhoyt/inih/releases/tag/r55 |
Yeah, many projects do consider supporting at least the version of Meson in the latest stable/LTS of popular distros to be a reasonable concern, hence why I mentioned this doesn't fulfill that criteria. There are also big projects with people working to port to Meson, who consider 0.54 to be the cutoff because they need to support versions of Red Hat which are still considered supported, but which only have python 3.5. That's a bit extreme IMO as far as support matrixes go, but then, postgres does have some major corporate commitments to make, so it is what it is. Hence I mention that python bound too. It's not so bad to have it in meson.build itself, anyway. And you can still script it to bump the version, by running meson itself. https://mesonbuild.com/Rewriter.html#setting-the-project-version (This is a bit more reliable than sed.) |
Thanks all! I think we can revisit it if desirable in a few.. uh, years 😄. Appreciate @eli-schwartz's input too as The Meson Guru. |
Otherwise, the installed .pc file contains "Version: undefined".
Signed-off-by: Sam James sam@gentoo.org