xref: /aosp_15_r20/external/bazelbuild-rules_python/python/defs.bzl (revision 60517a1edbc8ecf509223e9af94a7adec7d736b8)
1# Copyright 2019 The Bazel Authors. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#    http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14"""Core rules for building Python projects."""
15
16load("@bazel_tools//tools/python:srcs_version.bzl", _find_requirements = "find_requirements")
17load("//python:py_binary.bzl", _py_binary = "py_binary")
18load("//python:py_info.bzl", _PyInfo = "PyInfo")
19load("//python:py_library.bzl", _py_library = "py_library")
20load("//python:py_runtime.bzl", _py_runtime = "py_runtime")
21load("//python:py_runtime_info.bzl", internal_PyRuntimeInfo = "PyRuntimeInfo")
22load("//python:py_runtime_pair.bzl", _py_runtime_pair = "py_runtime_pair")
23load("//python:py_test.bzl", _py_test = "py_test")
24load(":current_py_toolchain.bzl", _current_py_toolchain = "current_py_toolchain")
25load(":py_import.bzl", _py_import = "py_import")
26
27# Patching placeholder: end of loads
28
29PyInfo = _PyInfo
30
31PyRuntimeInfo = internal_PyRuntimeInfo
32
33current_py_toolchain = _current_py_toolchain
34
35py_import = _py_import
36
37# Re-exports of Starlark-defined symbols in @bazel_tools//tools/python.
38
39py_runtime_pair = _py_runtime_pair
40
41find_requirements = _find_requirements
42
43py_library = _py_library
44
45py_binary = _py_binary
46
47py_test = _py_test
48
49py_runtime = _py_runtime
50