Skip to main content

Clang-Format is an LLVM-based code formatting tool

Project description

clang-format Python distribution

PyPI Release

This project packages the clang-format utility as a Python package. It allows you to install clang-format directly from PyPI:

python -m pip install clang-format

This projects intends to release a new PyPI package for each major and minor release of clang-format.

Use with pipx

You can use pipx to run clang-format, as well. For example, pipx run clang-format <args> will run clang-format without any previous install required on any machine with pipx (including all default GitHub Actions / Azure runners, avoiding requiring a pre-install step or even actions/setup-python).

Use from pre-commit

A pre-commit hook is also provided, use like this:

- repo: https://github.com/pre-commit/mirrors-clang-format
  rev: v21.1.8
  hooks:
  - id: clang-format
    types_or: [c++, c, cuda]

In contrast to many other pre-commit hooks, the versioning of the hook matches the versioning of clang-format.

If you are required to stick with a given major/minor version of clang-format with your pre-commit-hook, you can use this alternative hook repository that also receives backports of older versions of clang-format. Currently, all major/minor versions of LLVM >= 10 are supported. It is best to subscribe to releases of the hook repository to get notified of new backport releases, as pre-commit's auto-upgrade functionality will not work in that case.

Building new releases

The clang-format-wheel repository provides the logic to build and publish binary wheels of the clang-format utility.

In order to add a new release, the following steps are necessary:

Alternatively, the workflow can be triggered manually:

On manual triggers, the following input variables are available:

  • llvm_version: Override the LLVM version (default: "")
  • wheel_version: Override the wheel packaging version (default "0")
  • skip_emulation: Set which emulation builds to skip, e.g. "qemu" (default: "")
  • deploy_to_testpypi: Whether to deploy to TestPyPI instead of PyPI (default: false)

The repository with the precommit hook is automatically updated using a scheduled Github Actions workflow.

Acknowledgements

This repository extends the great work of several other projects:

  • clang-format itself is provided by the LLVM project under the Apache 2.0 License with LLVM exceptions.
  • The build logic is based on scikit-build-core which greatly reduces the amount of low level code necessary to package clang-format.
  • The scikit-build packaging examples of CMake and Ninja were very helpful in packaging clang-format.
  • The CI build process is controlled by cibuildwheel which makes building wheels across a number of platforms a pleasant experience (!)

Special thanks goes to mgevaert who initiated this project and maintained it until 2021.

We are grateful for the generous provisioning with CI resources that GitHub currently offers to Open Source projects.

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

clang_format-21.1.8.tar.gz (11.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

clang_format-21.1.8-py2.py3-none-win_arm64.whl (1.3 MB view details)

Uploaded Python 2Python 3Windows ARM64

clang_format-21.1.8-py2.py3-none-win_amd64.whl (1.4 MB view details)

Uploaded Python 2Python 3Windows x86-64

clang_format-21.1.8-py2.py3-none-win32.whl (1.3 MB view details)

Uploaded Python 2Python 3Windows x86

clang_format-21.1.8-py2.py3-none-musllinux_1_2_x86_64.whl (2.8 MB view details)

Uploaded Python 2Python 3musllinux: musl 1.2+ x86-64

clang_format-21.1.8-py2.py3-none-musllinux_1_2_s390x.whl (3.2 MB view details)

Uploaded Python 2Python 3musllinux: musl 1.2+ s390x

clang_format-21.1.8-py2.py3-none-musllinux_1_2_ppc64le.whl (3.1 MB view details)

Uploaded Python 2Python 3musllinux: musl 1.2+ ppc64le

clang_format-21.1.8-py2.py3-none-musllinux_1_2_i686.whl (3.0 MB view details)

Uploaded Python 2Python 3musllinux: musl 1.2+ i686

clang_format-21.1.8-py2.py3-none-musllinux_1_2_armv7l.whl (2.5 MB view details)

Uploaded Python 2Python 3musllinux: musl 1.2+ ARMv7l

clang_format-21.1.8-py2.py3-none-musllinux_1_2_aarch64.whl (2.7 MB view details)

Uploaded Python 2Python 3musllinux: musl 1.2+ ARM64

clang_format-21.1.8-py2.py3-none-manylinux_2_31_armv7l.whl (1.6 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.31+ ARMv7l

clang_format-21.1.8-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

clang_format-21.1.8-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl (2.0 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.26+ s390xmanylinux: glibc 2.28+ s390x

clang_format-21.1.8-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl (2.0 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.26+ ppc64lemanylinux: glibc 2.28+ ppc64le

clang_format-21.1.8-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl (1.9 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.26+ i686manylinux: glibc 2.28+ i686

clang_format-21.1.8-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

clang_format-21.1.8-py2.py3-none-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

clang_format-21.1.8-py2.py3-none-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded Python 2Python 3macOS 10.9+ x86-64

File details

Details for the file clang_format-21.1.8.tar.gz.

File metadata

  • Download URL: clang_format-21.1.8.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clang_format-21.1.8.tar.gz
Algorithm Hash digest
SHA256 99369fe76526ba6be6d7a8093fee6cd266bbf5ce72597a0d79a4ce9a625b28cf
MD5 6753f8db4ec11fba3deaf3a9fa22d3da
BLAKE2b-256 29ed019e682e9f8a5a5abf4258b293453092ef9524b540ada591ccfdff1246df

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8.tar.gz:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-win_arm64.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 1aa10b3f647268361d08bf4f17ce70964b8d9c04d5539e7d8acbebd14dc4a49c
MD5 e23cc7551f4121451b9968275a531bb3
BLAKE2b-256 add38790b539afb6cb0d4474705d3750e78a1f0847ab6d3ef1b00dd1ae52f364

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-win_arm64.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a7606da55e31ebf5b63dd75800392e6cca7c595a74100c2cebcda2d742130732
MD5 277778da9e8e467097bf0223bfb6e53a
BLAKE2b-256 697ac49c8af9135c6a6dfb9cd103328ba7b6551643dce71b57e58ea940884015

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-win_amd64.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-win32.whl.

File metadata

  • Download URL: clang_format-21.1.8-py2.py3-none-win32.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 2f5883ca83f718d8c2272e98b3cbda422fec520824b5a1e335c631dc6d812da7
MD5 951bf9447cc580aff1b08199429ec029
BLAKE2b-256 53e174f2000d44e4904472e5685afb98d19566c515026214733f02bbdc73d6d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-win32.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9731aecf954651004f184347d0c589d4e91a39ccda21262ee17c60f80a4408b2
MD5 f9943d819f954f96cfd6f9c718aa4494
BLAKE2b-256 53611623382bc78ef139c196473a5c76b840a071c9002cb5cd2694ac50327db9

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-musllinux_1_2_x86_64.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-musllinux_1_2_s390x.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-musllinux_1_2_s390x.whl
Algorithm Hash digest
SHA256 4dd0fee9eaee9915ba7fa08e60ee9ddfba1f754d10d71164482d9eb387c431f0
MD5 9b43653fd59058a8e352d9538c2f0f9e
BLAKE2b-256 14557527fbe31423a1bb53653c2a2b20aa34a73ec33b99199bceaec0f5907295

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-musllinux_1_2_s390x.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-musllinux_1_2_ppc64le.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 6b9e0b45cfaf4a18336a6db4666dd6a6aae840e38b038e6d568a65f43ade007c
MD5 92477345a317efb8c01877d8bdedb441
BLAKE2b-256 7bb5eed5c95521b77d3cde024c3a23c7a80c46e78aa5b5a81c5cf935e7267588

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-musllinux_1_2_ppc64le.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 303d5fd53090422119136b1a458e98db429dedd5db0add50e70f885f8c95d82a
MD5 e4c2b149bf7f71e6eb2cd71622b20641
BLAKE2b-256 99eb2332edb1846d6832932191a590203a53ec69f585e718b51796335a1dcb6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-musllinux_1_2_i686.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 10f7d7004d70b5e03fd3f764fc19fae89cd38d68b3482162cb09cac47c12c7b0
MD5 52129fc24f402d843c106f35fae4dd72
BLAKE2b-256 5d6a378187d72a465cebd3dbf7cd455e33b4931daa33e815b7865e6e65591a72

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-musllinux_1_2_armv7l.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e10a5dca18a04997ad55c082bc0759edc7e337b24a2373ded109634fde12662a
MD5 1bc5f8f0d04bf05dd7df52a62430a5b3
BLAKE2b-256 aa9f43f4e384cb8943418f94943f682835f375f15b9cc64c526d73a7360f2b2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-musllinux_1_2_aarch64.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-manylinux_2_31_armv7l.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-manylinux_2_31_armv7l.whl
Algorithm Hash digest
SHA256 b81f1e909f5e7ef862a7818dc22b302a3ff407f3534e3395aa7ba26746cc890e
MD5 2d90c83adacea170a8e53d8e16423b9b
BLAKE2b-256 76339e7db5fc4abefb25022d266957f666bfc263ae3e51abdd2c997d2880ceee

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-manylinux_2_31_armv7l.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d12b864b596b80810cdd7f97556c485dc09cfe2952503958535f01359e025fbb
MD5 a1ff3376960254141f0e233304c6abd3
BLAKE2b-256 a8c2403e7371b1ab0f6175d708ecc93cf18085ea9f903e8fe7d17c43df698f06

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl
Algorithm Hash digest
SHA256 94de66c5eeca1270825348687d384750d91f1d8d12216b2df0aea892859be33a
MD5 5418e71aa69a245e74ca9c12cd35cd3e
BLAKE2b-256 e02acad75567c312d945cc26aaee7e1b7135703fed9c7e7ad15c427bf6ad7a84

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl
Algorithm Hash digest
SHA256 6a4b61a743dad5afc5e60be0c5c8f162f6cf27fff9eed56ec0bf65c2bcbd8a8d
MD5 ad9ee5b33911c27168913f5388dc943b
BLAKE2b-256 34d546e22ae8c4385a7836db7403ced63ea8056c971cbb806bf0c6f0d2133acc

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 143d2dffa71058d05ac5ad71321682e23d638bce22c8f2e3d01ed457d841a5f3
MD5 df85bc3c3cbf572e49b53ddf7c3becea
BLAKE2b-256 540d074b940884ced1b5c93e2e7fc8a941673519a938e7f31aeade321e3ab094

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c2a044953efab5f7d0261f3a76aabc01358592faac1b73af38d8c83db6e91a69
MD5 97b4a98115aae4a762f5c9aa7c36ee8c
BLAKE2b-256 ab5d6720c895c5cfc01831fac55ecf849f10d03d6222700909af14f6047c933b

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9a78fabba6b382866819b42a7b220d235a3baf6128a40fb7bd590c037f69879b
MD5 35942b90b837039f6764a5aba9e0ac00
BLAKE2b-256 8438a61466227a8a6bf22c583f7bd810e75c9a356cfc63c6a712a201103a4ad3

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_format-21.1.8-py2.py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for clang_format-21.1.8-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f447091c346027a09728a0a96128fe058419fe06cf200ccc3dc98bcd4399e351
MD5 d0895bd8980398bb4caba4ba48a69884
BLAKE2b-256 171d4b1d85acb99a2ee3bad0b20cc3e82c58fbfb39bf4dd5856ac1f2c4f36e65

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-21.1.8-py2.py3-none-macosx_10_9_x86_64.whl:

Publisher: release.yml on ssciwr/clang-format-wheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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