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

Uploaded Python 2Python 3Windows ARM64

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

Uploaded Python 2Python 3Windows x86-64

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

Uploaded Python 2Python 3Windows x86

clang_format-22.1.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-py2.py3-none-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

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

File metadata

  • Download URL: clang_format-22.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 f3e6b7b6ae452895fa62abaaefff39972a4bdbd54838465a1e43a318abf39dcd
MD5 d6e506f6c55f2255d77a45e96993f04c
BLAKE2b-256 aa2c7a0060f64d83e2bb207e60ef7ab51089640bedee463f9cb60fe65aaaee54

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 0537608618d95d2a0e36020effbfb0cdf1260a1f68bf6ae809c714aa0c02ca48
MD5 76c33654d8326ec4fae24f23668270d3
BLAKE2b-256 afc7c856c78ffcc2663b43d3a437d6f8cdd4390e5f95c7950943222e3981c3f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 426453233bea583775542da9b859de6e088bf32b4f393527fc5b05bbc7d33ae3
MD5 e400547646ea13ffeba0936eff08faa3
BLAKE2b-256 8607e5a31c0865e1e10d591c4e511e0db79873c0cf48bb62c3934543295b6f5a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: clang_format-22.1.3-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.3-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 4af7b6ce6daf5753921cfa5da9543e49b341dab3c44ad397a391323adf2b57a1
MD5 11d6f8e4c99409ef53721a4a3aef7498
BLAKE2b-256 af5311106e28e84d1d969dc1d76c555d8cd76a5515c0177ceede3b621a671f82

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e9529956de1667fabab85a81d45ae3673976caadb62d4e73080135df3e00a8bb
MD5 f752bac415d965384395fae3170829a8
BLAKE2b-256 78f97e4d0459fd506a578604754592a0538ee4fef46772af0f35cc95aa4b5342

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-musllinux_1_2_s390x.whl
Algorithm Hash digest
SHA256 fb6e0a964ba3f9f7f4343e50813a6f2e04a08b12fc64865a4cfecd44c4ab8743
MD5 7780b0ea4266e312c6c8f2c20270dc0e
BLAKE2b-256 8ad094e8e1e8df874c0e245ca808ac3f5885539ad98f5d9cfcec7dfe7a34d27f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 8fa64db33c98ad31362c70e3b8c92156423d6669ab0902feda5046584d6761f3
MD5 189110aff09c4181f3356056f8c87fad
BLAKE2b-256 9a5e56d719dc9ec605858bad436bdd930165b45fd7e88556b9e89bba2baf028b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 00a86d64cea85a7cdf3028d779e96753c2ad407ba2a65a790904d85951a8a2ed
MD5 5604ab40000fad0965308c074fe6ddec
BLAKE2b-256 22ee7bd75aa17aade79f1317727ad936df4e66094cad51f36118e9c586a6bd10

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 1681784734973099f6d8723f6fc881f15ef1fcf63a3107cf58d86917d41a808e
MD5 ec3cff9fe19dca9de78a1f1aea992860
BLAKE2b-256 d8b114f2d898c2ff0ab2ccc60919ca67904a749e1a8fbfb944acecda63d60a9d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4bcb55c63ef3ecbc19c8dd8abe67b02d6ea410da70f5e0b1aca046e810ecad19
MD5 297431b8e6efe1a821995e9e277dbed2
BLAKE2b-256 69b86c0a96ac179bd9068cc228b94939cbf990583799baa6dd11c3893a1d0155

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-manylinux_2_31_armv7l.whl
Algorithm Hash digest
SHA256 2e581a0cfbc0f4dd260b32e53d4a991d2dc57b8b700a65761fc351c079bd937a
MD5 bbf266e2011ed13031a76a44c598dd03
BLAKE2b-256 d51f50e6350cef11359ec736205867fd56a3763c21d44f7cc4dc1108e64c4f90

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c392ff9936446d81c625c8dc774c71be259f5b47fccf96dd307cefa8deb7a1ef
MD5 f018d1f6a6a0c905d4d1a5667113a387
BLAKE2b-256 10514c42c4e4cba0d26ba896812690f938a161b85ecda4ff7adc7bd9fabfa4c4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl
Algorithm Hash digest
SHA256 f43bc9196609cc5f72fcf3178e927b535fe58739a231dd5eb2879ac11a7145e6
MD5 218778208474ced52d3c6c4235f561d5
BLAKE2b-256 44cf27a0b00662a40a9ef7c5f0ce6cb4b23a6f312f8c1910d9f22b8d12da55d3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl
Algorithm Hash digest
SHA256 786bed4f57419e49a6311dba528b8cf6d5fc0246643691e3892836ad710dec86
MD5 095819944702e9225df05a8f4b2f3a84
BLAKE2b-256 8026bffc137a4a6b8ef2de31b597986b5b0dac9e511fbbbfdef6e6055199030f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 103e05da2c79873d89fc5db75c757a9b88937be2b34a1e4b5e63c720b9ccb5ce
MD5 765bf0c0417374b26d5e4648076ba198
BLAKE2b-256 d2c40d74f4cd4ac2fe18afea21a90c262717c920826134c4b0ba4829057d3e77

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a78cb0a9bb3ae94042f7763a0123fd79faab5e29b08ae32f1f3051c2dc3cb8c1
MD5 3bf60269b81e626ca8334bdac3fc3b3f
BLAKE2b-256 8970fbcd04748965d1552d42207eca2bd4e4a7662673aea7f50478ca70e9c89e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 817013a40b24493361db8cec236d63ce776bc64f6e9ff613ec329292f9e8c411
MD5 d3423d15c6d5c863b38ba6da5d590bfd
BLAKE2b-256 fa248c45cc9c5d55a1044f1771ecf63cbb88ec5df1c7a90d6867d12b578db203

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.3-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a7227ff08636f70307c99fe597fab16fb915dd0e160712022220c308ae52d9a2
MD5 466d2061328cd147e4f70c3f6c344365
BLAKE2b-256 ab0c3130270492d7e511a6e3a1a45b2ab038059057bd8e48b4371d8e951fa02e

See more details on using hashes here.

Provenance

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