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

Uploaded Source

Built Distributions

clang_format-11.1.0.1-py2.py3-none-win_amd64.whl (910.6 kB view details)

Uploaded Python 2 Python 3 Windows x86-64

clang_format-11.1.0.1-py2.py3-none-win32.whl (742.5 kB view details)

Uploaded Python 2 Python 3 Windows x86

clang_format-11.1.0.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-11.1.0.1-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.7 MB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.17+ ppc64le

clang_format-11.1.0.1-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-11.1.0.1-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.0 MB view details)

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

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

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

File details

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

File metadata

  • Download URL: clang-format-11.1.0.1.tar.gz
  • Upload date:
  • Size: 8.5 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-11.1.0.1.tar.gz
Algorithm Hash digest
SHA256 0d1ec838fc335d3102888bbbcd0bd0774a0f459ce1af1c233cbd7aefaa055e7d
MD5 44dc9ed5dfef15885248c54ff7edda0f
BLAKE2b-256 3830267c46f17b536b5e93b47aee4231a0270115a04c71243115fa3c7cbc953d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-11.1.0.1-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 910.6 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-11.1.0.1-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d26620fa30e2289e4e6aaa5d607cde281d6c24e388f970b245b439ad48d75191
MD5 0d027f069cb7c5bec99de374d1a9701a
BLAKE2b-256 93b7ddc54c9f4c86b3280f4334d7af2ddb18fb33d1ed93721873328f516f782e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-11.1.0.1-py2.py3-none-win32.whl
  • Upload date:
  • Size: 742.5 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-11.1.0.1-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 0ebc9b51db01baa31f7c0e07705711adcfa5475ed31323174f110dfc61b1aa2b
MD5 11aa31826f434c2bc43dd2ae5ee583e2
BLAKE2b-256 d0d45c228fcf2d8f3792de24123d63275857bcca0dbfae3ea77bded622de4f1d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-11.1.0.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-11.1.0.1-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 42330d50d2a0dec22374368c9f2d9ae6084062f8ac649a13e6d9c5871e4dab37
MD5 14c71677f98862d0a052adf2ca883bdc
BLAKE2b-256 853265d7dd87202e35abd5f44090c536afd120a363e992cac6774d1ea907e470

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-11.1.0.1-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
  • Upload date:
  • Size: 1.7 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-11.1.0.1-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 61f8e9a605e03b44150874c165c2ec8a56fc898ad6ed9f013819946ccb284e57
MD5 845e27d6c82c1fe328e69af8194ce7e9
BLAKE2b-256 9824f9270f3f2b2fb99920cf211868433195cf9ce166f886905466dcfc317ffc

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-11.1.0.1-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.0 MB
  • 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-11.1.0.1-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3e54d3b8afebc062bda6116b38f65cae6240e175ee0ab418cd818296234d1045
MD5 282ea6ea67a5c03f0db10cceac648238
BLAKE2b-256 c1a7f11972623ae28e733a146f6b5ab51a87f5ee87b0b4cbb4d2973a80252e98

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-11.1.0.1-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • 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-11.1.0.1-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b474905f60cf2866d00ba8cc3d1f7c10e8aaebc425c5323f8db18c03a280f61c
MD5 528a6bd15b8ecd0190c76f403a4dd6f6
BLAKE2b-256 ccc626bfbcf434a9c89073c95c1b970dc8e9c89749850c094d098e64c08b2735

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-11.1.0.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-11.1.0.1-py2.py3-none-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 7ad10d9bd88d5fca58ed701144cbc9d4e3995a51554db70c341edef2f0c939df
MD5 5e99269f25c7ac9ad1d0efba52fbb21f
BLAKE2b-256 cc9036525bed3d15bec079ce496e83d029b84dcb6e5d968ddc34f1c3dc37d6f9

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clang_format-11.1.0.1-py2.py3-none-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 889.6 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-11.1.0.1-py2.py3-none-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 95f22a41d9e2eb2972f8cb547b2c621ab6862067c14ab22946d5607fff005dc7
MD5 956ce6ee0c1fccd2844b8fa963dcb6fe
BLAKE2b-256 08ff8ce1d4da31b1689418cb41db0c6c5a5495a445d8ac110429ffce36c713a7

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