It's a common practice to have a shared '-build' image and base the '-master' images on top of it to avoid installing same dependencies across different images.
Finally we can use more recent meson from debian's repositories, so no need to depend on python and install it using pip.