From d73ec5a640c50a02bafdfbcfcd4f83579d56e969 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 1 Sep 2026 11:16:03 -0400 Subject: [PATCH 1/2] docs: clarify what the package provides State that the package does not provide Python bindings to the ninja build engine, only the executable and upstream ninja_syntax.py, and that contributions are welcome. Document ninja.ninja() and ninja.BIN_DIR, and fix two typos. Closes #38 Assisted-by: ClaudeCode:claude-opus-5 --- README.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 727a55b..6dfcfdf 100644 --- a/README.rst +++ b/README.rst @@ -7,16 +7,22 @@ Ninja Python Distributions The latest Ninja python wheels provide `ninja 1.13.2.g7659b.kitware.jobserver-pipe-1 `_ executable and `ninja_syntax.py` for generating `.ninja` files. -The classes in ninja_syntax are in the ninja namespace, so are accesable via ``import ninja``, e.g. :: +The classes in ninja_syntax are in the ninja namespace, so are accessible via ``import ninja``, e.g. :: import ninja writer = ninja.Writer(sys.stdout) -This package also installs a front-end to the nijnja executable, so that:: +This package also installs a front-end to the ninja executable, so that:: python -m ninja -will call the executable. +will call the executable. You can also call it from Python with ``ninja.ninja()``, +which forwards ``sys.argv`` and exits with the ninja return code. The directory that +holds the executable is available as ``ninja.BIN_DIR``. + +The package does not provide Python bindings to the ninja build engine itself. It only +distributes the executable and the upstream ``ninja_syntax.py`` helper. Contributions +that add such bindings are welcome. .. image:: https://raw.githubusercontent.com/scikit-build/ninja-python-distributions/master/ninja-python-distributions-logo.png From 5d4ae3929d9ac7bd3eb4ead41790945f6d6ecd0c Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 1 Sep 2026 11:18:09 -0400 Subject: [PATCH 2/2] Apply suggestion from @henryiii --- README.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 6dfcfdf..2657f37 100644 --- a/README.rst +++ b/README.rst @@ -21,8 +21,9 @@ which forwards ``sys.argv`` and exits with the ninja return code. The directory holds the executable is available as ``ninja.BIN_DIR``. The package does not provide Python bindings to the ninja build engine itself. It only -distributes the executable and the upstream ``ninja_syntax.py`` helper. Contributions -that add such bindings are welcome. +distributes the executable and the upstream ``ninja_syntax.py`` helper. Since +this is only a redistribution, and should not be required if ninja is already +present, it is not the right place for bindings. .. image:: https://raw.githubusercontent.com/scikit-build/ninja-python-distributions/master/ninja-python-distributions-logo.png