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

In contrast to many other pre-commit hooks, the versioning of the hook matches the versioning of clang-format. You can choose any released minor version of LLVM >= 10.

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")
  • 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.

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

Uploaded Source

Built Distributions

clang_format-10.0.1.1-py2.py3-none-win_amd64.whl (888.8 kB view details)

Uploaded Python 2 Python 3 Windows x86-64

clang_format-10.0.1.1-py2.py3-none-win32.whl (724.6 kB view details)

Uploaded Python 2 Python 3 Windows x86

clang_format-10.0.1.1-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.0 MB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.17+ s390x

clang_format-10.0.1.1-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.6 MB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.17+ ppc64le

clang_format-10.0.1.1-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (998.5 kB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.17+ ARM64

clang_format-10.0.1.1-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (986.5 kB view details)

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

clang_format-10.0.1.1-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-10.0.1.1-py2.py3-none-macosx_10_9_universal2.whl (859.5 kB view details)

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

File details

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

File metadata

  • Download URL: clang-format-10.0.1.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for clang-format-10.0.1.1.tar.gz
Algorithm Hash digest
SHA256 016480cc99ff8fa9342672608b2e68f9eca9310407d248b1e7d8679c22dc6344
MD5 272e703521d5a88b6b196e7399eea853
BLAKE2b-256 65f66c33182b04fe9074beb3ea57b71d069692858087283a786aa9db53b634d0

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-10.0.1.1-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 888.8 kB
  • Tags: Python 2, Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for clang_format-10.0.1.1-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 fa1eb6ef143a072b0b350c9b4c74374fa88d93d5ddd8f4e6ad24b04442105990
MD5 f209dd51c2e993210abad292d4d03a05
BLAKE2b-256 17da8a32527c09b77fba26aae1a40837c35b42c321d5e7917862c466532f39c2

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-10.0.1.1-py2.py3-none-win32.whl
  • Upload date:
  • Size: 724.6 kB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for clang_format-10.0.1.1-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 d5e2807a3e2a5bfb07051a42deb93f4488661acaf02f2d99b5811fa4a43e20c1
MD5 22195938d1da1e3489ffac347995e7a2
BLAKE2b-256 209ef13aa219298ccbae3691624a3014ddd2d269950fa78aaaf1976052098a89

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-10.0.1.1-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 2, Python 3, manylinux: glibc 2.17+ s390x
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for clang_format-10.0.1.1-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 4696ce1dff189402ea64b9c1158b5058ef1fe2f06d78332a23980871f4c76234
MD5 cf9da41d142c79d1bed1b9e3fd506b7e
BLAKE2b-256 bfab008855a4cf65da825b5aa15c3971d591bfcb674d100b5ecc68edca1d8085

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-10.0.1.1-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 2, Python 3, manylinux: glibc 2.17+ ppc64le
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for clang_format-10.0.1.1-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 dc60fef84b74a3375cd768a39bdf145b268555b6998ca496588cd7471d0ed983
MD5 f5dd99748b54b3dfd01d59e8b399c341
BLAKE2b-256 1d6b52a11a066f0a643a64f4075abdedafa5612c9e2d3110b6f284d825e6514e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-10.0.1.1-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 998.5 kB
  • Tags: Python 2, Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for clang_format-10.0.1.1-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0df136ac7b5ca9aacec29f656dc7932031a0992594c96f0f386ab757db63c536
MD5 20dca15c575ab18b61e50f073e00dbc4
BLAKE2b-256 575435f1baf05ad2a6cc1863d438530745f8b2d2fb27b3bb83d045750c78503a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-10.0.1.1-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 986.5 kB
  • Tags: Python 2, Python 3, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for clang_format-10.0.1.1-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 aae62178afdd482c7b1171d666ef29baf22a583e71ade743093929db4ac245b4
MD5 46a9c2dab6780aa8516a20e0e4356e79
BLAKE2b-256 e54e51b96a7905d1e254bbb1df4894a22d0af1ffd4b2e9add5f6fba0cbdfeb2d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-10.0.1.1-py2.py3-none-manylinux_2_12_i686.manylinux2010_i686.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 2, Python 3, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for clang_format-10.0.1.1-py2.py3-none-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 402886a26608ea78d1f759aef71ba5d2f0459ebf2109aca88053e3dbd1fc8254
MD5 a6b470a1d8bb468f059955ce1c9177ba
BLAKE2b-256 8a1a2055e3765e1f60cb08a398fe13944489168c96eceaf3abcee89fd9275f94

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-10.0.1.1-py2.py3-none-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 859.5 kB
  • Tags: Python 2, Python 3, macOS 10.9+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for clang_format-10.0.1.1-py2.py3-none-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 222d6ca46ea8a68db1874ba7772f42efb6ffad4cdadf660da11d3e99a283ca4a
MD5 7bd4512641ecb9c08ee43da9809bd28f
BLAKE2b-256 53e0a056a996290c5b288c0b63ac884c095b9ab4fb3c4f29706d551c3130e070

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