clang-tools


Nameclang-tools JSON
Version 0.15.3 PyPI version JSON
download
home_pageNone
SummaryInstall clang-tools (clang-format, clang-tidy, clang-query, clang-apply-replacements) with pip
upload_time2025-08-31 18:08:56
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords clang clang-tools clang-extra clang-tidy clang-format clang-query clang-apply-replacements
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            clang-tools CLI
===============

**Install clang-format, clang-tidy, clang-query, and clang-apply-replacements binaries with clang-tools CLI.**

.. |latest-version| image:: https://img.shields.io/pypi/v/clang-tools?color=blue
    :target: https://pypi.org/project/clang-tools/
    :alt: PyPI
.. |python-test| image:: https://github.com/cpp-linter/clang-tools-pip/actions/workflows/python-test.yml/badge.svg
    :target: https://github.com/cpp-linter/clang-tools-pip/actions/workflows/python-test.yml
    :alt: Python test
.. |codecov-badge| image:: https://codecov.io/gh/cpp-linter/clang-tools-pip/branch/main/graph/badge.svg?token=40G5ZOIRRR
    :target: https://codecov.io/gh/cpp-linter/clang-tools-pip
    :alt: codecov
.. |sonar-badge| image:: https://sonarcloud.io/api/project_badges/measure?project=cpp-linter_clang-tools-pip&metric=alert_status
    :target: https://sonarcloud.io/summary/new_code?id=cpp-linter_clang-tools-pip
    :alt: sonarcloud
.. |platform-badge| image:: https://img.shields.io/badge/platform-linux--64%20%7C%20win--64%20%7C%20osx--64%20-blue
    :target: https://pypi.org/project/clang-tools/
    :alt: Platform
.. |pypi-badge| image:: https://img.shields.io/pypi/dw/clang-tools
    :target: https://pypistats.org/packages/clang-tools
    :alt: PyPI - Downloads

|latest-version| |python-test| |codecov-badge| |sonar-badge| |platform-badge| |pypi-badge|

.. important::
    This package only manages binary executables (& corresponding symbolic links) that
    are installed using this package's executable script. It does not intend to change or
    modify any binary executable installed from other sources (like LLVM releases).

Features
--------

- Binaries are statically linked for improved portability.
- Binaries can be specified installed for increased flexibility.
- Binaries are checked with SHA512 checksum. This ensures:

  1. Downloads are not corrupted.
  2. Old binary builds can be updated.
- Installed binaries are symbolically linked for better cross-platform usage.
  For example (on Windows), the ``clang-tidy-13.exe`` binary executable can
  also be invoked with the symbolic link titled ``clang-tidy.exe``

  .. note::
      To create symbolic links on Windows, you must enable developer mode
      from the Windows settings under "Privacy & security" > "For developers"
      category.
- Customizable install path.

Install clang-tools CLI
-----------------------

.. tip::
    It is recommended to use this package in a virtual environment.

    .. code-block:: bash

        # create the virtual env in the working directory
        python -m venv env-name

        # to activate on Linux:
        source env-name/bin/activate

        # to activate on Windows:
        ./env-name/Scripts/activate

    This will ensure that

    1. there are no permission problems when installing the tool
    2. the installed path (for MacOS and Windows) is within the environment's
       variable ``PATH``.

Install `clang-tools` command with pip

.. code-block:: shell

    pip install clang-tools

Install `clang-tools` from git repo

.. code-block:: shell

    pip install git+https://github.com/cpp-linter/clang-tools-pip.git@main

CLI Usage
---------

For a list of supported Command Line Interface options, see
`the CLI documentation <https://cpp-linter.github.io/clang-tools-pip/cli_args.html>`_

Examples
********

Use ``clang-tools`` command to install version 13 binaries.

.. code-block:: shell

    clang-tools --install 13

Or install to a specified directory

.. code-block:: shell

    clang-tools --install 13 --directory .

