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", internal_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 29# Exports of native-defined providers. 30 31PyInfo = internal_PyInfo 32 33PyRuntimeInfo = internal_PyRuntimeInfo 34 35current_py_toolchain = _current_py_toolchain 36 37py_import = _py_import 38 39# Re-exports of Starlark-defined symbols in @bazel_tools//tools/python. 40 41py_runtime_pair = _py_runtime_pair 42 43find_requirements = _find_requirements 44 45py_library = _py_library 46 47py_binary = _py_binary 48 49py_test = _py_test 50 51py_runtime = _py_runtime 52