Skip to main content

Identifying the properties of a C/C++ compiler, such as type and version

Project description

compiler-identification

https://pypi.org/project/compiler-identification/

A useful tool in identifying the version of C/C++ compilers, mainly various versions of GCC and Clang present in various Linux districtions and versions of macOS.

Usage (an ipython session shown):

In [1]: from compiler_identification import identify_compiler

In [2]: identification = identify_compiler('clang')

In [3]: identification
Out[3]: <compiler_identification.CompilerIdentification family='clang' version_str='12.0.5' full_version_output_str='Apple clang version 12.0.5 (clang-1205.0.22.9)\nTarget: x86_64-apple-darwin20.3.0\nThread model: posix\nInstalledDir: /Library/Developer/CommandLineTools/usr/bin' parsed_version=<Version('12.0.5')> compiler_path='/usr/bin/clang' at 0x7f904a95e970>

In [4]: identification.parsed_version
Out[4]: <Version('12.0.5')>

The parsed_version, which is a Version instance from the packaging module, allows to do proper version comparisons. See https://packaging.pypa.io/en/latest/version.html for more details.

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

compiler-identification-1.0.3.tar.gz (8.0 kB view details)

Uploaded Source

File details

Details for the file compiler-identification-1.0.3.tar.gz.

File metadata

  • Download URL: compiler-identification-1.0.3.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.8

File hashes

Hashes for compiler-identification-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c0f15bffbdda89c7f6696dacdd3507908a67f1e8f39e6748f1dccb1950edb6b2
MD5 ad019aa702f003497f00fc1bca4e3460
BLAKE2b-256 bf1a86c428cffb62f7652249d69b0c30cdc46f9c24f6d53bfaa8cb506bea8528

See more details on using hashes here.

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