Skip to content

Commit 8e060f2

Browse files
authored
Support python >= 3.11 for ninja build (#7600)
1 parent 8b2f3f5 commit 8e060f2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ jobs:
302302
if: steps.ninja-build-cache.outputs.cache-hit != 'true'
303303
uses: actions/setup-python@v5
304304
with:
305-
python-version: "3.10"
305+
python-version: "3.13"
306306

307307
- name: Setup MSVC for ninja build (Windows)
308308
if: steps.ninja-build-cache.outputs.cache-hit != 'true' && runner.os == 'Windows'

ninja/configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
from optparse import OptionParser
2525
import os
26-
import pipes
26+
import shlex
2727
import string
2828
import subprocess
2929
import sys
@@ -257,7 +257,7 @@ def _run_command(self, cmdline):
257257
env_keys = set(['CXX', 'AR', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS'])
258258
configure_env = dict((k, os.environ[k]) for k in os.environ if k in env_keys)
259259
if configure_env:
260-
config_str = ' '.join([k + '=' + pipes.quote(configure_env[k])
260+
config_str = ' '.join([k + '=' + shlex.quote(configure_env[k])
261261
for k in configure_env])
262262
n.variable('configure_env', config_str + '$ ')
263263
n.newline()

scripts/buildNinjaBinary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { execSync } from "node:child_process";
66
import { ninjaDir } from "#dev/paths";
77

88
const platform = process.platform;
9-
const buildCommand = "python configure.py --bootstrap --verbose";
9+
const buildCommand = "python3 configure.py --bootstrap --verbose";
1010

1111
if (platform === "win32") {
1212
// On Windows, the build uses the MSVC compiler which needs to be on the path.

0 commit comments

Comments
 (0)