From edd7cde4a88660adb9884f9cef62f9900472a26c Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 20 Jun 2025 11:03:37 -0400 Subject: [PATCH 1/3] feat: use 1.12.1 from Kitware fork Signed-off-by: Henry Schreiner --- .gitmodules | 2 +- README.rst | 2 +- docs/update_ninja_version.rst | 22 +++++++++++----------- ninja-upstream | 2 +- tests/test_ninja.py | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitmodules b/.gitmodules index b985034..fa0442c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "ninja-upstream"] path = ninja-upstream - url = https://github.com/ninja-build/ninja.git + url = https://github.com/Kitware/ninja.git diff --git a/README.rst b/README.rst index 8f437f2..d7580e4 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ Ninja Python Distributions `Ninja `_ is a small build system with a focus on speed. -The latest Ninja python wheels provide `ninja 1.13.0 `_ executable +The latest Ninja python wheels provide `ninja 1.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1 `_ executable and `ninja_syntax.py` for generating `.ninja` files. .. image:: https://raw.githubusercontent.com/scikit-build/ninja-python-distributions/master/ninja-python-distributions-logo.png diff --git a/docs/update_ninja_version.rst b/docs/update_ninja_version.rst index 1335a75..117b066 100644 --- a/docs/update_ninja_version.rst +++ b/docs/update_ninja_version.rst @@ -7,7 +7,7 @@ Updating the Ninja version A developer should use the following steps to update the version ``X.Y.Z`` of Ninja associated with the current Ninja python distributions. -Available Ninja archives can be found `here `_. +Available Ninja archives can be found `here `_. Nox prodedure ------------- @@ -29,17 +29,17 @@ Classic procedure: 2. Execute `scripts/update_ninja_version.py` command line tool with the desired ``X.Y.Z`` Ninja version available for download. For example:: - $ release=1.13.0 + $ release=1.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1 $ python scripts/update_ninja_version.py ${release} - Collecting URLs and SHA256s from 'https://github.com/ninja-build/ninja/archive/v1.10.0.gfb670.kitware.jobserver-1' - Downloading https://github.com/ninja-build/ninja/archive/v1.13.0.tar.gz - Downloading https://github.com/ninja-build/ninja/archive/v1.13.0.tar.gz - done - Downloading https://github.com/ninja-build/ninja/archive/v1.13.0.zip - Downloading https://github.com/ninja-build/ninja/archive/v1.13.0.zip - done - Collecting URLs and SHA256s from 'https://github.com/ninja-build/ninja/archive/v1.10.0.gfb670.kitware.jobserver-1' - done - Updating 'NinjaUrls.cmake' with CMake version 1.13.0 - Updating 'NinjaUrls.cmake' with CMake version 1.13.0 - done + Collecting URLs and SHA256s from 'https://github.com/Kitware/ninja/archive/v1.10.0.gfb670.kitware.jobserver-1' + Downloading https://github.com/Kitware/ninja/archive/v1.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1.tar.gz + Downloading https://github.com/Kitware/ninja/archive/v1.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1.tar.gz - done + Downloading https://github.com/Kitware/ninja/archive/v1.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1.zip + Downloading https://github.com/Kitware/ninja/archive/v1.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1.zip - done + Collecting URLs and SHA256s from 'https://github.com/Kitware/ninja/archive/v1.10.0.gfb670.kitware.jobserver-1' - done + Updating 'NinjaUrls.cmake' with CMake version 1.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1 + Updating 'NinjaUrls.cmake' with CMake version 1.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1 - done Updating README.rst Updating README.rst - done Updating docs/update_ninja_version.rst @@ -51,7 +51,7 @@ Classic procedure: 3. Create a topic named `update-to-ninja-X.Y.Z` and commit the changes. For example:: - release=1.13.0 + release=1.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1 git checkout -b update-to-ninja-${release} git add NinjaUrls.cmake README.rst docs/update_ninja_version.rst tests/test_ninja.py git commit -m "Update to Ninja ${release}" diff --git a/ninja-upstream b/ninja-upstream index b4d51f6..e64cee3 160000 --- a/ninja-upstream +++ b/ninja-upstream @@ -1 +1 @@ -Subproject commit b4d51f6ed5bed09dd2b70324df0d9cb4ecad2638 +Subproject commit e64cee3a0f0dd33039f4323b5ae4b857e63e00e7 diff --git a/tests/test_ninja.py b/tests/test_ninja.py index ae2cb75..fc781e8 100644 --- a/tests/test_ninja.py +++ b/tests/test_ninja.py @@ -36,13 +36,13 @@ def test_ninja_module(): def test_ninja_package(): - expected_version = "1.13.0" + expected_version = "1.12.1.git.kitware.jobserver-1.msvcdepfile-1" output = subprocess.check_output([sys.executable, "-m", "ninja", "--version"]).decode("ascii") assert output.splitlines()[0] == expected_version def test_ninja_script(): - expected_version = "1.13.0" + expected_version = "1.12.1.git.kitware.jobserver-1.msvcdepfile-1" scripts = _get_scripts() assert len(scripts) == 1 assert scripts[0].stem == "ninja" From 452116e95e85e95d69d03b7a61f9ea43523b7ca6 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 20 Jun 2025 11:28:59 -0400 Subject: [PATCH 2/3] fix: include .msvc-depfile conditionally Signed-off-by: Henry Schreiner --- tests/test_ninja.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_ninja.py b/tests/test_ninja.py index fc781e8..efaa6cc 100644 --- a/tests/test_ninja.py +++ b/tests/test_ninja.py @@ -13,6 +13,8 @@ from . import push_argv +MSVC_DEPFILE = ".msvcdepfile-1" if sys.platform.startswith("win32") else "" + def _run(program, args): func = getattr(ninja, program) args = [f"{program}.py", *args] @@ -36,13 +38,13 @@ def test_ninja_module(): def test_ninja_package(): - expected_version = "1.12.1.git.kitware.jobserver-1.msvcdepfile-1" + expected_version = f"1.12.1.git.kitware.jobserver-1{MSVC_DEPFILE}" output = subprocess.check_output([sys.executable, "-m", "ninja", "--version"]).decode("ascii") assert output.splitlines()[0] == expected_version def test_ninja_script(): - expected_version = "1.12.1.git.kitware.jobserver-1.msvcdepfile-1" + expected_version = f"1.12.1.git.kitware.jobserver-1{MSVC_DEPFILE}" scripts = _get_scripts() assert len(scripts) == 1 assert scripts[0].stem == "ninja" From ec860927520d8dc5513e1f54a7f5d131a94d7741 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 15:29:17 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_ninja.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_ninja.py b/tests/test_ninja.py index efaa6cc..2ddbffa 100644 --- a/tests/test_ninja.py +++ b/tests/test_ninja.py @@ -12,7 +12,6 @@ from . import push_argv - MSVC_DEPFILE = ".msvcdepfile-1" if sys.platform.startswith("win32") else "" def _run(program, args):