Skip to main content

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:

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gn_dist-2407.3.tar.gz (8.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gn_dist-2407.3-py3-none-musllinux_1_2_x86_64.whl (2.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

gn_dist-2407.3-py3-none-musllinux_1_2_s390x.whl (2.2 MB view details)

Uploaded Python 3musllinux: musl 1.2+ s390x

gn_dist-2407.3-py3-none-musllinux_1_2_riscv64.whl (2.0 MB view details)

Uploaded Python 3musllinux: musl 1.2+ riscv64

gn_dist-2407.3-py3-none-musllinux_1_2_ppc64le.whl (2.2 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ppc64le

gn_dist-2407.3-py3-none-musllinux_1_2_i686.whl (3.0 MB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

gn_dist-2407.3-py3-none-musllinux_1_2_armv7l.whl (2.2 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

gn_dist-2407.3-py3-none-musllinux_1_2_aarch64.whl (2.5 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

gn_dist-2407.3-py3-none-manylinux_2_39_riscv64.whl (990.3 kB view details)

Uploaded Python 3manylinux: glibc 2.39+ riscv64

gn_dist-2407.3-py3-none-manylinux_2_35_armv7l.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ ARMv7l

gn_dist-2407.3-py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl (1.8 MB view details)

Uploaded Python 3manylinux: glibc 2.26+ i686manylinux: glibc 2.28+ i686

gn_dist-2407.3-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.7 MB view details)

Uploaded Python 3manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

gn_dist-2407.3-py3-none-manylinux_2_24_s390x.manylinux_2_28_s390x.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.24+ s390xmanylinux: glibc 2.28+ s390x

gn_dist-2407.3-py3-none-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl (1.2 MB view details)

Uploaded Python 3manylinux: glibc 2.24+ ppc64lemanylinux: glibc 2.28+ ppc64le

gn_dist-2407.3-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (1.5 MB view details)

Uploaded Python 3manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file gn_dist-2407.3.tar.gz.

File metadata

  • Download URL: gn_dist-2407.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for gn_dist-2407.3.tar.gz
Algorithm Hash digest
SHA256 13610468665cdde8bdf66ce26b0387c25f73067cbb101687afbfe9a88beadadb
MD5 39d33cfe1c666c92445b987e1a69bb13
BLAKE2b-256 cd71359dc0a5f790ac8941eff08090d6e3b576ec51c0d3049746d73c106e7c41

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3.tar.gz:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f503858ab6992315c78df3fbab62bac99c178840a4a3aff81fa855f3a0ef6f66
MD5 3b67406f07197aa8deca749347e6c500
BLAKE2b-256 e8e6264b2d4d343ce378ac80df74d86445c120669f34d483b20c9df0bdfd5256

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-musllinux_1_2_x86_64.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-musllinux_1_2_s390x.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-musllinux_1_2_s390x.whl
Algorithm Hash digest
SHA256 f8dafa3e1d2521f57e1a444f4ecd9786a32a27ae7638425320d002b7ca419244
MD5 60e74f92223ce3987f748a8a2bc16d08
BLAKE2b-256 add76b7d8ccf7aa8bcf29b8bfd5480df5241ae8f8c46d6b914d710d3039b7406

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-musllinux_1_2_s390x.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-musllinux_1_2_riscv64.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-musllinux_1_2_riscv64.whl
Algorithm Hash digest
SHA256 8f6daa84103cd3d13c1f0d69578283d5c103347a2da10d2859158587b368ac1e
MD5 ecd0b9c10e072d5f11b3dafc05013d37
BLAKE2b-256 2cf2b8b396bfdb57ada097bc1db966bec9166d4755c277333bcd65a52987c1db

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-musllinux_1_2_riscv64.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-musllinux_1_2_ppc64le.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 ef3711ac8df1b2b0162b2ebf02add97011cc1ff8a442105c517990d7a1ec308f
MD5 b22d6b5205ae4b5d5b3c933fb8190d00
BLAKE2b-256 00b36bbe4875afde05bbdc92b824c3fe2781381d3ddff7179592bed87583d200

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-musllinux_1_2_ppc64le.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 04e58de2d09d8678a4d31c90675cbbccea7973106bae1d3a81917bdb9cdcca73
MD5 62a103fd5a52a0ad9e7bb18d6729e56d
BLAKE2b-256 496df4be82d426f528b750e7a1cd84c46ca20a3044fbb4cb691d2dd73898d685

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-musllinux_1_2_i686.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 79669c82a367beda8d85cf90b1c83a689d14d4908b0ca07a4e556dd7019681c2
MD5 0c71b6085d936bdbb01da4fe9083e7c4
BLAKE2b-256 ef31362325bdf22ed2d5605f24bba61e83afbc51e83a2706ef91980ffb52542a

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-musllinux_1_2_armv7l.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 aa74dccfc3a1088434867151f90cdbb61abff92a479627ef1d6af21a2cf5e7d2
MD5 9d0230968764ecc828c3c2ee59c3caac
BLAKE2b-256 cdaf3da43c76f69a5454db87ecb1da8d71e8c4589f4df63e1ab9b05371da8310

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-musllinux_1_2_aarch64.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-manylinux_2_39_riscv64.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-manylinux_2_39_riscv64.whl
Algorithm Hash digest
SHA256 ba6b1b73ec4ea310779316a10f4c9bd40b15702d14c3589cd140d1067d6c0f6a
MD5 0429d6be36b012801af9bdb5a833e75a
BLAKE2b-256 a1bc574c990f65e83341ac71d970a0062d50f43b3e55c5d3ce68672d25a3dc46

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-manylinux_2_39_riscv64.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-manylinux_2_35_armv7l.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-manylinux_2_35_armv7l.whl
Algorithm Hash digest
SHA256 8652d013bf06e10749f50d3dcd139347272f4b53209bfebdfa2ed4eec72a5797
MD5 04546596615d191c6957439cb0187dc4
BLAKE2b-256 7a1efd50d1b4c13868cd7b90beb77ecb45c25aad2de1a83d99d54328c349ce16

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-manylinux_2_35_armv7l.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 cb4dfeebec75fade93d55a971237a076fec4e10698a696806f509bb971fb911a
MD5 9aa39e9ac33bc74fe1d51f7bd1041d6b
BLAKE2b-256 d8bb5f5f8426049049dbaa93d0d48f80e58db6d98af88cb10e9852182f0edf0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f4c7a0dd5d9c3f4aa951927a3568c5d9a4b2d7a2a2ba4a782812f059a3d5d600
MD5 b4c035d08196c334bd708c57e80d5867
BLAKE2b-256 ce12425b3e2d5f47f85413987d76c41e49cd862426883cb979d0dbac94742810

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-manylinux_2_24_s390x.manylinux_2_28_s390x.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-manylinux_2_24_s390x.manylinux_2_28_s390x.whl
Algorithm Hash digest
SHA256 7857c01b5f3c5585cba15e673d445eb069c42e2a690dd6fcebf7c1a9ae21f043
MD5 5ad763f10e3a96bf91a15a414704fa08
BLAKE2b-256 4b4b3423cc4893717a20471aabfff9de016da7ddb2f1666eb860c27269a4a933

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-manylinux_2_24_s390x.manylinux_2_28_s390x.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl
Algorithm Hash digest
SHA256 a2295c1d97c978f101d0c5e3416207d885ed8845394788c2fc935f03fcc00286
MD5 8fef776af2e05aa7392305940d6c280c
BLAKE2b-256 ff04ade0104b0a255bedfd661cbbc7a386fb492cf8a0d97401fab0edd9070ead

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gn_dist-2407.3-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gn_dist-2407.3-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2b2b64cff9845f95c9d710a694a44a3491b81c0968bd977979d781334688d0d9
MD5 a2a15803bd2b069ca435da43eee363b4
BLAKE2b-256 93c241dec53f4bad530728eb260cf99da68ca7e288fc210863a70a51a7a53ece

See more details on using hashes here.

Provenance

The following attestation bundles were made for gn_dist-2407.3-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build.yaml on pypdfium2-team/gn-dist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2501

15 files

This release

2407.3 This release

15 files

2407.2

14 files

2407.1

15 files

2407

15 files

2385.1

15 files

2385

15 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page