From 1b6ad143c0f5f96c42f603bb93a72f788b88b622 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Fri, 12 May 2023 08:12:04 +0100 Subject: [PATCH 1/2] nixpkgs: use system Python --- bazel/python_dependencies.bzl | 4 ---- bazel/repositories_extra.bzl | 13 +------------ 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/bazel/python_dependencies.bzl b/bazel/python_dependencies.bzl index 37c0183664..0bee5feb7e 100644 --- a/bazel/python_dependencies.bzl +++ b/bazel/python_dependencies.bzl @@ -1,24 +1,20 @@ load("@rules_python//python:pip.bzl", "pip_parse") -load("@python3_10//:defs.bzl", "interpreter") def envoy_python_dependencies(): pip_parse( name = "base_pip3", - python_interpreter_target = interpreter, requirements_lock = "@envoy//tools/base:requirements.txt", extra_pip_args = ["--require-hashes"], ) pip_parse( name = "dev_pip3", - python_interpreter_target = interpreter, requirements_lock = "@envoy//tools/dev:requirements.txt", extra_pip_args = ["--require-hashes"], ) pip_parse( name = "fuzzing_pip3", - python_interpreter_target = interpreter, requirements_lock = "@rules_fuzzing//fuzzing:requirements.txt", extra_pip_args = ["--require-hashes"], ) diff --git a/bazel/repositories_extra.bzl b/bazel/repositories_extra.bzl index 9d1b31c5d6..ac5605eb30 100644 --- a/bazel/repositories_extra.bzl +++ b/bazel/repositories_extra.bzl @@ -1,23 +1,12 @@ load("@emsdk//:deps.bzl", emsdk_deps = "deps") -load("@rules_python//python:repositories.bzl", "python_register_toolchains") load("@proxy_wasm_cpp_host//bazel/cargo/wasmtime:crates.bzl", "wasmtime_fetch_remote_crates") load("//bazel/external/cargo:crates.bzl", "raze_fetch_remote_crates") load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") -# Python version for `rules_python` -PYTHON_VERSION = "3.10.2" - # Envoy deps that rely on a first stage of dependency loading in envoy_dependencies(). -def envoy_dependencies_extra(python_version = PYTHON_VERSION): +def envoy_dependencies_extra(): emsdk_deps() raze_fetch_remote_crates() wasmtime_fetch_remote_crates() - # Registers underscored Python minor version - eg `python3_10` - python_register_toolchains( - name = "python%s" % ("_".join(python_version.split(".")[:-1])), - python_version = python_version, - ignore_root_user_error = True, - ) - aspect_bazel_lib_dependencies() -- 2.40.0