Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 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. |
Richard Levasseur | 31bc04b | 2023-03-13 13:29:30 -0700 | [diff] [blame] | 14 | """Core rules for building Python projects.""" |
Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 15 | |
Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 16 | load("@bazel_tools//tools/python:srcs_version.bzl", _find_requirements = "find_requirements") |
Richard Levasseur | 3b9c85e | 2023-03-23 12:59:58 -0700 | [diff] [blame] | 17 | load("//python:py_binary.bzl", _py_binary = "py_binary") |
Richard Levasseur | f676656 | 2023-11-21 12:55:33 -0800 | [diff] [blame] | 18 | load("//python:py_info.bzl", _PyInfo = "PyInfo") |
Richard Levasseur | 3b9c85e | 2023-03-23 12:59:58 -0700 | [diff] [blame] | 19 | load("//python:py_library.bzl", _py_library = "py_library") |
| 20 | load("//python:py_runtime.bzl", _py_runtime = "py_runtime") |
| 21 | load("//python:py_runtime_info.bzl", internal_PyRuntimeInfo = "PyRuntimeInfo") |
| 22 | load("//python:py_runtime_pair.bzl", _py_runtime_pair = "py_runtime_pair") |
| 23 | load("//python:py_test.bzl", _py_test = "py_test") |
Richard Levasseur | 756264a | 2023-03-09 14:38:05 -0800 | [diff] [blame] | 24 | load(":current_py_toolchain.bzl", _current_py_toolchain = "current_py_toolchain") |
| 25 | load(":py_import.bzl", _py_import = "py_import") |
Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 26 | |
Richard Levasseur | 5c37fa7 | 2023-07-18 14:59:33 -0700 | [diff] [blame] | 27 | # Patching placeholder: end of loads |
| 28 | |
Richard Levasseur | f676656 | 2023-11-21 12:55:33 -0800 | [diff] [blame] | 29 | PyInfo = _PyInfo |
Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 30 | |
| 31 | PyRuntimeInfo = internal_PyRuntimeInfo |
| 32 | |
Richard Levasseur | 756264a | 2023-03-09 14:38:05 -0800 | [diff] [blame] | 33 | current_py_toolchain = _current_py_toolchain |
jheaff1 | c49bab3 | 2022-06-21 23:46:03 +0100 | [diff] [blame] | 34 | |
Richard Levasseur | 756264a | 2023-03-09 14:38:05 -0800 | [diff] [blame] | 35 | py_import = _py_import |
Ryan Beasley | 6a9311c | 2021-04-21 20:53:37 -0400 | [diff] [blame] | 36 | |
Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 37 | # Re-exports of Starlark-defined symbols in @bazel_tools//tools/python. |
| 38 | |
| 39 | py_runtime_pair = _py_runtime_pair |
| 40 | |
| 41 | find_requirements = _find_requirements |
Matt Mackay | 702a5c5 | 2022-06-30 12:43:16 -0400 | [diff] [blame] | 42 | |
| 43 | py_library = _py_library |
| 44 | |
| 45 | py_binary = _py_binary |
| 46 | |
| 47 | py_test = _py_test |
| 48 | |
| 49 | py_runtime = _py_runtime |