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: v20.1.7
  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-20.1.7.tar.gz (11.5 kB view details)

Uploaded Source

Built Distributions

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

Uploaded Python 2Python 3Windows ARM64

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

Uploaded Python 2Python 3Windows x86-64

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

Uploaded Python 2Python 3Windows x86

clang_format-20.1.7-py2.py3-none-musllinux_1_2_x86_64.whl (2.9 MB view details)

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

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

Uploaded Python 2Python 3musllinux: musl 1.2+ s390x

clang_format-20.1.7-py2.py3-none-musllinux_1_2_ppc64le.whl (3.2 MB view details)

Uploaded Python 2Python 3musllinux: musl 1.2+ ppc64le

clang_format-20.1.7-py2.py3-none-musllinux_1_2_i686.whl (3.1 MB view details)

Uploaded Python 2Python 3musllinux: musl 1.2+ i686

clang_format-20.1.7-py2.py3-none-musllinux_1_2_aarch64.whl (2.8 MB view details)

Uploaded Python 2Python 3musllinux: musl 1.2+ ARM64

clang_format-20.1.7-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.17+ x86-64

clang_format-20.1.7-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.8 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.17+ s390x

clang_format-20.1.7-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.7 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.17+ ppc64le

clang_format-20.1.7-py2.py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (2.0 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.17+ i686

clang_format-20.1.7-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.17+ ARM64

clang_format-20.1.7-py2.py3-none-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

clang_format-20.1.7-py2.py3-none-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded Python 2Python 3macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for clang_format-20.1.7.tar.gz
Algorithm Hash digest
SHA256 2b0d76b9bf1f993bad33d2216b5fce4c407bc748fa31659ab7f51ca60df113c9
MD5 cf289fc5bb69ff6e97f5ec9fd6bcb4a4
BLAKE2b-256 a7afe138e1be1812ce0261ceaf5695e7d4299fa4d5085e1ed16e9157c4cda3ea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 d11c62d38b9144d30021b884b0f95e7270a6bcbf4f22bdd7dae94a531d82fbba
MD5 306c0b77636fee17db6a878132f3061c
BLAKE2b-256 88935242ed23c0ec6b2e28509452b41c732789822c9e5aa4a899e406f9d15d64

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4a9b909b1a9eb0b91aae51fdeeeb013ce20f9079d2e0fa8b8381e97c268dc889
MD5 1c88deabc9c0b86c842d47e3154c2df3
BLAKE2b-256 310da3685e3287d3ff3676297da331d7a05110dee049c773af2d6a1f5c8df0b0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: clang_format-20.1.7-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.12.8

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 7bd56bd0f519959488977dcddddba4e4fd07cba6225ed09ad658caa1f7286d1f
MD5 a8fe0afc891000d54b5642486fdf0e13
BLAKE2b-256 5ce85f105c2195fe565b9b5203f533f6d727a73d98ef3b295e3f2f01ddf5d847

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6db0b7271af8cbc2656b3b6b31e4276d5c6b8ceafb1981760f4738cfbe0a9e43
MD5 68498569c7a2edc5f757c02d270d72b6
BLAKE2b-256 64df8668d80685b0556fead8ecc9ff221574d9f2b4011a68da155c54acab6dc6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-musllinux_1_2_s390x.whl
Algorithm Hash digest
SHA256 29f5fe39e60579ca253d31c1122ce06a80716400ec7e5dc38833da80f88dbbd5
MD5 94a00e070c96998a0d06c8a966704c1f
BLAKE2b-256 daa63ae4861b2fd3eba3b47d46e5c31b4dac0065a8048dc77825a85ac141e991

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 11431cb437ed22be85744ea47b3a6801bc61de7ac4b775bf1cb89ee190c992d4
MD5 3c73e882feab7e88ff23642a6639806c
BLAKE2b-256 0b93b5dc2959423b203f8a8db35ff7f19a114c50df265728714dcaf90d779d4f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 9cd4d64dc0e34b23badad0ce3a235fb5c8ac63651d9f91d1c806356212cbca6c
MD5 696928fff7baaced85df5fc02a35ce84
BLAKE2b-256 1c228f98cf57f54a06ff3a08dd79fba25617a4495614b6458bc69e46e81caa96

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4c05114a10efe85c11fde518fe0fadc2977ce4a997a26ceaac88521daee83bbd
MD5 0b638ef80dd5b18b1284525fc8dddadd
BLAKE2b-256 842e04009020237243f8785188810ee33bc9ce0773e3ccba2599768381dac088

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 99cbfb99dab836027498190f55e543bed51bae33ae6dc256861e7aa91368de98
MD5 2db541ee17922b25f6a60aa9f4411d81
BLAKE2b-256 8b7f55985595ffbf9bcec64ad36e9a0451cf8556ba0fb1a80781943de106cfa3

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-20.1.7-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_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-20.1.7-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 d79484ce2c8f621242046c4bb0aefd49445ec5c7bc3c404af97490289791b777
MD5 de104ec3394acd95727024c36c073653
BLAKE2b-256 c0fd7d7462d307d8827de0b8b183b3b467643e14c61e880b5485e7aa80a11db7

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-20.1.7-py2.py3-none-manylinux_2_17_s390x.manylinux2014_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-20.1.7-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 bd144f093b4a3ac8a0f0d0ebb9b013974884d9da0627b9905949c6f3213aa850
MD5 ada1efe2260bcca7a067e974c10dffda
BLAKE2b-256 da1ffc0fe12a27153370ca55490bedd29f11611b1a1336779472dec5f3d6af94

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-20.1.7-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_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-20.1.7-py2.py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b27ed7fe674e8a77461c8d5b117ed96021aa18233917b3fe54b95391e0b22d04
MD5 a02a1c8461ec0fcc33b44d342cc92d62
BLAKE2b-256 548f33a426e3b61cff30e4d8d7173508da277ece67296428b7657da681c821d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-20.1.7-py2.py3-none-manylinux_2_17_i686.manylinux2014_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-20.1.7-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1dad1e6f9eb732b76046bf5810c6ee78b9e6cd6b3616cb75d9bde06ecd3222e6
MD5 f79a1d237a6ca09106a39a773a1a3a7d
BLAKE2b-256 19c16777ef4eafa63d35dda0cda2803e818d17a0a9fe3216837eab1f169afbee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e5257e8188569e4e47fceb3ba3317b0b44dc5ab5046c8cc2d58c626430c747a6
MD5 185b86a7e39876b93a8a0471d21800c2
BLAKE2b-256 a08cae7bc9122a2c7505506bba4aae9d9f38c01435b735a38c65985d30efc943

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for clang_format-20.1.7-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 70a904719a1bd6653d77ddc6d7b40418845912a1a2a419b9116b819a6b619f8c
MD5 d2a891ee815c2305ea373ddb7fb992aa
BLAKE2b-256 98c7d6b6b2f37e559cefc07426170368ddb5951753b7a831668666c5d91d6b79

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_format-20.1.7-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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page