blob: bd89f5b1f28457007a5fc6bd635595b317e78c49 [file] [log] [blame]
Jon Brandvein522222a2019-07-26 23:35:39 -04001# 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 Levasseur31bc04b2023-03-13 13:29:30 -070014"""Core rules for building Python projects."""
Jon Brandvein522222a2019-07-26 23:35:39 -040015
Jon Brandvein522222a2019-07-26 23:35:39 -040016load("@bazel_tools//tools/python:srcs_version.bzl", _find_requirements = "find_requirements")
Richard Levasseur3b9c85e2023-03-23 12:59:58 -070017load("//python:py_binary.bzl", _py_binary = "py_binary")
Richard Levasseurf6766562023-11-21 12:55:33 -080018load("//python:py_info.bzl", _PyInfo = "PyInfo")
Richard Levasseur3b9c85e2023-03-23 12:59:58 -070019load("//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")
Richard Levasseur756264a2023-03-09 14:38:05 -080024load(":current_py_toolchain.bzl", _current_py_toolchain = "current_py_toolchain")
25load(":py_import.bzl", _py_import = "py_import")
Jon Brandvein522222a2019-07-26 23:35:39 -040026
Richard Levasseur5c37fa72023-07-18 14:59:33 -070027# Patching placeholder: end of loads
28
Richard Levasseurf6766562023-11-21 12:55:33 -080029PyInfo = _PyInfo
Jon Brandvein522222a2019-07-26 23:35:39 -040030
31PyRuntimeInfo = internal_PyRuntimeInfo
32
Richard Levasseur756264a2023-03-09 14:38:05 -080033current_py_toolchain = _current_py_toolchain
jheaff1c49bab32022-06-21 23:46:03 +010034
Richard Levasseur756264a2023-03-09 14:38:05 -080035py_import = _py_import
Ryan Beasley6a9311c2021-04-21 20:53:37 -040036
Jon Brandvein522222a2019-07-26 23:35:39 -040037# Re-exports of Starlark-defined symbols in @bazel_tools//tools/python.
38
39py_runtime_pair = _py_runtime_pair
40
41find_requirements = _find_requirements
Matt Mackay702a5c52022-06-30 12:43:16 -040042
43py_library = _py_library
44
45py_binary = _py_binary
46
47py_test = _py_test
48
49py_runtime = _py_runtime