I guess probably the main problem with using meson to build python is
the bootstrap problem. You'd need a python interpreter in order to run
meson and build another python.
https://mesonbuild.com/FAQ.html#but-i-really-want-a-version-of-meson-that-doesnt-use-python
There is a still WIP but getting to be quite featureful port of meson to
C99, which Python itself specifies as a minimum baseline in PEP 7
("Python versions greater than or equal to 3.6 use C89 with several
select C99 features").
It is currently unix-only, but Windows support has been considered. It
is currently not on the roadmap simply because it was primarily
developed on unix and that is where the main development effort is
taking place, but, it has been laid out in a manner that would allow for
future implementation of a VS backend. I'm sure patches would be
welcome, if that was something the CPython core team was interested in.
(Assuming they are interested in switching at all right now.)
> The first version of main.c went fine. Then I tried the GTK-embellished
> version. That didn't work so well. Here's my meson.build file:
>
> project('tutorial', 'c')
> gtkdep = dependency('gtk+-3.0')
> executable('demo', 'main.c', dependencies : gtkdep)
>
> My first run of meson compile failed (the gtk+-3.0 dependency wasn't
> satisfied), in part complaining about not finding cmake. So I installed it
> and tried again. This time it found cmake but still failed on gtk+-3.0:
Ah yes. meson has the concept of multiple *resolvers* for a dependency.
The primary resolver is pkg-config, the secondary, less-supported,
resolver is cmake.
It would be more accurate to say that it looks for a:
- gtk+-3.0.pc
- gtk+-3.0-config.cmake
and it *uses* /usr/bin/pkg-config or /usr/bin/cmake to do so, if it can.
The current tutorial states as follows:
"""
It assumes that you have GTK development libraries available on the
system. On Debian-derived systems such as Ubuntu they can be installed
with the following command:
sudo apt install libgtk-3-dev
It is possible to build the GUI application on other platforms, such as
Windows and macOS, but you need to install the needed dependencies.
"""
Personally, I thought that was a sufficient explanation, so I never
thought to try changing it.
However, I could be biased as I already possessed quite some expertise
on the subject...
Suggestions about the wording are warmly encouraged.
--
Eli Schwartz