)]}'
{
  "commit": "b8e32c454a1158cd78ce4ecaef809b99bef4e5da",
  "tree": "d97dc715bee7d2d68c17ccd89c1482668a84a713",
  "parents": [
    "5cbb5b16c08f1832c569608126b27046e32e18ad"
  ],
  "author": {
    "name": "Richard Levasseur",
    "email": "richardlev@gmail.com",
    "time": "Sat Sep 06 10:30:38 2025 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sat Sep 06 17:30:38 2025 +0000"
  },
  "message": "fix(system_python): write import paths to generated file instead of using PYTHONPATH (#3242)\n\nThis changes the system_python bootstrap to use a 2-stage process like\nthe script\nbootstrap does. Among other things, this means the import paths are\nwritten to\na generated file (`bazel_site_init.py`, same as boostrap\u003dscript) and\nsys.path\nsetup is performed by the Python code in stage 2.\n\nSince the PYTHONPATH environment variable isn\u0027t used, this fixes the\nproblem on\nWindows where the value is too long.\n\nThis also better unifies the system_python and script based bootstraps\nbecause the\nsame stage 2 code and bazel_site_init code is used.\n\nAlong the way, several other improvements:\n\n* Fixes path ordering for system_python. The order now matches venv\nordering\n  (stdlib, binary paths, runtime site packages).\n* Makes the venv-based solution work when the site module is disabled\n(`-S`).\n* Makes `interpreter_args` attribute and\n`RULES_PYTHON_ADDITIONAL_INTERPRETER_ARGS` env var work with\nsystem_python.\n* Makes `main_module` work with system_python.\n* Progress towards a supportable non-shell based bootstrap (a user\nrequested\nthis because their environment doesn\u0027t install any shells as a security\n  precaution).\n\nFixes https://github.com/bazel-contrib/rules_python/issues/2652",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "48dd26c8465b482a46531cfea274e00010898700",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "55d0d3fa2f8330fe5f33125ff329efb134c4e33e",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "9a8c1dfe99c02f913e31ee6860c1165b77a7add5",
      "old_mode": 33188,
      "old_path": "docs/environment-variables.md",
      "new_id": "4913e329e41e46daec414bf0d5b0baec1693e86f",
      "new_mode": 33188,
      "new_path": "docs/environment-variables.md"
    },
    {
      "type": "modify",
      "old_id": "5fafc8911d1eb77baa64cfcf59f67b501f90533c",
      "old_mode": 33188,
      "old_path": "python/private/py_executable.bzl",
      "new_id": "41938ebf787ee328032bf0af6a97a4a4b1972a8e",
      "new_mode": 33188,
      "new_path": "python/private/py_executable.bzl"
    },
    {
      "type": "modify",
      "old_id": "495a52cfe99437264bb1f4b6d5b6927a1ba9f171",
      "old_mode": 33188,
      "old_path": "python/private/python_bootstrap_template.txt",
      "new_id": "97177560362b048b4c6394e5ded23959f5d5ed99",
      "new_mode": 33188,
      "new_path": "python/private/python_bootstrap_template.txt"
    },
    {
      "type": "modify",
      "old_id": "689602d3aa7687562d2926f31ed15ed680b0d391",
      "old_mode": 33188,
      "old_path": "python/private/stage2_bootstrap_template.py",
      "new_id": "4d98b03846e8ff5578fdb3644b3c799789e8d561",
      "new_mode": 33188,
      "new_path": "python/private/stage2_bootstrap_template.py"
    },
    {
      "type": "modify",
      "old_id": "5ec5ba07fa40f7fa4462fd3b06f8a7c0d1ceb621",
      "old_mode": 33188,
      "old_path": "python/private/zip_main_template.py",
      "new_id": "d1489b46aaf5e6135ce681eb2d62d5211a532e51",
      "new_mode": 33188,
      "new_path": "python/private/zip_main_template.py"
    },
    {
      "type": "modify",
      "old_id": "49cbb1586cbfe5a0e34b8add07b03b28ec040d25",
      "old_mode": 33188,
      "old_path": "tests/base_rules/py_executable_base_tests.bzl",
      "new_id": "2b96451e3547368033a2eee7ba79e4e868259448",
      "new_mode": 33188,
      "new_path": "tests/base_rules/py_executable_base_tests.bzl"
    },
    {
      "type": "modify",
      "old_id": "97c62a6be561ce7b408aafa73103896949f89d1d",
      "old_mode": 33188,
      "old_path": "tests/bootstrap_impls/sys_path_order_test.py",
      "new_id": "9ae03bb1295f7fa55f631d10d8952639944bacea",
      "new_mode": 33188,
      "new_path": "tests/bootstrap_impls/sys_path_order_test.py"
    }
  ]
}
