[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
Tue Dec 10 16:55:28 PST 2019


aaronpuchert added a comment.

In D70991#1778232 <https://reviews.llvm.org/D70991#1778232>, @ldionne wrote:

> Is `import distro` supported in Python 2.x?


It is supported on 2.7, see https://pypi.org/project/distro/.

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.


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