Live data from Hacker News

Moving SciPy to the Meson Build System

labs.quansight.org

11–20 of 34 posts

Re: Moving SciPy to the Meson Build System

#11
post #10

> Really there were only two viable candidates: CMake and Meson. Would be great to hear why those were the only two candidates that they considered (and not e.g. Bazel or Nix).

Yes, perhaps it is true, and it is obvious to build experts, but as a novice in this area (build systems), I would love for some more exposition.

Re: Moving SciPy to the Meson Build System

#13
This is interesting. It will certainly give a boost to Meson, which is in part a better CMake (the compilation model is very similar). It probably makes a lot of sense for SciPy given the alternatives, but from an ecosystem perspective it's not clear whether it is better enough to justify the churn. For example, caching seems like a secondary concern and outsourced to Linux-specific technologies. This is unfortunate given the implications of build time for individual and team (CI) productivity, as well as the environmental considerations of redundant compilation at scale.

I haven't followed Meson closely in about 3 years, but I also got the sense that Windows support sometimes lagged. If that's true, it's going to be a tough sell for the many large C++ projects who adopted CMake almost exclusively due to its support for Windows and Visual Studio.

Re: Moving SciPy to the Meson Build System

#14
post #10

> Really there were only two viable candidates: CMake and Meson. Would be great to hear why those were the only two candidates that they considered (and not e.g. Bazel or Nix).

Yes, perhaps it is true, and it is obvious to build experts, but as a novice in this area (build systems), I would love for some more exposition.

One typical problem for C/C++ build systems is lack of proper Windows and MSVC toolchain support. Most C/C++ build systems originated in the UNIX world, and either only support GCC-compatible toolchains or if they support MSVC then only as an afterthought. Trying to get this stuff running in a Windows environment is often a mix of frustation and plain hilarity. CMake is one of the few build tools that gets Windows and MSVC support right.

Re: Moving SciPy to the Meson Build System

#15
post #3

I'm using Meson for a project using C++ with Gtkmm, Libmicrohttpd, catch2 and other libraries. My experience is good neglecting some minor issues. Meson is fast, well readable if written well, uses system libraries by default and allows flexible usage. On the other side I'm using Java with Maven and it is - a big burden. It's build in dependency retrieval system also isn't helping. Maybe I just don't like XML - becau…

Any particular reason you use Maven instead of Gradle?

Re: Moving SciPy to the Meson Build System

#16
post #10

> Really there were only two viable candidates: CMake and Meson. Would be great to hear why those were the only two candidates that they considered (and not e.g. Bazel or Nix).

Haven't read the article but meson will run on a lot more systems than bazel.

Re: Moving SciPy to the Meson Build System

#17
post #10

> Really there were only two viable candidates: CMake and Meson. Would be great to hear why those were the only two candidates that they considered (and not e.g. Bazel or Nix).

Nix is likely a nonstarter because as far as I can tell it does not natively support Visual Studio and MSVC.

I suspect Bazel was ruled out because it requires the JVM and it has limited open source uptake relative to CMake (huge open source userbase), and Meson (limited presence in open source scientific software, but adopted by GNOME and systemd).

Re: Moving SciPy to the Meson Build System

#18
post #10

> Really there were only two viable candidates: CMake and Meson. Would be great to hear why those were the only two candidates that they considered (and not e.g. Bazel or Nix).

Nix is likely a nonstarter because as far as I can tell it does not natively support Visual Studio and MSVC. I suspect Bazel was ruled out because it requires the JVM and it has limited open source uptake relative to CMake (huge open source userbase), and Meson (limited presence in open source scientific software, but adopted by GNOME and systemd).

I can't speak for scipy, but I ruled Bazel out for a project that included Python components a few years ago. It was great for C, C++, and Java projects, but, at least at the time, there was no official Python support. I looked into third-party options and the feasibility of building it myself. Most of what I found was a few different conference talks and blog posts where the presenter was enthusiastically talking about how they'd spent a year trying to get it to work and it's not quite there yet but they're feeling really really confident that they'll turn a corner sometime soon. But I could never find any subsequent evidence that the presenter's team actually had turned that corner.

Based on that, I just sort of assumed that, in addition to all the fairly well-documented up-front challenges that these folks had identified and were talking about, there must also be some impassable barrier lurking around in there that nobody finds until they've already sunk a lot of time and money into trying to get it working. I don't know what that is, and I'm not curious enough to spend the better part of a year trying to find it for myself. I ended up choosing Gradle.

Re: Moving SciPy to the Meson Build System

#19

Earlier quoted context omitted.

Nix is likely a nonstarter because as far as I can tell it does not natively support Visual Studio and MSVC. I suspect Bazel was ruled out because it requires the JVM and it has limited open source uptake relative to CMake (huge open source userbase), and Meson (limited presence in open source scientific software, but adopted by GNOME and systemd).

I can't speak for scipy, but I ruled Bazel out for a project that included Python components a few years ago. It was great for C, C++, and Java projects, but, at least at the time, there was no official Python support. I looked into third-party options and the feasibility of building it myself. Most of what I found was a few different conference talks and blog posts where the presenter was enthusiastically talking ab…

Our team started moving to Bazel two years ago with 0.21 or something. Python support is much, much better these days. We’re building Python with requirements and packing it into Docker containers.

It went from “maybe run stdlib Python in an activated venv“ to actually working.

Re: Moving SciPy to the Meson Build System

#20
post #10

> Really there were only two viable candidates: CMake and Meson. Would be great to hear why those were the only two candidates that they considered (and not e.g. Bazel or Nix).

SciPy is a multi platform library that is distributed, most famously on pypi but in many other ways (conda, spack, rpm, deb, etc…). How can nix handle that without requiring the user to install nix?
Post reply on HN