Skip to main content

utilities from platform detection

Project description

pipeline status coverage report

This is a project started to coordinate between LHCb Core Software and LHCbDirac platform compatibility information.

It follows up on discussions in

OS Id Derivation

The OS Id (os_id) is a short string used to identify the Operating System (e.g. Linux flavour, MacOS, Windows…) and its version, usually in the format <name><version>.

On Linux, the OS Id is computed from different possible sources:

  • file /etc/os-release [1]
    • the name is extracted from the field ID, up the first (optional) -

    • the version is extracted from the field VERSION_ID
      • if ID or ID_LIKE contain rhel or suse we keep only up to the first .

      • otherwise we remove all occurrences of .

      • if VERSION_ID is not present and the name is debian we set the version to testing

  • file /etc/redhat-release
    • the name is
      • slc if it contains CERN

      • sl if it contains Scientific Linux

      • centos if it contains CentOS

      • rhel if it contains Red Hat Enterprise Linux

    • the version is the number after the word release, up to the first .

  • file /etc/lsb-release
    • the name is extracted from the field DISTRIB_ID, up the first (optional) -, and made lowercase

    • the version is extracted from the field DISTRIB_RELEASE removing all occurrences of .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

LbPlatformUtils-4.3.1.tar.gz (35.5 kB view hashes)

Uploaded Source

Built Distributions

LbPlatformUtils-4.3.1-py3-none-any.whl (29.5 kB view hashes)

Uploaded Python 3

LbPlatformUtils-4.3.1-py2-none-any.whl (29.5 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page