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/ssciwr/clang-format-precommit
  rev: v13.0.0
  hooks:
  - id: clang-format

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:

On manual triggers, the following input variables are available:

  • use_qemu: Whether to build targets that require emulation (default: true)
  • llvm_version: Override the LLVM version (default: "")
  • wheel_version: Override the wheel packaging version (default "0")

Acknowledgments

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 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-13.0.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distributions

clang_format-13.0.0-py2.py3-none-win_amd64.whl (2.0 MB view details)

Uploaded Python 2 Python 3 Windows x86-64

clang_format-13.0.0-py2.py3-none-win32.whl (2.0 MB view details)

Uploaded Python 2 Python 3 Windows x86

clang_format-13.0.0-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (982.7 kB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.17+ s390x

clang_format-13.0.0-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.0 MB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.17+ ppc64le

clang_format-13.0.0-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.0 MB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.17+ ARM64

clang_format-13.0.0-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (960.0 kB view details)

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

clang_format-13.0.0-py2.py3-none-manylinux_2_12_i686.manylinux2010_i686.whl (1.1 MB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.12+ i686

clang_format-13.0.0-py2.py3-none-macosx_10_9_universal2.whl (831.4 kB view details)

Uploaded Python 2 Python 3 macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file clang-format-13.0.0.tar.gz.

File metadata

  • Download URL: clang-format-13.0.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for clang-format-13.0.0.tar.gz
Algorithm Hash digest
SHA256 cc0c5e791f180ad5141d800834f6041862ef6179213b6bd7fcd5296719490ac0
MD5 50422c2cb62fef7e33d721051ddd5115
BLAKE2b-256 811a236ddebc69e7d878dc81519147d51cb2155266e0061ab49a8c5761b4a398

See more details on using hashes here.

Provenance

File details

Details for the file clang_format-13.0.0-py2.py3-none-win_amd64.whl.

File metadata

  • Download URL: clang_format-13.0.0-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 2, Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for clang_format-13.0.0-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 3d613b5c68847a8425dd44578ce7216a25fd8235a48ba4f4f70b37ec80d2d319
MD5 ef89c19185ae7cc464a33e079bd86b84
BLAKE2b-256 2e438c231f200afed35b36ce884c07df2b708b64f1e84e7a7c0bb0a8b278be18

See more details on using hashes here.

Provenance

File details

Details for the file clang_format-13.0.0-py2.py3-none-win32.whl.

File metadata

  • Download URL: clang_format-13.0.0-py2.py3-none-win32.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for clang_format-13.0.0-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 934a77d8f0c1820091bad16faf71dc9887c02a3854d202c51b83cf059011c02a
MD5 a65e12605667a5e99575df949552386c
BLAKE2b-256 d6231d6798d498fed0421a95946afcb44a47b676c9a2cae6c897dd08000fcfa3

See more details on using hashes here.

Provenance

File details

Details for the file clang_format-13.0.0-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for clang_format-13.0.0-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 3483f3a578b13bcd31c72dd06de49cbc478052611b90371e6d76e302ba763f99
MD5 c30da398d76106326fba7902002089ef
BLAKE2b-256 03ff76524934e9be64294bbf01ad6adb642a8c1134416f11ecee671f85311b98

See more details on using hashes here.

Provenance

File details

Details for the file clang_format-13.0.0-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for clang_format-13.0.0-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 b8b09158ace5a8155f8a0c0cb75d4140091ab3d95f42b07c7d89c9989666bc88
MD5 e7149e1b409b6e1b850940fc3c10a845
BLAKE2b-256 9446edcd121aa0b1decccbeffa216f3c86002bfc130bcdf774fab792f66e3dfe

See more details on using hashes here.

Provenance

File details

Details for the file clang_format-13.0.0-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for clang_format-13.0.0-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9146981b7f32e39614afc1f92aa460480d568e6ec1c7c2f3dfbe2bf3922b19d7
MD5 e34d9d8586c7f9a8e5a349790db56339
BLAKE2b-256 d39a623a6ab24134157eb45bc6400eae7b2795099053ce04ae4fdbccade1e246

See more details on using hashes here.

Provenance

File details

Details for the file clang_format-13.0.0-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for clang_format-13.0.0-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e978ad130d2b540e013784d96252ca89e45a42337faa1bbf5a7db9bf40c37a5c
MD5 1c0ade36d537259d303bc5494534307b
BLAKE2b-256 82edd8a5af59e151006a32f23c08bccbcf1e919b9a4ef72c240b740c0e8cb65c

See more details on using hashes here.

Provenance

File details

Details for the file clang_format-13.0.0-py2.py3-none-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for clang_format-13.0.0-py2.py3-none-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 5bd10c0860a82b2806fad11d161d26f45290b56fdc4e2feaac64e16565482388
MD5 aec5b51f960d96465f765ed9b04c29ac
BLAKE2b-256 04fc831aec2978fd04940d8c6a1bc8580f62ce6af86e4aeaad71bdefd1250c33

See more details on using hashes here.

Provenance

File details

Details for the file clang_format-13.0.0-py2.py3-none-macosx_10_9_universal2.whl.

File metadata

  • Download URL: clang_format-13.0.0-py2.py3-none-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 831.4 kB
  • Tags: Python 2, Python 3, macOS 10.9+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for clang_format-13.0.0-py2.py3-none-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b7f9824065e1b4d6a1bc5d0000a5550929be63e8bb05252892fbe858130e5167
MD5 e2d288bf9c7a1f01059bbb0eb7c6f04a
BLAKE2b-256 2ca6085544c6a6d2b8218661fd70a9a52e925673454fa7333c9b481409cb244d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page