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

ENH. Add name and version of current linux distribution. #119

Merged
merged 3 commits into from
May 5, 2024

Conversation

carsten-forty2
Copy link
Contributor

It would be nice and helpful if we also have the name and version for the Linux distribution under OS . It looks like this for my os.

--------------------------------------------------------------------------------
  Date: Thu Apr 18 18:36:14 2024 CEST

                OS : Linux (Gentoo 2.14)
            CPU(s) : 32
           Machine : x86_64
      Architecture : 64bit
               RAM : 62.6 GiB
       Environment : Python
       File system : ext4

  Python 3.11.8 (main, Mar 21 2024, 00:53:58) [GCC 13.2.1 20240113]

             numpy : 1.26.3
             scipy : 1.12.0
           IPython : 8.21.0
        matplotlib : 3.8.2
            scooby : 0.9.2
--------------------------------------------------------------------------------

The PR adds some placeholder for other platforms (Mac/Windows/Java) and would need some parsing for these platforms. I don't have access to them to test.

Thanks for considering this PR.

Cheers
Carsten

@prisae
Copy link
Collaborator

prisae commented Apr 18, 2024

Thanks for your PR @carsten-forty2! I like this, what do you think @banesullivan? I do not have Mac/Windows either, but from my perspective we could also pull this in for Linux only, and add other platforms at a later point.

@banesullivan
Copy link
Owner

This is a great addition! I have access to a few different machines, architectures, and distributions so I'll do some testing and make sure this works

@banesullivan
Copy link
Owner

I made a few changes to support macOS and put all of this in some general try/catch statements to guarantee it doesn't fail. While I added the info for Windows, I did not test this and simply used the return type from docs (I'm too lazy to boot up Windows 🤣, but I'll try to test this on CI or something)

@banesullivan
Copy link
Owner

@ThomasMGeo, would you be up for trying this out on Windows and letting us know what's most relevant from import platform;platform.win32_ver()?

@banesullivan banesullivan merged commit b373f38 into banesullivan:main May 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants