From edd7cde4a88660adb9884f9cef62f9900472a26c Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 20 Jun 2025 11:03:37 -0400 Subject: [PATCH 1/8] 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/8] 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/8] [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): From 25ccdad36b42d9c52f6deece350132d0dc3d0e20 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 2 Aug 2025 09:15:37 +0200 Subject: [PATCH 4/8] Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks" This reverts commit ec860927520d8dc5513e1f54a7f5d131a94d7741. --- tests/test_ninja.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_ninja.py b/tests/test_ninja.py index 2ddbffa..efaa6cc 100644 --- a/tests/test_ninja.py +++ b/tests/test_ninja.py @@ -12,6 +12,7 @@ from . import push_argv + MSVC_DEPFILE = ".msvcdepfile-1" if sys.platform.startswith("win32") else "" def _run(program, args): From c7ea0b86a73a3ad30c4656afeebf8a2cca6cbb37 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 2 Aug 2025 09:15:41 +0200 Subject: [PATCH 5/8] Revert "fix: include .msvc-depfile conditionally" This reverts commit 452116e95e85e95d69d03b7a61f9ea43523b7ca6. --- tests/test_ninja.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_ninja.py b/tests/test_ninja.py index efaa6cc..fc781e8 100644 --- a/tests/test_ninja.py +++ b/tests/test_ninja.py @@ -13,8 +13,6 @@ 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] @@ -38,13 +36,13 @@ def test_ninja_module(): def test_ninja_package(): - expected_version = f"1.12.1.git.kitware.jobserver-1{MSVC_DEPFILE}" + 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 = f"1.12.1.git.kitware.jobserver-1{MSVC_DEPFILE}" + expected_version = "1.12.1.git.kitware.jobserver-1.msvcdepfile-1" scripts = _get_scripts() assert len(scripts) == 1 assert scripts[0].stem == "ninja" From 501e547bc88e197399ae1ac455e05d1f99a7a1c7 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 2 Aug 2025 09:34:45 +0200 Subject: [PATCH 6/8] feat: use 1.13.0 from Kitware fork --- README.rst | 2 +- docs/update_ninja_version.rst | 16 ++++++++-------- ninja-upstream | 2 +- tests/test_ninja.py | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.rst b/README.rst index d7580e4..aee5ac4 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.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1 `_ executable +The latest Ninja python wheels provide `ninja 1.13.0.gd74ef.kitware.jobserver-pipe-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 117b066..288b159 100644 --- a/docs/update_ninja_version.rst +++ b/docs/update_ninja_version.rst @@ -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.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1 + $ release=1.13.0.gd74ef.kitware.jobserver-pipe-1 $ python scripts/update_ninja_version.py ${release} 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 + Downloading https://github.com/Kitware/ninja/archive/v1.13.0.gd74ef.kitware.jobserver-pipe-1.tar.gz + Downloading https://github.com/Kitware/ninja/archive/v1.13.0.gd74ef.kitware.jobserver-pipe-1.tar.gz - done + Downloading https://github.com/Kitware/ninja/archive/v1.13.0.gd74ef.kitware.jobserver-pipe-1.zip + Downloading https://github.com/Kitware/ninja/archive/v1.13.0.gd74ef.kitware.jobserver-pipe-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 'NinjaUrls.cmake' with CMake version 1.13.0.gd74ef.kitware.jobserver-pipe-1 + Updating 'NinjaUrls.cmake' with CMake version 1.13.0.gd74ef.kitware.jobserver-pipe-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.12.1.ge64ce.kitware.jobserver-1.msvcdepfile-1 + release=1.13.0.gd74ef.kitware.jobserver-pipe-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 e64cee3..d74efef 160000 --- a/ninja-upstream +++ b/ninja-upstream @@ -1 +1 @@ -Subproject commit e64cee3a0f0dd33039f4323b5ae4b857e63e00e7 +Subproject commit d74efef9fa331d3ae60b62479d49254827c081fe diff --git a/tests/test_ninja.py b/tests/test_ninja.py index fc781e8..bac8be4 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.12.1.git.kitware.jobserver-1.msvcdepfile-1" + expected_version = "1.13.0.git.kitware.jobserver-pipe-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.12.1.git.kitware.jobserver-1.msvcdepfile-1" + expected_version = "1.13.0.git.kitware.jobserver-pipe-1" scripts = _get_scripts() assert len(scripts) == 1 assert scripts[0].stem == "ninja" From 4b9d7ec58e410a7fa659d67be1e6d0f4c6f61f27 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 2 Aug 2025 09:53:48 +0200 Subject: [PATCH 7/8] fix: skip Jobserver.ParseNativeMakeFlagsValue test on Windows --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 25ee734..8f9c3f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,6 +140,11 @@ select = "*_s390x" inherit.config-settings = "append" config-settings = {"cmake.define.TEST_OPTS" = "--gtest_filter=-DepsLogTest.MalformedDepsLog"} +# Doesn't account for platform in 1.13.0 https://github.com/scikit-build/ninja-python-distributions/pull/305#issuecomment-3146299285 +[[tool.cibuildwheel.overrides]] +select = "*-win*" +inherit.config-settings = "append" +config-settings = {"cmake.define.TEST_OPTS" = "--gtest_filter=-Jobserver.ParseNativeMakeFlagsValue"} [tool.pytest.ini_options] From fa042d3711d2e5466771cc2755419c1f9549a4c8 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 2 Aug 2025 11:03:35 +0200 Subject: [PATCH 8/8] update issue reference --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 63b533a..7957619 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -142,7 +142,7 @@ select = "*_s390x" inherit.config-settings = "append" config-settings = {"cmake.define.TEST_OPTS" = "--gtest_filter=-DepsLogTest.MalformedDepsLog"} -# Doesn't account for platform in 1.13.0 https://github.com/scikit-build/ninja-python-distributions/pull/305#issuecomment-3146299285 +# Doesn't account for platform in 1.13.0 https://github.com/Kitware/ninja/pull/3 [[tool.cibuildwheel.overrides]] select = "*-win*" inherit.config-settings = "append"