Skip to content

Platform and environment info #738

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

Merged
merged 7 commits into from
Jan 30, 2023
Merged

Platform and environment info #738

merged 7 commits into from
Jan 30, 2023

Conversation

adorton-adobe
Copy link
Collaborator

@adorton-adobe adorton-adobe commented Oct 1, 2021

Summary

  • New command - info
  • Prints details about system and environment
    • Python version (what is embedded in the EXE)
    • OS type and version
    • Distro details (for Linux)
    • Packages (to help diagnose issues related to dependency updates)

Testing Steps

Note: Package info is collected at build time because of the way pyInstaller manages the environment. If we get pkg_resources.working_set at runtime, we will get an incomplete list of packages. So to test this, it is necessary to build the executable.

  • Run ./user-sync info
  • Output will look like this:
Python: 3.9.1
Platform: Windows-10-10.0.19041-SP0
Packages:
  PyJWT: 2.0.1
  PyYAML: 5.4.1
  aiohttp: 3.7.4.post0
  altgraph: 0.17.2
  argon2-cffi: 21.1.0
  atomicwrites: 1.4.0
  attrs: 21.2.0
  certifi: 2021.5.30
  cffi: 1.14.6
  chardet: 4.0.0
  charset-normalizer: 2.0.6
  click: 8.0.1
  click-default-group: 1.2.2
  colorama: 0.4.4
  configparser: 3.7.4
  coverage: 5.5
  cryptography: 3.3.2
  future: 0.18.2
  idna: 3.2
  importlib-metadata: 4.8.1
  iniconfig: 1.1.1
  keyring: 23.2.1
  keyrings.cryptfile: 1.3.8
  ldap3: 2.9.1
  mock: 4.0.3
  multidict: 5.1.0
  okta: 0.0.3.1
  packaging: 21.0
  pefile: 2021.9.3
  pip: 21.2.4
  pluggy: 1.0.0
  psutil: 5.8.0
  py: 1.10.0
  pyOpenSSL: 20.0.1
  pyasn1: 0.4.8
  pycparser: 2.20
  pycryptodome: 3.9.7
  pyinstaller: 4.5.1
  pyinstaller-hooks-contrib: 2021.3
  pyparsing: 2.4.7
  pytest: 6.2.5
  pytest-cov: 2.12.1
  pytest-runner: 5.3.1
  python-dateutil: 2.8.2
  pywin32: 301
  pywin32-ctypes: 0.2.0
  requests: 2.26.0
  setuptools: 58.1.0
  six: 1.16.0
  toml: 0.10.2
  typing-extensions: 3.10.0.2
  umapi-client: 2.18.1
  urllib3: 1.26.6
  user-sync: 2.6.5-sslfix
  winkerberos: 0.8.0
  yarl: 1.6.3
  zipp: 3.5.0

On Linux, platform.platform() prints general information about the kernel, so we also print the contents of /etc/os-release to show details of the distribution.

CentOS 7 example:

OS Release Info:
  NAME="CentOS Linux"
  VERSION="7 (Core)"
  ID="centos"
  ID_LIKE="rhel fedora"
  VERSION_ID="7"
  PRETTY_NAME="CentOS Linux 7 (Core)"
  ANSI_COLOR="0;31"
  CPE_NAME="cpe:/o:centos:centos:7"
  HOME_URL="https://www.centos.org/"
  BUG_REPORT_URL="https://bugs.centos.org/"

  CENTOS_MANTISBT_PROJECT="CentOS-7"
  CENTOS_MANTISBT_PROJECT_VERSION="7"
  REDHAT_SUPPORT_PRODUCT="centos"
  REDHAT_SUPPORT_PRODUCT_VERSION="7"

Fixes #737

@adorton-adobe adorton-adobe merged commit 49f13d9 into v2 Jan 30, 2023
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.

Platform and environment info
1 participant