From cf8ccddfca7fadceea31e34c0c22cc010b77fa4b Mon Sep 17 00:00:00 2001 From: Tali Auster Date: Thu, 11 Apr 2024 17:50:50 -0600 Subject: [PATCH] deps: exchange ld for distro --- pyproject.toml | 4 ++-- src/e3/os/platform.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c18f3e4d..63805203 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,8 +35,8 @@ dependencies = [ "psutil; sys_platform=='linux'", "psutil; sys_platform=='linux2'", "psutil; sys_platform=='darwin'", - "ld; sys_platform=='linux'", - "ld; sys_platform=='linux2'", + "distro; sys_platform=='linux'", + "distro; sys_platform=='linux2'", ] [project.urls] diff --git a/src/e3/os/platform.py b/src/e3/os/platform.py index 76cee5c7..11ab5b82 100644 --- a/src/e3/os/platform.py +++ b/src/e3/os/platform.py @@ -76,12 +76,12 @@ def fetch_system_data(cls) -> None: # Fetch linux distribution info on linux OS if cls.uname.system == "Linux": # linux-only - import ld + import distro cls.ld_info = { - "name": ld.name(), - "major_version": ld.major_version(), - "version": ld.version(), + "name": distro.name(), + "major_version": distro.major_version(), + "version": distro.version(), } # Fetch core numbers. Note that the methods does not work