Install clang-tools (clang-format, clang-tidy, clang-query, clang-apply-replacements) with pip
Project description
Easily install clang-format, clang-tidy, clang-query, and clang-apply-replacements static binaries or Python wheels using the clang-tools CLI.
Features
Support clang tools binaries and Python wheels.
Binaries are statically linked for improved portability.
Binaries can be specified installed for increased flexibility.
Binaries are checked with SHA512 checksum. This ensures:
Downloads are not corrupted.
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
Customizable install path.
Install clang-tools CLI
Install clang-tools command with pip
pip install clang-tools
Install clang-tools from git repo
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
Install binaries examples
Use clang-tools command to install version 13 binaries.
clang-tools --install 13
Or install to a specified directory
clang-tools --install 13 --directory .
Or install a specified tool, such as clang-format and clang-query version 14.
clang-tools --install 14 --tool clang-format clang-query
If the installed directory is in your path, you can run the installed tools.
clang-format-13 --version
clang-format version 13.0.0
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
Install wheels examples
After installing the clang-tools CLI, you can install the Python wheels using the clang-tools-wheel command.
# Install latest clang-format wheel
clang-tools-wheel --tool clang-format
# Install specific version clang-format wheel
clang-tools-wheel --tool clang-format --version 21
# Install latest clang-tidy wheel
clang-tools-wheel --tool clang-tidy
# Install specific version clang-tidy wheel
clang-tools-wheel --tool clang-tidy --version 21
Supported Versions
clang tools binaries
The following table shows the supported versions of clang-format, clang-tidy, clang-query, and clang-apply-replacements binaries for each platform:
Platform |
21 |
20 |
19 |
18 |
17 |
16 |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Linux |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
Windows |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
macOS |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
✔️ |
For more details, visit the clang-tools-static-binaries repository.
clang tools Python wheels
The following Python wheels are supported:
Check the respective PyPI pages for available versions and platform support.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clang_tools-0.16.0-py3-none-any.whl.
File metadata
- Download URL: clang_tools-0.16.0-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a1515fafe0859d9b35da12893a06d3f2a6c20e4d88940714cb35acf38cc2694
|
|
| MD5 |
e211d9b6d3bd0d67b4abe367740b566e
|
|
| BLAKE2b-256 |
3b228f5eb7bf0cd29ec3b0655d2dbbbc35080489b08cb9acf69800f0fcb5e2a0
|