Or install a specified tool, such as clang-format and clang-query version 14.

.. code-block:: shell

    clang-tools --install 14 --tool clang-format clang-query

If the installed directory is in your path, you can run the installed tools.

.. code-block:: shell

    clang-format-13 --version
    clang-format version 13.0.0

.. code-block:: shell

    clang-tidy-13 --version
    LLVM (http://llvm.org/):
      LLVM version 13.0.0
      Optimized build.
      Default target: x86_64-unknown-linux-gnu
      Host CPU: skylake

Supported versions
------------------

clang-format, clang-tidy, clang-query, clang-apply-replacements
***************************************************************
.. csv-table::
    :header: "Version", "21", "20", "19", "18", "17", "16", "15", "14", "13", "12", "11", "10", "9"
    :stub-columns: 1

    Linux,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
    Windows,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️
    macOS,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️,✔️

For more details, visit the `clang-tools-static-binaries <https://github.com/cpp-linter/clang-tools-static-binaries>`_ repository.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "clang-tools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "clang, clang-tools, clang-extra, clang-tidy, clang-format, clang-query, clang-apply-replacements",
    "author": null,
    "author_email": "Xianpeng Shen <xianpeng.shen@gmail.com>, Brendan Doherty <2bndy5@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "clang-tools CLI\n===============\n\n**Install clang-format, clang-tidy, clang-query, and clang-apply-replacements binaries with clang-tools CLI.**\n\n.. |latest-version| image:: https://img.shields.io/pypi/v/clang-tools?color=blue\n    :target: https://pypi.org/project/clang-tools/\n    :alt: PyPI\n.. |python-test| image:: https://github.com/cpp-linter/clang-tools-pip/actions/workflows/python-test.yml/badge.svg\n    :target: https://github.com/cpp-linter/clang-tools-pip/actions/workflows/python-test.yml\n    :alt: Python test\n.. |codecov-badge| image:: https://codecov.io/gh/cpp-linter/clang-tools-pip/branch/main/graph/badge.svg?token=40G5ZOIRRR\n    :target: https://codecov.io/gh/cpp-linter/clang-tools-pip\n    :alt: codecov\n.. |sonar-badge| image:: https://sonarcloud.io/api/project_badges/measure?project=cpp-linter_clang-tools-pip&metric=alert_status\n    :target: https://sonarcloud.io/summary/new_code?id=cpp-linter_clang-tools-pip\n    :alt: sonarcloud\n.. |platform-badge| image:: https://img.shields.io/badge/platform-linux--64%20%7C%20win--64%20%7C%20osx--64%20-blue\n    :target: https://pypi.org/project/clang-tools/\n    :alt: Platform\n.. |pypi-badge| image:: https://img.shields.io/pypi/dw/clang-tools\n    :target: https://pypistats.org/packages/clang-tools\n    :alt: PyPI - Downloads\n\n|latest-version| |python-test| |codecov-badge| |sonar-badge| |platform-badge| |pypi-badge|\n\n.. important::\n    This package only manages binary executables (& corresponding symbolic links) that\n    are installed using this package's executable script. It does not intend to change or\n    modify any binary executable installed from other sources (like LLVM releases).\n\nFeatures\n--------\n\n- Binaries are statically linked for improved portability.\n- Binaries can be specified installed for increased flexibility.\n- Binaries are checked with SHA512 checksum. This ensures:\n\n  1. Downloads are not corrupted.\n  2. Old binary builds can be updated.\n- Installed binaries are symbolically linked for better cross-platform usage.\n  For example (on Windows), the ``clang-tidy-13.exe`` binary executable can\n  also be invoked with the symbolic link titled ``clang-tidy.exe``\n\n  .. note::\n      To create symbolic links on Windows, you must enable developer mode\n      from the Windows settings under \"Privacy & security\" > \"For developers\"\n      category.\n- Customizable install path.\n\nInstall clang-tools CLI\n-----------------------\n\n.. tip::\n    It is recommended to use this package in a virtual environment.\n\n    .. code-block:: bash\n\n        # create the virtual env in the working directory\n        python -m venv env-name\n\n        # to activate on Linux:\n        source env-name/bin/activate\n\n        # to activate on Windows:\n        ./env-name/Scripts/activate\n\n    This will ensure that\n\n    1. there are no permission problems when installing the tool\n    2. the installed path (for MacOS and Windows) is within the environment's\n       variable ``PATH``.\n\nInstall `clang-tools` command with pip\n\n.. code-block:: shell\n\n    pip install clang-tools\n\nInstall `clang-tools` from git repo\n\n.. code-block:: shell\n\n    pip install git+https://github.com/cpp-linter/clang-tools-pip.git@main\n\nCLI Usage\n---------\n\nFor a list of supported Command Line Interface options, see\n`the CLI documentation <https://cpp-linter.github.io/clang-tools-pip/cli_args.html>`_\n\nExamples\n********\n\nUse ``clang-tools`` command to install version 13 binaries.\n\n.. code-block:: shell\n\n    clang-tools --install 13\n\nOr install to a specified directory\n\n.. code-block:: shell\n\n    clang-tools --install 13 --directory .\n\nOr install a specified tool, such as clang-format and clang-query version 14.\n\n.. code-block:: shell\n\n    clang-tools --install 14 --tool clang-format clang-query\n\nIf the installed directory is in your path, you can run the installed tools.\n\n.. code-block:: shell\n\n    clang-format-13 --version\n    clang-format version 13.0.0\n\n.. code-block:: shell\n\n    clang-tidy-13 --version\n    LLVM (http://llvm.org/):\n      LLVM version 13.0.0\n      Optimized build.\n      Default target: x86_64-unknown-linux-gnu\n      Host CPU: skylake\n\nSupported versions\n------------------\n\nclang-format, clang-tidy, clang-query, clang-apply-replacements\n***************************************************************\n.. csv-table::\n    :header: \"Version\", \"21\", \"20\", \"19\", \"18\", \"17\", \"16\", \"15\", \"14\", \"13\", \"12\", \"11\", \"10\", \"9\"\n    :stub-columns: 1\n\n    Linux,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f\n    Windows,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f\n    macOS,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f,\u2714\ufe0f\n\nFor more details, visit the `clang-tools-static-binaries <https://github.com/cpp-linter/clang-tools-static-binaries>`_ repository.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Install clang-tools (clang-format, clang-tidy, clang-query, clang-apply-replacements) with pip",
    "version": "0.15.3",
    "project_urls": {
        "source": "https://github.com/cpp-linter/clang-tools-pip",
        "tracker": "https://github.com/cpp-linter/clang-tools-pip/issues"
    },
    "split_keywords": [
        "clang",
        " clang-tools",
        " clang-extra",
        " clang-tidy",
        " clang-format",
        " clang-query",
        " clang-apply-replacements"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e9dc2a67ca33fafbd50f7b33be4c0221cc9e3f2fb08f04554cdc03c76c6acd1b",
                "md5": "7f57aa35700ada76a18ef322b6d0283a",
                "sha256": "9164007e5c503b6044f759916711d5eb50bac9499c0f0378dd139f5ed023a5b4"
            },
            "downloads": -1,
            "filename": "clang_tools-0.15.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7f57aa35700ada76a18ef322b6d0283a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11060,
            "upload_time": "2025-08-31T18:08:56",
            "upload_time_iso_8601": "2025-08-31T18:08:56.623242Z",
            "url": "https://files.pythonhosted.org/packages/e9/dc/2a67ca33fafbd50f7b33be4c0221cc9e3f2fb08f04554cdc03c76c6acd1b/clang_tools-0.15.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-31 18:08:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cpp-linter",
    "github_project": "clang-tools-pip",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "clang-tools"
}
        
Elapsed time: 1.95108s