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