blob: a1a67200b1c356ef2241445d57c5a45cafe4e5a4 [file] [log] [blame]
mattmoor7f4cc922017-09-15 14:12:03 -07001# 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.
Richard Levasseur327b4e32023-10-19 11:03:01 -070014"""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"""
mattmoor7f4cc922017-09-15 14:12:03 -070021
Ignas Anikevicius9facc3e2023-11-10 07:01:46 +090022load("//python/private:normalize_name.bzl", "normalize_name")
Ignas Anikeviciusea499372024-06-23 21:25:59 +090023load("//python/private/pypi:multi_pip_parse.bzl", _multi_pip_parse = "multi_pip_parse")
Ignas Anikevicius04a803c2024-06-23 09:20:18 +090024load("//python/private/pypi:package_annotation.bzl", _package_annotation = "package_annotation")
Ignas Anikeviciusea499372024-06-23 21:25:59 +090025load("//python/private/pypi:pip_compile.bzl", "pip_compile")
Ignas Anikevicius04a803c2024-06-23 09:20:18 +090026load("//python/private/pypi:pip_repository.bzl", "pip_repository")
Ignas Anikeviciusea499372024-06-23 21:25:59 +090027load("//python/private/pypi:whl_library_alias.bzl", _whl_library_alias = "whl_library_alias")
Laurenz730a2e32024-05-21 01:10:12 +020028load("//python/private/whl_filegroup:whl_filegroup.bzl", _whl_filegroup = "whl_filegroup")
UebelAndrefede5172021-09-27 17:31:11 -070029
Ignas Anikeviciusea499372024-06-23 21:25:59 +090030compile_pip_requirements = pip_compile
UebelAndre7740b222022-01-18 14:55:55 -080031package_annotation = _package_annotation
Ignas Anikeviciusa6ebc3c2023-10-20 13:06:52 +090032pip_parse = pip_repository
Laurenz730a2e32024-05-21 01:10:12 +020033whl_filegroup = _whl_filegroup
Alex Eaglec6e63812020-09-20 07:40:22 -070034
Ignas Anikevicius9facc3e2023-11-10 07:01:46 +090035# Extra utilities visible to rules_python users.
36pip_utils = struct(
37 normalize_name = normalize_name,
38)
Ignas Anikeviciusea499372024-06-23 21:25:59 +090039
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