gn-dist
Binary distributions of GN (generate-ninja) for Linux (glibc and musl).
Other systems are out of scope for this project. For Windows and macOS builds, please refer to Google CIPD.
Installation
python3 -m pip install gn-dist
# convenience wrapper script
GN_WRAPPER=$(which gn)
$GN_WRAPPER --version
# actual binary
GN_EXE=$(python3 -c "from gn_dist import GN; print(str(GN))")
$GN_EXE --version
# to add the actual binary to PATH, you can do e.g.:
GN_DIR="$(dirname $GN_EXE)" # or use GN.parent above
export PATH="$GN_DIR:$PATH"
# ^ add this to your ~/.bashrc if you want
Building
./build_gn.py automates the build process (run with --help for options, as usual).
gn-dist's setup implies building GN. Run e.g. pip install -v . or pyproject-build -wxn.
Set $BUILD_PARAMS to pass options to build_gn.py through the setup layer.
Versioning
gn-dist (and GN itself) use git to infer version info.
This is known to cause issues with shallow checkouts.
We recommend that you configure your clone of gn-dist in a way that allows git describe to do its job.
Where that is not possible (e.g. when installing from a tarball that does not contain the git repository), a src/gn_dist/VERSION file must be provided.
This is just a plain text file containing the version string that will be passed to gn-dist's PEP 517 build backend.
The version should be provided as a PEP 440 / PyPA specs compatible normalization of what would otherwise be returned by git describe.
The VERSION file is included in sdists and will be auto-generated where possible.
GN checkout is typically managed by gn-dist itself (which does a full clone), but if you insist on bringing your own copy of GN, you may need to provide a //out/last_commit_position.h file (relative to //sbuild/gn), in the following format:
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION_NUM %(num)s
#define LAST_COMMIT_POSITION "%(num)s (%(commit_id)s)"
#endif // OUT_LAST_COMMIT_POSITION_H_
where %(num)s is the commit number (counted from the initial commit), and %(commit_id)s the commit hash (truncated to the first 12 digits), as in
git describe HEAD --abbrev=12 --match initial-commit
Then edit build_gn.py to pass --no-last-commit-position to GN's build/gen.py.
Containerization
To manually build gn-dist in a manylinux2014 container, you can do e.g.:
docker run -v "${PWD}:/projects/gn-dist" --security-opt label=disable -it quay.io/pypa/manylinux2014_x86_64 bash
# this would test python 3.6 compatibility - to use a contemporary version of python, comment in the lines below instead
yum install -y python3
#manylinux-interpreters ensure cp314-cp314
#export PATH="/opt/python/cp314-cp314/bin:${PATH}"
manylinux-install-clang -v latest
python3 -m venv /projects/.venv
export PATH="$/projects/.venv/bin:${PATH}"
python3 -m pip install -U pip
python3 -m pip install -U setuptools wheel build auditwheel
python3 -m pip install -U ninja # scikit-build/ninja-python-distributions
cd /projects/gn-dist
./build_gn.py --help # informational
BUILD_PARAMS="-c clang --clang-path /opt/clang" python3 -m build -wxn
#auditwheel repair dist/gn_dist-*.whl
Updating (for maintainers)
To make a new release, first update the GN_REV in build_gn.py and rebuild locally.
Commit and push the changes. Then, assuming an editable install, run gn --version to determine the new version, and create a matching tag (add a minor cipher if it's a rebuild):
git tag -a VERSION -m "Release"
Once you're positive, push the tag. For maintainer convenience, pushing a tag that points to the HEAD of main will automatically trigger the build workflow with publish options enabled.
Once a release has been successfully published to GitHub, tag protection from immutable releases will lock the tag in place. However, if anything goes wrong before that, you may just revoke the tag as usual:
git tag -d VERSION
git push --delete origin VERSION
Then you can fix things up and eventually re-create the tag on another commit.
History
See below for some background why gn-dist was created:
- https://groups.google.com/g/pdfium/c/1__HW-wzJ8c/m/5MCYXAuDBQAJ
- https://chromium-review.googlesource.com/c/chromium/src/+/7593779/comments/fdd2633a_eb123349
- https://gn.googlesource.com/gn/+/88604adbcec2101f25b2e3ebd7f39b38163a6a33/README.md#versioning-and-distribution
Related work
If you are looking for PyPI builds of ninja,
scikit-build/ninja-python-distributions
is somewhat equivalent to this project.
Note though, it uses Kitware's fork of ninja, not the original version.
There is also loong64/gn, but for some reason refers to a little-known fork of GN, is not regularly updated, does not include musllinux builds, and is not Python packaged.
Metadata
Release files for gn-dist 2501
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gn_dist-2501.tar.gz | 8.1 kB | With provenance | Details for gn_dist-2501.tar.gz |
Built distributions (wheels)
Total release size: 26.3 MB
Release files / gn_dist-2501.tar.gz
| Download URL | gn_dist-2501.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f85dfdc4d843037a697acc50baa06e2fc5ac2076ee3b7dbe5625a50c4c76b78
|
|
BLAKE2b-256 checksum How to use checksums |
170ef0ebccc2fe114641f8720207106a97474f20d0a76800b82dc2d4ae927b75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-musllinux_1_2_x86_64.whl
| Download URL | gn_dist-2501-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
cc3a3d9da3b06d47a2af350a31ffd741e2145b5f831bba117a1baa246d51a8f6
|
|
BLAKE2b-256 checksum How to use checksums |
b939f1582e31d578ed752bc730258c2b959004227ea927b2ef4e40ec1d2df4c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-musllinux_1_2_s390x.whl
| Download URL | gn_dist-2501-py3-none-musllinux_1_2_s390x.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Linux musl 1.2+ IBM System/390x Python 3 |
|
SHA-256 checksum How to use checksums |
135b5bf442f1fadf818fa1202f03edfa5b199e9f052cb49172ddf86f44bd3f6f
|
|
BLAKE2b-256 checksum How to use checksums |
8c4aa3dcf72418360004422046ba770879b829238693160fdfe104779886b529
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-musllinux_1_2_riscv64.whl
| Download URL | gn_dist-2501-py3-none-musllinux_1_2_riscv64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Linux musl 1.2+ RISC-V 64 Python 3 |
|
SHA-256 checksum How to use checksums |
94df418b24432e6128efef8b9f63a4a3da67ae86dd77f4cf6d0e0f435a53d552
|
|
BLAKE2b-256 checksum How to use checksums |
38d5b329088b961bf657c76be3ea395b60e22a372c5d50b7ad4cf5629abe9159
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-musllinux_1_2_ppc64le.whl
| Download URL | gn_dist-2501-py3-none-musllinux_1_2_ppc64le.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Linux musl 1.2+ PowerPC 64-le Python 3 |
|
SHA-256 checksum How to use checksums |
0f4f33fa279bdea2322cde8c82bd105ac3baa65126abd527cdaa65907d916cc1
|
|
BLAKE2b-256 checksum How to use checksums |
d38880ea0bb502f4a714e734faa029a30a137c5be405a28b64368e24b239c1e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-musllinux_1_2_i686.whl
| Download URL | gn_dist-2501-py3-none-musllinux_1_2_i686.whl |
|---|---|
| Size | 3.0 MB |
| Tags | Linux musl 1.2+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
5dc82c85b7fa405d4490b3953134630e7908ba2c46a2b9ae79d2903f7f7c0f9a
|
|
BLAKE2b-256 checksum How to use checksums |
991a3549820fce1b1942a7ad94c6cd20131a8793b635b7b64ddf4664bdd263b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-musllinux_1_2_armv7l.whl
| Download URL | gn_dist-2501-py3-none-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Linux musl 1.2+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
4d2721b9b7be504df6e226bc1a76706c7344b1f0d3afc288b3a54a7fec475a97
|
|
BLAKE2b-256 checksum How to use checksums |
c83fe92066c79c8eae24c0d9c62a7fd2837cc8274f37895363e4a309a67aac6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-musllinux_1_2_aarch64.whl
| Download URL | gn_dist-2501-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
66c6cc1a85f5afac1b620d90bdcf3cf90cb4c259ad933d365bd877e49aade4ef
|
|
BLAKE2b-256 checksum How to use checksums |
f712eb5ce0e31c07e17a2380918be9642231ed7e367d1b02c6cd69b7a7f08a32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-manylinux_2_39_riscv64.whl
| Download URL | gn_dist-2501-py3-none-manylinux_2_39_riscv64.whl |
|---|---|
| Size | 995.3 kB |
| Tags | Linux glibc 2.39+ RISC-V 64 Python 3 |
|
SHA-256 checksum How to use checksums |
d65833579b04acc66338c9ef33b818c7285a85a473966f1eeab3624997f70137
|
|
BLAKE2b-256 checksum How to use checksums |
27405779caf0d894b9eece5c2d4c581547b9e8794e8c306b5b105afd61c0361b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-manylinux_2_35_armv7l.whl
| Download URL | gn_dist-2501-py3-none-manylinux_2_35_armv7l.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Linux glibc 2.35+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
dd8b6c2790120f65dc23c88d62914f8d6d9ad23aa8a9324bd983c511c8494d70
|
|
BLAKE2b-256 checksum How to use checksums |
e7df136cbd54ca2b1c21fa1b95e6f4c50a0cdc4266ed7900fc77c67f5abc489d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl
| Download URL | gn_dist-2501-py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Linux glibc 2.26+ x86-32 Linux glibc 2.28+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
860d9e7aa0d534d7e3048230053274f3e05ff27f23961ee92426a6607259949c
|
|
BLAKE2b-256 checksum How to use checksums |
007b434c37ba5fe20b5bc93eb4ca003e6c0f7650528f04253905c4585ddea918
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | gn_dist-2501-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
737e322cfebce39cb5a2a352308d9cbedc5381fc6f93bd52b9ed79bced6586cc
|
|
BLAKE2b-256 checksum How to use checksums |
503b9ea5e7ae20ac98d5eafe1359955dadfecd419fd0c4b2c24f7ced4a33624a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-manylinux_2_24_s390x.manylinux_2_28_s390x.whl
| Download URL | gn_dist-2501-py3-none-manylinux_2_24_s390x.manylinux_2_28_s390x.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Linux glibc 2.24+ IBM System/390x Linux glibc 2.28+ IBM System/390x Python 3 |
|
SHA-256 checksum How to use checksums |
6b32ffce95a871f87900dff7c3f0dfd9317a1a629dab01a29ad04d0eec71913d
|
|
BLAKE2b-256 checksum How to use checksums |
9d43000dddf689454b8ee33f08ef81dc779104846ce3da91267c7f3a38ab9afb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl
| Download URL | gn_dist-2501-py3-none-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Linux glibc 2.24+ PowerPC 64-le Linux glibc 2.28+ PowerPC 64-le Python 3 |
|
SHA-256 checksum How to use checksums |
3535a67cfc77c9c304e6b9a94aae188f05d722bf0612b9e9c0e92531010e5614
|
|
BLAKE2b-256 checksum How to use checksums |
58fb6538410bfb6e8fdf216649695c6369d4014006d3a23e936f574a4cbfb8ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / gn_dist-2501-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
| Download URL | gn_dist-2501-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
0b6d3c66bcada5ef4cc9a794351b93a450212fe0799bd6a9baf08b77c69f2cc1
|
|
BLAKE2b-256 checksum How to use checksums |
a106d1cc7d4f9a125ffccf08678ddd7f3efc785e666695831c26820bd0b5d6ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logSecurity for gn-dist 2501
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 15 files in this release have been uploaded with provenance metadata.
Attestation for gn_dist-2501.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.