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.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


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

Uploaded Python 2Python 3Windows ARM64

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

Uploaded Python 2Python 3Windows x86-64

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

Uploaded Python 2Python 3Windows x86

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

Uploaded Python 2Python 3macOS 11.0+ ARM64

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

File metadata

  • Download URL: clang_format-22.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.13

File hashes

Hashes for clang_format-22.1.8.tar.gz
Algorithm Hash digest
SHA256 61a23f4fc0ad1932e1b0300ca451108bf1e751eb89f478062d87f888db9190e6
MD5 fb80a38c657da7102d043505490d6161
BLAKE2b-256 bd55b48aba45ba2638a706df1680e3dcdf96f94aed8e884886192d411d7a0071

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 1fac18f32426c6fd7acde7087511bd80e2c549b2cd7477099582c216ae82fa63
MD5 7a7c4b4ce2021c7f1e6740fa65233ae8
BLAKE2b-256 43ca7e1fa4a6044c37c37356bb18fc938d2811754231e448aaffc192dc3774ce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5fe6ad3e9399d589aff5ead432568a84cdcbbd621f1708340819efd74cbf8176
MD5 97d5de5515e0509f176ea8902cfe2b0b
BLAKE2b-256 0860c6783b3190a8f741107a44912a11c39c1a51e254e86a4c43cb0151cea0dd

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: clang_format-22.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.13

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 a796192453ae56c61e975fc56ee7defb4187013fc3de798cbe608cfe326762aa
MD5 0c12db59c872c41c30f039a860a6e199
BLAKE2b-256 2e2b5a7f2fba71179331b51bb547a02808a56aa515f8637adf035fd34c1d3b0b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 734d22be5c9d3a72a841444817aae8168c8f4bdccb08de491f05673e42ec7304
MD5 071514f7a505b1f381d8678ff3e356d6
BLAKE2b-256 56e33fcba146f12b9fbad24034136718d113dfacac03b1cf8273b2aa7bd641b0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-musllinux_1_2_s390x.whl
Algorithm Hash digest
SHA256 41e00922840376f8d1239db8fb5bc6b1d313bd09752344a85b0f8071112e5c7e
MD5 36be1050da62358dfa1827e7043d7699
BLAKE2b-256 84056bd5e7bea1679dbed37a94a3b47d2ef0110792f64fd5761b2301d5b34fd2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 0223471f781647d476ce0e09a0512521043343313e42932d900f97a15eacb510
MD5 8dfb1e88e8c9712fda91a648ef391694
BLAKE2b-256 acf74a02e8f7d54f71c7ee4ce48c35cbe8f2be1afb1fbbca543f8db43f56a959

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 65df71f1eab12de161b9059483be55cb72490ec7fc7ca4915b5de49722a76a46
MD5 4a7a2980b9200b25699ccde71b4efa57
BLAKE2b-256 4099a5e00402fe8281754df679a1028132a28ea0c0024d363509d9c29944ab85

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 8fc6139349a64f82d24396c815f5584f56da8912482dceadd9e5d7a3f8c17d6c
MD5 d171bb53bef65999a627257457d2e83d
BLAKE2b-256 c16bfbb98122d35333012d47186d669c1bb9a1cb527faa9a4a12c43124662f8f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 02ff8ad2e6a60554cc6b9b34310f71adb04da39e94302e08e3a655b77e4dd31c
MD5 3704e3eeb0ec05116ff44a60100e9b4d
BLAKE2b-256 1b42423de2ddedd3e068f7b773d7a4a593266692bc6108a2dd8ad4403d2ae718

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-manylinux_2_31_armv7l.whl
Algorithm Hash digest
SHA256 396f66b2237131ae7c5c9a9c34d50b1b9bee60ec6754e8b0dcb943850c747aa6
MD5 6f1fc886b8275221ecc15c76ee73bc69
BLAKE2b-256 037c996fc84930d96db84418fbd16d3935ba77f42f9078d7610e4eae3e0e9294

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b00cff6bfd1f1686f073a4fdf1cb937dbd58bf7510c659477805c03afdea0816
MD5 e2059178f97dc2f8efcb33585aa6d893
BLAKE2b-256 e588b82c066fa807da4ca2518fecf79071361f6324b77375e5e92c059c0697fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl
Algorithm Hash digest
SHA256 7763ce0f45b5ff0b5ca7a830d6061ce431dcb644211f9b2bb483bfa66d6c78ca
MD5 c52f6e70fb88acc0ff8c3828f6c3fc1c
BLAKE2b-256 3694f7c185f2f7c9cbd60878a260a2a03cc4eef0b9b9fbe8eb5045fa9b5ccbe9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl
Algorithm Hash digest
SHA256 c6d7382dd728431c0cecf3c7db6ac0904e162c7c18889696ab8dc0630ff9349b
MD5 719db50604bcc4a19de6fffae118e9ac
BLAKE2b-256 5cb025fb71006b581c4e1dc4680b61c61842836dd1adb860e02f898deed8a919

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 07312f8a74bda89b6ce32fae46c589cd7bb210a5d3fb2829a70e28ff449f5b80
MD5 811cdcca0be652b836e7fda04130bf27
BLAKE2b-256 5d1976bf4dfba7d418f3da4fe89ace66856abd79c8c314e750d5f0fb754de6f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 48c3b8dcfe9d4e964ced0e744e0f1f8ddc711bce92e50f6cab21e10f54857d08
MD5 8d36045606d4d61c6278a8119f55462b
BLAKE2b-256 5025a9734da014eecc1f54c051ad643a28f2f6643dcc812ac59320e80e2b1a3b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d1147107222c0dda3e4869e9e8c4a79f9ed1de83819e5274de42b82adf3d2129
MD5 460f8cd4294c49b811b7f8c534148a8a
BLAKE2b-256 2e55539cc1036dae16659f50500ca34838cc5b16cd3e98e3faaf164186b98093

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-22.1.8-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fc2ac5bd0ea41af49968fb69426207806d5f7016cb8f4bfbd44f4f1ffe8d53f2
MD5 c0fafce3bd91f5331492e2e3d143ebc1
BLAKE2b-256 5dd829b9db6098da1a011ca3f7560c3942fa81404dbbb4367c3bd1d5c435da3b

See more details on using hashes here.

Provenance

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