[libcxx-commits] [PATCH] D70991: [libc++][test] Replace platform.linux_distribution by distro.linux_distribution

Aaron Puchert via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 17 16:07:38 PST 2020


aaronpuchert added a comment.

In D70991#1778631 <https://reviews.llvm.org/D70991#1778631>, @aaronpuchert wrote:

> An alternative to this change would be to assume that distributions recent enough to have Python 3.8 also have `/etc/os-release`, which has become somewhat of a standard. So we could check if that file exists, then use it if it does and fallback to `platform.linux_distribution()` if it doesn't. Then we wouldn't need an additional dependency.


@ldionne, what do you think about this ^^?

I'm not really happy about the additional dependency myself and have actually just removed the code <https://build.opensuse.org/package/view_file/devel:tools:compiler/llvm9/libcxx-tests-linux-distribution.patch> in openSUSE to unblock the Python 3.8 update, because we have no blacklisted tests. That's not upstreamable of course.

But checking for `/etc/os-release` and falling back to `platform.linux_distribution()` seems like it could solve the problem.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70991/new/

https://reviews.llvm.org/D70991





More information about the libcxx-commits mailing list