Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
bef7e06
Initial commit: clang-apply-replacements wheel packaging
shenxianpeng Jun 12, 2026
bffbe4e
Update author and licensing information; remove unnecessary files
shenxianpeng Jun 12, 2026
3a39b73
chore: move dev deps to pyproject.toml, bump version to 9.0.0.0
shenxianpeng Jun 12, 2026
4bf6ea7
chore: migrate from clang-apply-replacements to clang-include-cleaner
shenxianpeng Jun 12, 2026
885e0e9
chore: set LLVM version to 22.1.7
shenxianpeng Jun 12, 2026
913c973
chore: bump default LLVM version to 13.0.0
shenxianpeng Jun 12, 2026
673b515
chore: bump min LLVM version to 14.0.0
shenxianpeng Jun 12, 2026
142e89f
fix: use YAML block scalar for multi-line run step in test-sdist job
shenxianpeng Jun 12, 2026
cc13947
chore: bump min LLVM version to 15.0.0
shenxianpeng Jun 12, 2026
070a8db
fix: use full LLVM version for clang headers path, bump to 16.0.0
shenxianpeng Jun 12, 2026
1868114
fix: remove broken clang headers install, drop unsupported musllinux …
shenxianpeng Jun 12, 2026
01aba0b
fix: add missing pipe in test suite run step
shenxianpeng Jun 13, 2026
13d708a
chore: revamp README with user-focused structure, add CONTRIBUTING.md…
shenxianpeng Jun 13, 2026
2f0ade7
chore: revamp README with user-focused structure, add CONTRIBUTING.md…
shenxianpeng Jun 13, 2026
6bc2c3f
chore: automate release workflow (prepare + auto-tag + monitor-llvm) …
shenxianpeng Jun 13, 2026
d1994d9
fix: delete stale remote release branch before pushing (#4)
shenxianpeng Jun 13, 2026
4a67e25
chore: release v17.0.0 (#5)
github-actions[bot] Jun 13, 2026
acd4f24
chore: release v17.0.6 (#7)
github-actions[bot] Jun 14, 2026
b56a6ba
Update README link to upstream documentation
shenxianpeng Jun 14, 2026
ffaea00
fix: undefine GCC14 __arm_streaming macro to fix aarch64 build (#8)
shenxianpeng Jun 14, 2026
cdf2147
Update clang-apply-replacements-wheel link
shenxianpeng Jun 14, 2026
6cf4124
Update link to clang-include-cleaner documentation
shenxianpeng Jun 14, 2026
e1b695d
docs: rework the README to the org layout and fix wrong facts (#9)
shenxianpeng Oct 1, 2026
cf88404
docs: rework the README to the org layout and fix wrong facts (#2)
shenxianpeng Oct 1, 2026
8d67d08
chore: bump GitHub Actions to current major versions
shenxianpeng Oct 15, 2026
775c392
chore: bump GitHub Actions to current major versions
shenxianpeng Oct 15, 2026
5ebd81b
fix: use build.verbose so wheels build with scikit-build-core 1.x (#11)
shenxianpeng Oct 16, 2026
d1ae3c0
ci: add shared stale workflow (#4)
shenxianpeng Oct 16, 2026
55c1d60
chore: add shared stale workflow (#12)
shenxianpeng Oct 16, 2026
ff0356b
Initial commit
shenxianpeng Oct 22, 2026
1a46442
chore: limit workflow token permissions and pin actions to SHAs (#13)
shenxianpeng Oct 22, 2026
0c2f414
chore: limit workflow token permissions and pin actions to SHAs (#5)
shenxianpeng Oct 22, 2026
13fde82
feat: publish ccache as Python wheels (#1)
shenxianpeng Oct 22, 2026
70123d6
chore: rename the PyPI publish workflow to publish.yml (#6)
shenxianpeng Oct 22, 2026
28bbdce
chore: rename the PyPI publish workflow to publish.yml (#15)
shenxianpeng Oct 22, 2026
8181826
fix: tag the riscv64 wheel manylinux_2_31 so uv installs it (#3)
shenxianpeng Oct 22, 2026
5dbe690
feat!: publish to PyPI as ccache-bin (#4)
shenxianpeng Oct 23, 2026
97d48d3
chore: set up MSVC with a Node 24 action and apply zizmor suggestions…
shenxianpeng Oct 31, 2026
b4acce7
chore: target LLVM 23.1.4 and fix CI warnings and docs (#7)
shenxianpeng Oct 31, 2026
e9f3c58
fix: make the LLVM monitor and the release chain work (#16)
shenxianpeng Nov 1, 2026
1dbdf08
chore: release v23.1.4 (#17)
shenxianpeng Nov 1, 2026
c4eb6bb
fix: use build.verbose for scikit-build-core 1.x (#8)
shenxianpeng Nov 1, 2026
f5ed0e3
chore: release v23.1.5 (#19)
github-actions[bot] Nov 6, 2026
4a8b1ea
chore: target LLVM 23.1.5 (#9)
shenxianpeng Nov 6, 2026
025d9fd
feat: update ccache to 4.14.3 and open a pull request for new release…
shenxianpeng Nov 10, 2026
39507d8
feat: build a wheel on pull requests and close the LLVM issue after a…
shenxianpeng Nov 10, 2026
4f06d14
feat: add the release chain and a build check on pull requests (#10)
shenxianpeng Nov 11, 2026
10cf475
chore: bump version to 23.1.6 (#12)
github-actions[bot] Nov 17, 2026
3df5c4c
fix: let one flaky wheel build not cancel the release (#13)
shenxianpeng Nov 17, 2026
502c6c8
fix: retry pip longer when the build container loses DNS (#22)
shenxianpeng Nov 17, 2026
833d662
fix: build the manylinux i686 wheel on Ubuntu 24.04 (#14)
shenxianpeng Nov 17, 2026
383b89b
fix: build the manylinux i686 wheel on Ubuntu 24.04 (#23)
shenxianpeng Nov 17, 2026
a9d75af
refactor: build and test the wheels with the shared cpp-linter workfl…
shenxianpeng Nov 30, 2026
e3489b6
chore: bump the actions group across 1 directory with 4 updates (#14)
dependabot[bot] Nov 30, 2026
6ed58dd
feat!: repackage the static binaries with hatch-prebuilt instead of b…
shenxianpeng Dec 1, 2026
78f8c41
feat!: repackage the static binaries with hatch-prebuilt instead of b…
shenxianpeng Dec 1, 2026
c893430
refactor: release with the shared cpp-linter wheel workflows (#16)
shenxianpeng Dec 1, 2026
a39e224
refactor: configure the build in pyproject.toml and share the automat…
shenxianpeng Dec 1, 2026
bd0497c
refactor: share the automation from cpp-linter/wheels (#17)
shenxianpeng Dec 1, 2026
eef607e
refactor: configure the build in pyproject.toml and share the automat…
shenxianpeng Dec 1, 2026
5fc82a4
feat: update ccache to 4.14.4 (#18)
cpp-linter-publisher[bot] Dec 1, 2026
051ee44
chore: import clang-include-cleaner-wheel into packages/clang-include…
shenxianpeng Dec 4, 2026
9c4dac9
refactor: build clang-include-cleaner here, in packages/clang-include…
shenxianpeng Dec 4, 2026
d414124
chore: import clang-apply-replacements-wheel into packages/clang-appl…
shenxianpeng Dec 4, 2026
eab6a64
refactor: build clang-apply-replacements here, in packages/clang-appl…
shenxianpeng Dec 4, 2026
4bbedf7
chore: import ccache-wheel into packages/ccache-bin
shenxianpeng Dec 4, 2026
9761a59
refactor: build ccache-bin here, in packages/ccache-bin
shenxianpeng Dec 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/binary-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ jobs:
if: inputs.hatch-prebuilt
env:
HATCH_PREBUILT: ${{ github.workspace }}/${{ inputs.hatch-prebuilt }}
run: python -m pip install "$HATCH_PREBUILT"
# With the extra for recipes whose upstream signs its releases.
run: python -m pip install "$HATCH_PREBUILT[minisign]"
- name: Download the binaries built by the calling workflow
if: inputs.binaries-artifacts
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,24 @@ clangd --version

| Package | Tools | |
| --- | --- | --- |
| [clang-apply-replacements](packages/clang-apply-replacements) | clang-apply-replacements | [![PyPI](https://img.shields.io/pypi/v/clang-apply-replacements?label=&labelColor=454a63&color=007ec6)](https://pypi.org/project/clang-apply-replacements/) |
| [clang-include-cleaner](packages/clang-include-cleaner) | clang-include-cleaner | [![PyPI](https://img.shields.io/pypi/v/clang-include-cleaner?label=&labelColor=454a63&color=007ec6)](https://pypi.org/project/clang-include-cleaner/) |
| [clangd-bin](packages/clangd-bin) | clangd | [![PyPI](https://img.shields.io/pypi/v/clangd-bin?label=&labelColor=454a63&color=007ec6)](https://pypi.org/project/clangd-bin/) |
| [llvm-cov](packages/llvm-cov) | llvm-cov, llvm-profdata | [![PyPI](https://img.shields.io/pypi/v/llvm-cov?label=&labelColor=454a63&color=007ec6)](https://pypi.org/project/llvm-cov/) |

**Other tools**, repackaged unchanged from their upstream releases:

| Package | Tools | |
| --- | --- | --- |
| [ccache-bin](packages/ccache-bin) | ccache | [![PyPI](https://img.shields.io/pypi/v/ccache-bin?label=&labelColor=454a63&color=007ec6)](https://pypi.org/project/ccache-bin/) |

**Build tooling**:

| Package | What it is | |
| --- | --- | --- |
| [hatch-prebuilt](packages/hatch-prebuilt) | The hatchling plugin that builds every wheel here from prebuilt binaries | [![PyPI](https://img.shields.io/pypi/v/hatch-prebuilt?label=&labelColor=454a63&color=007ec6)](https://pypi.org/project/hatch-prebuilt/) |

Moving here from their own repositories:
[clang-include-cleaner](https://github.com/cpp-linter/clang-include-cleaner-wheel),
[clang-apply-replacements](https://github.com/cpp-linter/clang-apply-replacements-wheel),
[ccache-bin](https://github.com/cpp-linter/ccache-wheel) and
[include-what-you-use](https://github.com/cpp-linter/include-what-you-use-wheel).
Moving here next: [include-what-you-use](https://github.com/cpp-linter/include-what-you-use-wheel).

Each package's releases are tagged `<package>-v<version>`: see
[the releases of clangd-bin](https://github.com/cpp-linter/wheels/releases?q=clangd-bin), for
Expand Down
21 changes: 21 additions & 0 deletions packages/ccache-bin/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 cpp-linter

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
86 changes: 86 additions & 0 deletions packages/ccache-bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# ccache-bin

[![PyPI](https://img.shields.io/pypi/v/ccache-bin?labelColor=454a63&color=007ec6)](https://pypi.org/project/ccache-bin/)
[![ci](https://img.shields.io/github/actions/workflow/status/cpp-linter/wheels/ci.yml?branch=main&label=ci&labelColor=454a63)](https://github.com/cpp-linter/wheels/actions/workflows/ci.yml)
[![part of cpp-linter](https://img.shields.io/badge/part%20of-cpp--linter-ffc20a?labelColor=454a63)](https://cpp-linter.github.io/)

[ccache](https://ccache.dev), the C/C++ compiler cache, as Python wheels on PyPI
(`ccache-bin`). The wheels contain the official ccache binaries, unchanged, and install the
`ccache` command.

[Website](https://cpp-linter.github.io/) ·
[PyPI](https://pypi.org/project/ccache-bin/) ·
[ccache manual](https://ccache.dev/manual/latest.html) ·
[Discussions](https://github.com/orgs/cpp-linter/discussions)

## Quick start

```bash
pip install ccache-bin # or: uv tool install ccache-bin
ccache --version
```

The package is called `ccache-bin` because the name `ccache` is not available on PyPI. The
command it installs is still `ccache` (with uvx: `uvx --from ccache-bin ccache --version`).

## Usage

With CMake:

```bash
cmake -B build -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
```

Or put `ccache` in front of the compiler:

```bash
ccache gcc -c hello.c -o hello.o
```

`ccache` is installed straight into the environment's `bin/` (`Scripts\` on Windows), with no
Python wrapper in between. A cached compile took about 3 ms with the binary and about 18 ms
through a Python wrapper. See the [ccache manual](https://ccache.dev/manual/latest.html) for
configuration and remote storage.

## Supported platforms

| Platform | Architecture | Wheel tag |
|----------|-------------|-----------|
| **macOS** 10.15+ / 11.0+ | Intel (x86_64) and Apple Silicon (arm64) | `macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2` |
| **Linux** (glibc 2.17+ and musl) | x86_64 | `manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64` |
| **Linux** (glibc 2.17+ and musl) | aarch64 | `manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64` |
| **Linux** (glibc 2.31+ and musl) | riscv64 | `manylinux_2_31_riscv64.musllinux_1_1_riscv64` |
| **Linux** (glibc 2.17+ and musl) | s390x | `manylinux_2_17_s390x.manylinux2014_s390x.musllinux_1_1_s390x` |
| **Windows** | 64-bit | `win_amd64` |

The Linux wheels use the upstream static musl builds, so one wheel works on both glibc and musl
distributions. Upstream has no binaries for Windows ARM64, 32-bit Windows or other Linux
architectures, so there are no wheels for them.

The wheel version is the ccache version, for example `4.14.2`. A packaging-only fix is released
as `4.14.2.post1`.

## Acknowledgements

[ccache](https://github.com/ccache/ccache) is written by Joel Rosdahl and the ccache
contributors. The wheels contain the binaries from the
[ccache releases](https://github.com/ccache/ccache/releases): each archive is checked against
the ccache release signing key before it is packaged. This is not an official ccache project, so
report problems with ccache itself [upstream](https://github.com/ccache/ccache/issues).

## Contributing

This package lives in [cpp-linter/wheels](https://github.com/cpp-linter/wheels), with the other
C and C++ tools that cpp-linter packages as wheels.
[Open an issue](https://github.com/cpp-linter/wheels/issues) for packaging bugs and feature
requests, and see the [contributing guide](https://github.com/cpp-linter/wheels/blob/main/CONTRIBUTING.md)
for how the wheels are built and released: a bot releases every new ccache version on its own.

## License

The files in this directory are released under the
[MIT License](https://github.com/cpp-linter/wheels/blob/main/packages/ccache-bin/LICENSE). ccache, and so the
wheels, are under the [GNU General Public License v3.0 or later](https://ccache.dev/license.html):
the wheels carry its license files, and every
[release](https://github.com/cpp-linter/wheels/releases?q=ccache-bin) of ccache-bin includes the
matching ccache source archive and its signature.
1 change: 1 addition & 0 deletions packages/ccache-bin/ccache_version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.14.4
150 changes: 150 additions & 0 deletions packages/ccache-bin/hatch_build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
"""How the ccache wheels are built: hatch-prebuilt does the work, this file
says where the files come from.

Each wheel holds the official ccache binary for one platform, unchanged, its
man page and license files. The archives are checked against their minisign
signature and the ccache release key before anything is used.

Pick the platform with CCACHE_PLATFORM (one of `python hatch_build.py
platforms`); without it, the platform of the build machine is used:

CCACHE_PLATFORM=windows-x86_64 python -m build --wheel

`python hatch_build.py source DIR` saves the signed ccache source archive,
which every release ships next to the wheels (GPL-3.0-or-later).
"""

from __future__ import annotations

import shutil
from pathlib import Path

from hatch_prebuilt import (
Platform,
Recipe,
Staged,
cached_download,
extract,
verify_minisign,
)

DOWNLOAD_URL = "https://github.com/ccache/ccache/releases/download/v{version}/{name}"
# Release signing key published on https://ccache.dev/download.html
# (also https://ccache.dev/minisign.pub, key id 7C55E705DB25EF17).
MINISIGN_PUBLIC_KEY = "RWQX7yXbBedVfI4PNx6FLdFXu9GHUFsr28s4BVGxm4BeybtnX3P06saF"


def linux(arch: str, tag: str, elf: str = "") -> Platform:
"""A Linux wheel from the upstream musl static build, which runs on any
Linux (old glibc distributions and Alpine alike), so one wheel serves both
the manylinux and the musllinux tags."""
return Platform(
f"linux-{arch}-musl-static",
tag,
f"elf-{elf or arch}",
"linux",
"arm64" if arch == "aarch64" else arch,
{"archive": "tar.gz"},
)


class Ccache(Recipe):
name = "ccache"
version_file = "ccache_version.txt"
platform_variable = "CCACHE_PLATFORM"
# One uv target per platform: CI checks that uv picks a wheel for each.
uv_targets = (
"x86_64-manylinux_2_17",
"aarch64-manylinux_2_17",
"riscv64-unknown-linux",
"x86_64-unknown-linux-musl",
"aarch64-unknown-linux-musl",
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-pc-windows-msvc",
)
platforms = (
# The macOS binary is universal (x86_64 10.15+, arm64 11.0+).
Platform(
"darwin",
"macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2",
"macho-universal",
"macos",
"universal",
{"archive": "tar.gz"},
),
linux("x86_64", "manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64"),
linux(
"aarch64",
"manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64",
),
# uv only accepts manylinux_2_31 or newer for riscv64, the first glibc
# with a manylinux image for it.
linux("riscv64", "manylinux_2_31_riscv64.musllinux_1_1_riscv64"),
linux("s390x", "manylinux_2_17_s390x.manylinux2014_s390x.musllinux_1_1_s390x"),
Platform(
"windows-x86_64",
"win_amd64",
"pe-x86_64",
"windows",
"x86_64",
{"archive": "zip"},
),
)

def download(self, version: str, name: str) -> bytes:
"""Download an upstream file and check its minisign signature."""
url = DOWNLOAD_URL.format(version=version, name=name)
data = cached_download(url, self.cache / name)
minisig = cached_download(f"{url}.minisig", self.cache / f"{name}.minisig")
verify_minisign(data, name, minisig, MINISIGN_PUBLIC_KEY)
return data

def stage(self, platform: Platform, version: str) -> Staged:
upstream = self.upstream_version(version)
stem = f"ccache-{upstream}-{platform.name}"
kind = platform.extra["archive"]
files = extract(self.download(upstream, f"{stem}.{kind}"), kind, stem)
if "GPL-3.0.txt" not in files: # the Windows archive has no copy
source = self.download(upstream, f"ccache-{upstream}.tar.gz")
files["GPL-3.0.txt"] = extract(source, "tar.gz", f"ccache-{upstream}")["GPL-3.0.txt"]
binary = f"ccache{platform.exe}"
return Staged(
scripts={binary: files[binary]},
licenses={name: files[name] for name in ("GPL-3.0.txt", "LICENSE.md") if name in files},
data={"share/man/man1/ccache.1": files["ccache.1"]} if "ccache.1" in files else {},
)

def release_notes(self, version: str) -> str:
"""The release links the upstream release notes, the signed binaries
and the source code attached to it (GPL-3.0 section 6)."""
upstream = self.upstream_version(version)
anchor = upstream.replace(".", "_")
return (
f"Python wheels of [ccache {upstream}]"
f"(https://ccache.dev/releasenotes.html#_ccache_{anchor}), repackaged unchanged"
" from the [signed upstream binaries]"
f"(https://github.com/ccache/ccache/releases/tag/v{upstream}).\n\n"
f"```bash\npip install ccache-bin=={version}\n```\n\n"
f"The wheels are on [PyPI](https://pypi.org/project/ccache-bin/{version}/) and"
" attached below, together with the corresponding ccache source code"
f" (`ccache-{upstream}.tar.gz` and its `.minisig` signature).\n"
)

def commands(self):
def source(args: list[str]) -> int:
upstream = self.upstream_version(self.wheel_version())
name, out = f"ccache-{upstream}.tar.gz", Path(args[0])
out.mkdir(parents=True, exist_ok=True)
(out / name).write_bytes(self.download(upstream, name))
shutil.copyfile(self.cache / f"{name}.minisig", out / f"{name}.minisig")
return 0

return {"source": source}


RECIPE = Ccache(Path(__file__).parent)
get_metadata_hook, get_build_hook = RECIPE.hooks()

if __name__ == "__main__":
raise SystemExit(RECIPE.main())
80 changes: 80 additions & 0 deletions packages/ccache-bin/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[build-system]
requires = ["hatchling>=1.27", "hatch-prebuilt[minisign]>=0.3,<1"]
build-backend = "hatchling.build"

[project]
name = "ccache-bin"
description = "ccache, the C/C++ compiler cache, packaged as Python wheels"
readme = "README.md"
license = "GPL-3.0-or-later"
# Staged from the upstream archives by hatch_build.py during the build.
license-files = ["upstream/GPL-3.0.txt", "upstream/LICENSE.md"]
authors = [{ name = "Joel Rosdahl and the ccache contributors" }]
maintainers = [{ name = "Xianpeng Shen", email = "xianpeng.shen@gmail.com" }]
keywords = ["ccache", "compiler", "cache", "c", "c++", "build"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: C",
"Programming Language :: C++",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Compilers",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://ccache.dev"
Documentation = "https://ccache.dev/documentation.html"
Changelog = "https://ccache.dev/releasenotes.html"
Upstream = "https://github.com/ccache/ccache"
Source = "https://github.com/cpp-linter/wheels/tree/main/packages/ccache-bin"
Issues = "https://github.com/cpp-linter/wheels/issues"

[dependency-groups]
build = ["build", "hatch-prebuilt[minisign]>=0.3,<1"]
dev = [{ include-group = "build" }, "pre-commit"]

# hatch_build.py (with hatch-prebuilt) sets the version from
# ccache_version.txt, downloads and verifies the upstream ccache files
# (metadata hook), then puts the binary and its man page into the wheel
# (build hook).
[tool.hatch.metadata.hooks.custom]

[tool.hatch.build.targets.wheel]
# Only the files added by the build hook, plus the license files.
bypass-selection = true
core-metadata-version = "2.4"

[tool.hatch.build.targets.wheel.hooks.custom]

# How this repository's CI builds, tests and releases the package; see
# scripts/_packages.py.
[tool.wheels]
version-file = "ccache_version.txt"
upstream = "ccache"
latest-command = "gh api repos/ccache/ccache/releases/latest --jq .tag_name"
# The ccache source code goes into the GitHub release next to the wheels
# (GPL-3.0 section 6).
release-files-command = "python hatch_build.py source release"
moved-from = "cpp-linter/ccache-wheel"
# Upstream builds ccache for Windows x86_64 only. The smoke test compiles a
# file, with cl.exe on Windows.
msvc = true
runners = [
{ name = "Linux x86_64", os = "ubuntu-latest" },
{ name = "Linux aarch64", os = "ubuntu-24.04-arm" },
{ name = "macOS x86_64", os = "macos-15-intel" },
{ name = "macOS arm64", os = "macos-latest" },
{ name = "Windows x86_64 (MSVC)", os = "windows-latest" },
]
# The images need a C compiler too.
containers = [
{ name = "Alpine x86_64 (musl)", os = "ubuntu-latest", image = "alpine:3.21", platform = "linux/amd64", setup = "apk add --no-cache python3 gcc musl-dev", python = "python3" },
{ name = "Alpine aarch64 (musl)", os = "ubuntu-24.04-arm", image = "alpine:3.21", platform = "linux/arm64", setup = "apk add --no-cache python3 gcc musl-dev", python = "python3" },
{ name = "manylinux2014 x86_64 (glibc 2.17)", os = "ubuntu-latest", image = "quay.io/pypa/manylinux2014_x86_64", platform = "linux/amd64", python = "/opt/python/cp312-cp312/bin/python" },
{ name = "Alpine riscv64 (QEMU)", os = "ubuntu-latest", image = "alpine:3.21", platform = "linux/riscv64", qemu = "riscv64", setup = "apk add --no-cache python3 gcc musl-dev", python = "python3" },
{ name = "Alpine s390x (QEMU)", os = "ubuntu-latest", image = "alpine:3.21", platform = "linux/s390x", qemu = "s390x", setup = "apk add --no-cache python3 gcc musl-dev", python = "python3" },
]
Loading
Loading