[Libosinfo] [osinfo-db-tools PATCH 2/8] Add support to meson build system
Daniel P. Berrangé
berrange at redhat.com
Thu Jun 20 17:38:57 UTC 2019
On Thu, Jun 20, 2019 at 07:18:58PM +0200, Fabiano Fidêncio wrote:
> On Thu, Jun 20, 2019 at 7:01 PM Daniel P. Berrangé <berrange at redhat.com> wrote:
> >
> > On Thu, Jun 20, 2019 at 05:21:21PM +0200, Fabiano Fidêncio wrote:
> > > diff --git a/meson.build b/meson.build
> > > new file mode 100644
> > > index 0000000..a057dfa
> > > --- /dev/null
> > > +++ b/meson.build
> > > @@ -0,0 +1,40 @@
> > > +project(
> > > + 'osinfo-db-tools', 'c',
> > > + version: '1.6.0',
> > > + license: 'GPLv2+',
> > > + meson_version: '>= 0.49.0'
> >
> > The 'dist.sh' script is the main reason for this min version i see.
> > Were there any others ?
> >
>
> So, I've tested with 0.37.1, which is the version in debian-9 and
> those are the warnings that I've received:
> WARNING: Project specifies a minimum meson_version '>= 0.37.1' but
> uses features which were added in newer versions:
> * 0.40.0: {'build_by_default arg in custom_target'}
> - This one is to build the man pages by default, could be dropped;
This looks non-critical - dropping it means man page won't be
built until you run "ninja install"
> * 0.46.0: {'Python Module'}
> - This one is used to detect python (and python3) and then run the
> tests in case it's found.
We could replace this by calling find_program("python3") instead.
Downside is that python.find_installation() looks for some other
name variants too, which is apparently useful on Windows in
particular.
I'm inclined to prefer find_program() though. We could check for
a couple of names ourselves, at cost of slightly larger code.
> * 0.47.0: {'dict'}
> - This one is used in the tests, as I do test = {'test_name',
> 'test_file'} and the iterate over the dict later on.
LOoking at the file I don't think this saves any lines of code.
I'd just get rid of the dict + loop & expand it fully.
>
> * 0.49.0: {'Calling "add_dist_script" with multiple arguments'}
> - This one is the add_dist_script() you mentioned already.
Basically the choice is either
- Use new meson
- Don't include authors or changelog or rpm spec in the dist
- A custom "dist" script and ignore the "ninja dist" target
> So, what's your suggestion? Follow debian-9? Mind that debian-10 is
> supposed to be released "mid-2019" and although I'm not sure which
> version it'll include, debian-testing is using 0.49.0 already.
I think perhaps for libosinfo it isn't so compelling to keep support
for older distros as with libvirt, so using new meson is probably
ok.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the Libosinfo
mailing list