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

Uploaded Python 2Python 3Windows ARM64

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

Uploaded Python 2Python 3Windows x86-64

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

Uploaded Python 2Python 3Windows x86

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

Uploaded Python 2Python 3macOS 11.0+ ARM64

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

File metadata

  • Download URL: clang_format-22.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 f323ab7524ee01120fa6f09ec863fda6d1f487ed43829e04b675f6bfcd9962fb
MD5 a05b2a3ddd00aeae59682ced09993309
BLAKE2b-256 ad5bf5340d83571a1d143482a05e795d9257b93ca5c834000a04bfc554cbd27b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 b927c8aa664eb8ee86ca60e16fdc75fb297a1de6ed6a166ea115715fc4432f6f
MD5 2997bf2bc5cb9f3c40ce66a21e4d492f
BLAKE2b-256 3a361ea815770ed1e03ba9de46901b58c2d34aae2667d526cf027cf85c7dd82a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 cdc110e41ab8caee24207cc96a49523a5b9339b3ddb66386b66580949d7e8626
MD5 625ca68783a6417d41f727f344c48f9a
BLAKE2b-256 4de47beeae56045ede41470f369079a28d59a71d88f74ccac01267edfbeb9999

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: clang_format-22.1.4-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.4-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 2281371d2008b7745a0d434be0edcc6529393a4c35fc28a41722f11cc44aa289
MD5 0909de669d8ac4e9d0c5a51dd13998fe
BLAKE2b-256 da04d5fc1ba7d6fc437eb6d818e70882c6b4b6e63fc6827eaa09359ecaa7c5a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 103a5ce901248a9bf97edac12189c628c6b3148dca885b9fe9fc1fc06179fb34
MD5 901d4810c5fe2d5408b756f985233fca
BLAKE2b-256 a8b25d159f4520b3c92c3c562fb626edd0309470e2a24fe305cd70ede62b3365

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-musllinux_1_2_s390x.whl
Algorithm Hash digest
SHA256 98aa8850ee0a1b4d8cb88b6471f8cd4fdb5a40981cecacb4f8ab015be5784e75
MD5 f1f83249978e324a3cee9790454dd050
BLAKE2b-256 a3d28ba37872782f34e0eb1364f636a75ed31e8683e0a72f608913481ad257b7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 c34080906726500d0b6241d5babcd76e4c5499e76d02a93fbff0b979f8578c44
MD5 66c0bdc88d03fcf7154260abf87da032
BLAKE2b-256 032e90c7fc02235b3671b56f247603ff9fc1e9a784591dcc8c42681a3d000757

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 ab474acdc4e67b3592b87dd7f4e47930dee0fad2157d768d00579b6336d4cfeb
MD5 255c635e4215cd7e74c100b858b50410
BLAKE2b-256 a32f991656f53a4aaa3ca757332eee2bf5d0d833dbedbe1b9c1756b65634819a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 a61bb15b908f7b5e258b066c82384c42e6dec29087843a34cb31cf5d5cc45cc3
MD5 e36d5c6b5b65a6342b1beab1ee6696b2
BLAKE2b-256 34b045f5286d28770d930dac137418262778daee2ece6ca3000ce4df7592a897

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 66e9d3d0300181f2ba5ec978a67c6387b7b2ce40aa6dfcbf554008b190fdedb9
MD5 a4e75c40ec6f71beed139c5b28282d30
BLAKE2b-256 ac44d90d6494d11a26519236a72dc6110fc2d65338c58c9a063929299092399b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-manylinux_2_31_armv7l.whl
Algorithm Hash digest
SHA256 ae8b8a550824fe100fb70c25fa7c83f81ab8b18e9ce405f34bf7d8d24babdc35
MD5 3222405556dbbced7df3b8a40c381ce4
BLAKE2b-256 462e1b9c59ab6a0d39dedd3d0565fc8eebee5aef6ff979ab27fa4b847f673723

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e1c6e5c2db317e04e4b37831e6645f049a7a3272637298dea6cb0b063af4f5f
MD5 15263ac9e31d379535313e6c36212e44
BLAKE2b-256 b6c96da08737bf8efe5ae036bae1c659d6673e74f03ac1169fa31a5beb50a90b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl
Algorithm Hash digest
SHA256 eda6e1927ca0e87fd4b76941ce5d70ba9fea9d9a0a1c3ac7bd81f0cd38c22bf6
MD5 b9775a56a4b0bb817614c8a83d76d392
BLAKE2b-256 6f8e0b792d49f856a61dcb29eea69c6330f7e817882c113cb3908cff3acad708

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl
Algorithm Hash digest
SHA256 451e214f5125eb1db7ada239cf4b85cd85d18787eeb382e0a890f3822d808cc2
MD5 662c150710f70631b4e07a9b3e20bd71
BLAKE2b-256 adb2b27ef287b3dfcdb3987584d66a7550a75dd51099b477e70387cf8b865508

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 6074708c4aca3935fcc2d933bb8bd6e74c5521b46ff2db22474983b04c20425d
MD5 5891af348ba146432e5f2619243b0b10
BLAKE2b-256 822fe9547ce090c96d3480a9013edea4d3e5819b7453be5e778ede4ae4703bf6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8ef5acb06c1c0556dbdf2827eb21b70dc4225b474b179f81744cc7b305ae8dbd
MD5 567377d3c9a9edec5d606b2061602510
BLAKE2b-256 e99b9f455804d85fe001cdadceed6bfff00af47f082da2facba6cfd9e41e1aa7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 68ba07b0887e4757e15660d94bd60bd51bfdb4393471c181806319020da995b1
MD5 edae16076fb3135567b46d7087aa187e
BLAKE2b-256 65eff18b9b84f44ae0f6d98994643b36558c22139f744a784a1614c9a45f26f4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.4-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 02f25e66efa2641d888a5ae1480db41103e3cb817be698bc30cee5f759a242b9
MD5 cabfa2efde43a595e9b393fa1154a36d
BLAKE2b-256 45690de8f71b9e06a1a1d5ef2509bb0e11a5806c0f6fdb81073b3ccb7a5d46ae

See more details on using hashes here.

Provenance

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