Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use distro over ld #654

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions src/e3/os/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading