1# Copyright 2017 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"""Rules for pip integration. 15 16This contains a set of rules that are used to support inclusion of third-party 17dependencies via fully locked `requirements.txt` files. Some of the exported 18symbols should not be used and they are either undocumented here or marked as 19for internal use only. 20""" 21 22load("//python/private:normalize_name.bzl", "normalize_name") 23load("//python/private/pypi:multi_pip_parse.bzl", _multi_pip_parse = "multi_pip_parse") 24load("//python/private/pypi:package_annotation.bzl", _package_annotation = "package_annotation") 25load("//python/private/pypi:pip_compile.bzl", "pip_compile") 26load("//python/private/pypi:pip_repository.bzl", "pip_repository") 27load("//python/private/pypi:whl_library_alias.bzl", _whl_library_alias = "whl_library_alias") 28load("//python/private/whl_filegroup:whl_filegroup.bzl", _whl_filegroup = "whl_filegroup") 29 30compile_pip_requirements = pip_compile 31package_annotation = _package_annotation 32pip_parse = pip_repository 33whl_filegroup = _whl_filegroup 34 35# Extra utilities visible to rules_python users. 36pip_utils = struct( 37 normalize_name = normalize_name, 38) 39 40# The following are only exported here because they are used from 41# multi_toolchain_aliases repository_rule, not intended for public use. 42# 43# See ./private/toolchains_repo.bzl 44multi_pip_parse = _multi_pip_parse 45whl_library_alias = _whl_library_alias 46