mattmoor | 7f4cc92 | 2017-09-15 14:12:03 -0700 | [diff] [blame] | 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. |
Richard Levasseur | 327b4e3 | 2023-10-19 11:03:01 -0700 | [diff] [blame] | 14 | """Rules for pip integration. |
| 15 | |
| 16 | This contains a set of rules that are used to support inclusion of third-party |
| 17 | dependencies via fully locked `requirements.txt` files. Some of the exported |
| 18 | symbols should not be used and they are either undocumented here or marked as |
| 19 | for internal use only. |
| 20 | """ |
mattmoor | 7f4cc92 | 2017-09-15 14:12:03 -0700 | [diff] [blame] | 21 | |
Ignas Anikevicius | 9facc3e | 2023-11-10 07:01:46 +0900 | [diff] [blame] | 22 | load("//python/private:normalize_name.bzl", "normalize_name") |
Ignas Anikevicius | ea49937 | 2024-06-23 21:25:59 +0900 | [diff] [blame] | 23 | load("//python/private/pypi:multi_pip_parse.bzl", _multi_pip_parse = "multi_pip_parse") |
Ignas Anikevicius | 04a803c | 2024-06-23 09:20:18 +0900 | [diff] [blame] | 24 | load("//python/private/pypi:package_annotation.bzl", _package_annotation = "package_annotation") |
Ignas Anikevicius | ea49937 | 2024-06-23 21:25:59 +0900 | [diff] [blame] | 25 | load("//python/private/pypi:pip_compile.bzl", "pip_compile") |
Ignas Anikevicius | 04a803c | 2024-06-23 09:20:18 +0900 | [diff] [blame] | 26 | load("//python/private/pypi:pip_repository.bzl", "pip_repository") |
Ignas Anikevicius | ea49937 | 2024-06-23 21:25:59 +0900 | [diff] [blame] | 27 | load("//python/private/pypi:whl_library_alias.bzl", _whl_library_alias = "whl_library_alias") |
Laurenz | 730a2e3 | 2024-05-21 01:10:12 +0200 | [diff] [blame] | 28 | load("//python/private/whl_filegroup:whl_filegroup.bzl", _whl_filegroup = "whl_filegroup") |
UebelAndre | fede517 | 2021-09-27 17:31:11 -0700 | [diff] [blame] | 29 | |
Ignas Anikevicius | ea49937 | 2024-06-23 21:25:59 +0900 | [diff] [blame] | 30 | compile_pip_requirements = pip_compile |
UebelAndre | 7740b22 | 2022-01-18 14:55:55 -0800 | [diff] [blame] | 31 | package_annotation = _package_annotation |
Ignas Anikevicius | a6ebc3c | 2023-10-20 13:06:52 +0900 | [diff] [blame] | 32 | pip_parse = pip_repository |
Laurenz | 730a2e3 | 2024-05-21 01:10:12 +0200 | [diff] [blame] | 33 | whl_filegroup = _whl_filegroup |
Alex Eagle | c6e6381 | 2020-09-20 07:40:22 -0700 | [diff] [blame] | 34 | |
Ignas Anikevicius | 9facc3e | 2023-11-10 07:01:46 +0900 | [diff] [blame] | 35 | # Extra utilities visible to rules_python users. |
| 36 | pip_utils = struct( |
| 37 | normalize_name = normalize_name, |
| 38 | ) |
Ignas Anikevicius | ea49937 | 2024-06-23 21:25:59 +0900 | [diff] [blame] | 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 |
| 44 | multi_pip_parse = _multi_pip_parse |
| 45 | whl_library_alias = _whl_library_alias |