1 From 418d38868d63c0009460e1a3ca004987fe26346b Mon Sep 17 00:00:00 2001
2 From: Paul Meyer <49727155+katexochen@users.noreply.github.com>
3 Date: Mon, 22 Apr 2024 11:52:59 +0200
4 Subject: [PATCH 1/4] nixpkgs: use system Python
6 Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
8 bazel/python_dependencies.bzl | 11 ++++-------
9 bazel/repositories_extra.bzl | 17 +----------------
10 2 files changed, 5 insertions(+), 23 deletions(-)
12 diff --git a/bazel/python_dependencies.bzl b/bazel/python_dependencies.bzl
13 index b747fd0b9a..b82f374720 100644
14 --- a/bazel/python_dependencies.bzl
15 +++ b/bazel/python_dependencies.bzl
17 -load("@envoy_toolshed//:packages.bzl", "load_packages")
18 -load("@python3_11//:defs.bzl", "interpreter")
19 load("@rules_python//python:pip.bzl", "pip_parse")
21 def envoy_python_dependencies():
22 - # TODO(phlax): rename base_pip3 -> pip3 and remove this
26 + requirements_lock = "@envoy_toolshed//:requirements.txt",
30 - python_interpreter_target = interpreter,
31 requirements_lock = "@envoy//tools/base:requirements.txt",
32 extra_pip_args = ["--require-hashes"],
37 - python_interpreter_target = interpreter,
38 requirements_lock = "@envoy//tools/dev:requirements.txt",
39 extra_pip_args = ["--require-hashes"],
43 name = "fuzzing_pip3",
44 - python_interpreter_target = interpreter,
45 requirements_lock = "@rules_fuzzing//fuzzing:requirements.txt",
46 extra_pip_args = ["--require-hashes"],
48 diff --git a/bazel/repositories_extra.bzl b/bazel/repositories_extra.bzl
49 index a5bc2d5277..001de36a16 100644
50 --- a/bazel/repositories_extra.bzl
51 +++ b/bazel/repositories_extra.bzl
52 @@ -2,19 +2,11 @@ load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies")
53 load("@com_github_rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_toolchains")
54 load("@emsdk//:deps.bzl", emsdk_deps = "deps")
55 load("@proxy_wasm_cpp_host//bazel/cargo/wasmtime:crates.bzl", "wasmtime_fetch_remote_crates")
56 -load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
57 +load("@rules_python//python:repositories.bzl", "py_repositories")
58 load("//bazel/external/cargo:crates.bzl", "raze_fetch_remote_crates")
60 -def _python_minor_version(python_version):
61 - return "_".join(python_version.split(".")[:-1])
63 -# Python version for `rules_python`
64 -PYTHON_VERSION = "3.11.3"
65 -PYTHON_MINOR_VERSION = _python_minor_version(PYTHON_VERSION)
67 # Envoy deps that rely on a first stage of dependency loading in envoy_dependencies().
68 def envoy_dependencies_extra(
69 - python_version = PYTHON_VERSION,
70 ignore_root_user_error = False):
72 raze_fetch_remote_crates()
73 @@ -22,11 +14,4 @@ def envoy_dependencies_extra(
74 rules_proto_grpc_toolchains()
77 - # Registers underscored Python minor version - eg `python3_10`
78 - python_register_toolchains(
79 - name = "python%s" % _python_minor_version(python_version),
80 - python_version = python_version,
81 - ignore_root_user_error = ignore_root_user_error,
84 aspect_bazel_lib_dependencies()