This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 821: Adding GetHostInfo to UtilityFunctions
Python does provide methods for the platform to pass information to the Python environment through the platform module, but it is important that the way this information is parsed is consistent. To address this issue this function will parse the information into the 3 pieces we care about: 1) Linux or Windows 2) 32 or 64 bit 3) x86 or ARM
- Loading branch information
Max Knutsen
committed
Feb 19, 2019
1 parent
c84c1a4
commit a1a1404
Showing
4 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# GetHostInfo | ||
|
||
This document details the utility function called GetHostInfo. This function was written because NuGet needed a way to determine attributes about the host system to determine what parts of a dependency to use. | ||
|
||
## How to Use | ||
```python | ||
from MuPythonLibrary.UtilityFunctions import GetHostInfo | ||
|
||
host_info = GetHostInfo() | ||
``` | ||
|
||
## Usage info | ||
|
||
GetHostInfo() will return a namedtuple with 3 attributes describing the host machine. Below for each is the name of the field, description of the field and possible contents therein. | ||
|
||
### 1. os - OS Name | ||
|
||
Windows, Linux, or Java | ||
|
||
### 2. arch - Processor architecture | ||
|
||
ARM or x86 | ||
|
||
### 3. bit - Highest order bit | ||
|
||
32 or 64 | ||
|
||
## Purpose | ||
|
||
Since there are multiple different ways one could derive these values, it is necessary provide a common implementation of that logic to ensure it is uniform. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters