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: v22.1.5
  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


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 Distribution

clang_format-22.1.5.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-22.1.5-py2.py3-none-win_arm64.whl (1.3 MB view details)

Uploaded Python 2Python 3Windows ARM64

clang_format-22.1.5-py2.py3-none-win_amd64.whl (1.5 MB view details)

Uploaded Python 2Python 3Windows x86-64

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

Uploaded Python 2Python 3Windows x86

clang_format-22.1.5-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-22.1.5-py2.py3-none-musllinux_1_2_s390x.whl (3.2 MB view details)

Uploaded Python 2Python 3musllinux: musl 1.2+ s390x

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

Uploaded Python 2Python 3musllinux: musl 1.2+ ppc64le

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

Uploaded Python 2Python 3musllinux: musl 1.2+ i686

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

Uploaded Python 2Python 3musllinux: musl 1.2+ ARMv7l

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

Uploaded Python 2Python 3musllinux: musl 1.2+ ARM64

clang_format-22.1.5-py2.py3-none-manylinux_2_31_armv7l.whl (1.7 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.31+ ARMv7l

clang_format-22.1.5-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-22.1.5-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl (2.1 MB view details)

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

clang_format-22.1.5-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl (2.1 MB view details)

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

clang_format-22.1.5-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-22.1.5-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (1.8 MB view details)

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

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

Uploaded Python 2Python 3macOS 11.0+ ARM64

clang_format-22.1.5-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-22.1.5.tar.gz.

File metadata

  • Download URL: clang_format-22.1.5.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-22.1.5.tar.gz
Algorithm Hash digest
SHA256 94401741d1db878ee1e002e3c33305a7c8e50ff1a9b0a4b8c713690f404d535c
MD5 12498fd751c6de318e7d604905b940fc
BLAKE2b-256 12674195b7bf2204e77a1c6305ea976f8e5dc63e70bcb59702912adb266a102e

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5.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-22.1.5-py2.py3-none-win_arm64.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 4f5ac3b91bb5700c43cb96beb32e360a5aa6a7f94105d7900054f6496554d9b9
MD5 20d63f4ceac157dc257f116b34ecefde
BLAKE2b-256 ce2d35c5301c6d04f4babf218ad9716c061abebb8a56a1bbad167a86dfe966d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0393ce061bf7bd7e7ce349fc758a05f9ce604d8653e23b47f24322fb4843074c
MD5 ddc1931d8099c36075a8f71d6ccef172
BLAKE2b-256 796296fb942f00a39f93aeedf8ab5a16b2b42688bdc7ca7ec94714502b787c0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-win32.whl.

File metadata

  • Download URL: clang_format-22.1.5-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-22.1.5-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 c1c2c4b9c9b7fba124c1b60647706ac6d4950e52830303951e7004403bb07006
MD5 6d862bc82415d39c9eddfba316211d14
BLAKE2b-256 c0f7f6c94ec536b6ada3dd23e0b49e691c80991dc5de89a5152b1ea2ed14c20b

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5028f730a1acd0a2ff5fde309c3a064b2f8375caa664e57ff99c69a524d6cfd2
MD5 deb9baffdfa210731f1d6eecd2c40ce2
BLAKE2b-256 f7eba1fa659d85d9b40eee594bfd2be7ddaf05e0296788ee2955473ef1e7bb38

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-musllinux_1_2_s390x.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-musllinux_1_2_s390x.whl
Algorithm Hash digest
SHA256 86838932bcbfebdb4c900ea9e7c4dc4356a56aa75990c38065863c82c0d5e39f
MD5 5092336036c066c8674ed33351ec20c7
BLAKE2b-256 e37e89cdc4216d8d49eeff98043bb5836eec5da805fd31aeb8f480bf4b8fa8ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-musllinux_1_2_ppc64le.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 f0fb5226525c846a8770b8adaba3a323261b6031a13d065d4d4c4aa0bf6dbbc4
MD5 7916a760b98a6a2b5f0568498923ba08
BLAKE2b-256 8c0a1f6cd7f0ebb8083db3098d648af3d363c35f6864159fa508d213279294b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 a6f700f948a0eeccdc74966a773d3f2f348ffedab4b49b10b71439f26d1b8ad2
MD5 d387c9306f7cb8697a5fdcdd04d43cfd
BLAKE2b-256 987a2fb4e48fb9205e0b4380fe44d27d1e29141211f0fa53887e75224bf4fbe7

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 4f43424bc0944402f2166337cc330f92d31d102b5a3ee31714814823ac647a67
MD5 260a99c28c4d2d2c014de58557aa56df
BLAKE2b-256 7e8238a8271f80861e75012c5ef63955f42ddd90cfff6a4ac09c84c055c1f4b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 cbafc220a1ad3da603f0e4a469f52cf31be60da384d213727b62af0684cfd96b
MD5 d423ee0b1bd2b70286543e1b87202145
BLAKE2b-256 810b7eb88226eed4c6cb529878d578f888c96ad3778df30e64d3223860327a08

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-manylinux_2_31_armv7l.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-manylinux_2_31_armv7l.whl
Algorithm Hash digest
SHA256 39af8c0b77fb05d1dc7073ee9e348d81a965a0b96c0307d07cd92bbd74c611c7
MD5 de2edcb9a0a740b4ef1292731e559eb5
BLAKE2b-256 b55f853664a3d7599a682b2c89cc76606b818c5c56c7741251a42004e3e76104

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 451efcd0738908b2bd4d76409b52920ef381e045eb6728f9286d2ae5f02f3ef2
MD5 9e1df5e80c9094582ca18767d8a19a2c
BLAKE2b-256 395ebf1ea7a20ec3ffecda7eff98ad0f1621255e244e0f888d011a2106a04318

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl
Algorithm Hash digest
SHA256 a89ec86dd33f367b4e10dc1f243508709deed8576bb75a7b01c1412de47504df
MD5 bd4dbac492228e03280e4b530d46dd9e
BLAKE2b-256 f1a8f33290829eb73e1baece6d46a55d19a3d286ddee559a1955add639ceb731

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl
Algorithm Hash digest
SHA256 b40d0d264003c831cda317d09db31f0ebbcddd5dc13f04af52be5664d2b8aa89
MD5 9718c5e5625bc5dd52124330b9ac7a4e
BLAKE2b-256 6f598b9a1f6f4197292577dae8ff9f94c5900622c0e0a395a46cb2278e4d813a

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 7a93aad78b03f190d8a73e5e81d6942bc0e4f449add21e62c7fad1be2cdfec03
MD5 63e05ae536402fe42e9dc9bf4c4d9948
BLAKE2b-256 ca9525636844c2255fa40d1e6a691c483a9c8804f0ce6903eb790f8e4d95dfa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2db8b07d54f2b9583327715267b8ae5e9852e8da23b49c1bf8dde19067ce6fbc
MD5 14a00338c7c190d06b03bebf146fc327
BLAKE2b-256 d9d5077d5bbea3d07c494705dc0960e58150651eeb024d9f837ea3350505b1a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 47e73563e6c55b47d6800bcc52e53e66c73b1d801f775b118dcc7aab8410c36f
MD5 2f06569bbb5d08c08955955c7191ffc0
BLAKE2b-256 0fd8e5cfbfd7f0d29c167dda2d014bd76ee3c4169000958948c73dd270c995c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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-22.1.5-py2.py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for clang_format-22.1.5-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a73a500dcabdac1ebc993b99f77fe61de967c7ab9c26d12d664f02def31f0464
MD5 f84ca619b2e454c0f0662eaf73623f66
BLAKE2b-256 6ff4eef03a87fe65a666bf8a1d9cf804addd5cd26eb225d4e270f22c20d832b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-22.1.5-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