• Home
  • Raw
  • Download

Lines Matching +full:python +full:- +full:format

1 # Copyright (c) 2009-2021, Google LLC
4 # Use of this source code is governed by a BSD-style
6 # https://developers.google.com/open-source/licenses/bsd
8 """Repository rule for using Python 3.x headers from the system."""
10 # Mock out rules_python's pip.bzl for cases where no system python is found.
25 '''.format(repository_ctx.attr.name))
37 # Alias rules_python's pip.bzl for cases where a system python is found.
39 load("@rules_python//python:pip.bzl", _pip_parse = "pip_parse")
63 # Alias rules_fuzzing's requirements.bzl for cases where a system python is found.
74 load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
78 hdrs = glob(["python/**/*.h"], allow_empty = True),
79 includes = ["python"],
143 toolchain_type = "@rules_python//python:toolchain_type",
159 result = repository_ctx.execute(["python3", "-c", py_program])
164 result = repository_ctx.execute(["python3", "-c", py_program % ("INCLUDEPY")])
170 ctx.symlink(path, "python")
178 print("WARNING: python is not supported on Windows")
181 build_file = _build_file.format(
186 ctx.file("interpreter", "#!/bin/sh\nexec {} \"$@\"".format(python3))
188 …ctx.file("version.bzl", "SYSTEM_PYTHON_VERSION = '{}{}'".format(python_version[0], python_version[…
189 ctx.file("register.bzl", _register.format(ctx.attr.name))
191 ctx.file("pip.bzl", _alias_pip.format(
197 # Dependencies are unlikely to be satisfiable for unsupported versions of python.
203 # actually need python should use `target_compatible_with` and the generated
207 _build_file.format(
226 print("WARNING: no system python available, builds against system python will fail")
229 # The system_python() repository rule exposes information from the version of python installed in t…
237 # This repository exposes some repository rules for configuring python in Bazel. The python toolch…
246 # requirements = "@com_google_protobuf//python:requirements.txt",
248 # An optional argument `requirements_overrides` takes a dictionary mapping python versions to alter…
252 # For example, `@system_python_repo//:exists` will be true if a system python version has been foun…
253 # The `none` setting will be true only if no python version was found, and `supported`/`unsupported`
263 # The headers should correspond to the version of python obtained by running