Skip to content

Commit 519574c

Browse files
aignasrickeylev
andauthored
feat(pypi): support env markers in requirements files (#2059)
Before this change the `all_requirements` and related constants will have packages that need to be installed only on specific platforms and will mean that users relying on those constants (e.g. `gazelle`) will need to do extra work to exclude platform-specific packages. The package managers that that support outputting such files now include `uv` and `pdm`. This might be also useful in cases where we attempt to handle non-requirements lock files. Note, that the best way to handle this would be to move all of the requirements parsing code to Python, but that may cause regressions as it is a much bigger change. This is only changing the code so that we are doing extra processing for the requirement lines that have env markers. The lines that have no markers will not see any change in the code execution paths and the python interpreter will not be downloaded. We also use the `*_ctx.watch` API where available to correctly re-evaluate the markers if the `packaging` Python sources for this change. Extra changes that are included in this PR: - Extend the `repo_utils` to have a method for `arch` getting from the `ctx`. - Change the `local_runtime_repo` to perform the validation not relying on the implementation detail of the `get_platforms_os_name`. - Add `$(UV)` make variable for the `uv:current_toolchain` so that we can generate the requirements for `sphinx` using `uv`. - Swap the requirement generation using `genrule` and `uv` for `sphinx` and co so that we can test the `requirement` marker code. Note, the `requirement` markers are not working well with the `requirement_cycles`. Fixes #1105. Fixes #1868. Work towards #260, #1975. Related #1663. --------- Co-authored-by: Richard Levasseur <[email protected]>
1 parent 905af69 commit 519574c

17 files changed

+515
-133
lines changed

.bazelrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it)
55
# To update these lines, execute
66
# `bazel run @rules_bazel_integration_test//tools:update_deleted_packages`
7-
build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered
8-
query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered
7+
build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/python/private,gazelle/pythonconfig,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered
8+
query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/python/private,gazelle/pythonconfig,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered
99

1010
test --test_output=errors
1111

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ A brief description of the categories of changes:
6262
`experimental_index_url` feature. Fixes
6363
[#2091](https://github.com/bazelbuild/rules_python/issues/2090).
6464
* (gazelle) Make `gazelle_python_manifest.update` manual to avoid unnecessary
65-
network behavior.
65+
network behavior.
6666
* (bzlmod): The conflicting toolchains during `python` extension will no longer
6767
cause warnings by default. In order to see the warnings for diagnostic purposes
6868
set the env var `RULES_PYTHON_REPO_DEBUG_VERBOSITY` to one of `INFO`, `DEBUG` or `TRACE`.
@@ -79,6 +79,11 @@ A brief description of the categories of changes:
7979
flag value is set to `true` for backwards compatible behaviour, but in the
8080
future the flag will be flipped be `false` by default.
8181
* (toolchains) New Python versions available: `3.12.4` using the [20240726] release.
82+
* (pypi) Support env markers in requirements files. Note, that this means that
83+
if your requirements files contain env markers, the Python interpreter will
84+
need to be run during bzlmod phase to evaluate them. This may incur
85+
downloading an interpreter (for hermetic-based builds) or cause non-hermetic
86+
behavior (if using a system Python).
8287

8388
[rules_python_pytest]: https://github.com/caseyduquettesc/rules_python_pytest
8489
[py_test_main]: https://docs.aspect.build/rulesets/aspect_rules_py/docs/rules/#py_pytest_main

MODULE.bazel

+1-13
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,9 @@ dev_pip = use_extension(
9191
dev_dependency = True,
9292
)
9393
dev_pip.parse(
94-
experimental_requirement_cycles = {
95-
"sphinx": [
96-
"sphinx",
97-
"sphinxcontrib-serializinghtml",
98-
"sphinxcontrib-qthelp",
99-
"sphinxcontrib-htmlhelp",
100-
"sphinxcontrib-devhelp",
101-
"sphinxcontrib-applehelp",
102-
],
103-
},
10494
hub_name = "dev_pip",
10595
python_version = "3.11",
106-
requirements_by_platform = {
107-
"//docs/sphinx:requirements.txt": "linux_*,osx_*",
108-
},
96+
requirements_lock = "//docs/sphinx:requirements.txt",
10997
)
11098
dev_pip.parse(
11199
hub_name = "pypiserver",

WORKSPACE

-10
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,6 @@ install_pypiserver()
121121

122122
pip_parse(
123123
name = "dev_pip",
124-
experimental_requirement_cycles = {
125-
"sphinx": [
126-
"sphinx",
127-
"sphinxcontrib-serializinghtml",
128-
"sphinxcontrib-qthelp",
129-
"sphinxcontrib-htmlhelp",
130-
"sphinxcontrib-devhelp",
131-
"sphinxcontrib-applehelp",
132-
],
133-
},
134124
python_interpreter_target = interpreter,
135125
requirements_lock = "//docs/sphinx:requirements.txt",
136126
)

docs/sphinx/BUILD.bazel

+65-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@bazel_skylib//rules:write_file.bzl", "write_file")
1516
load("@dev_pip//:requirements.bzl", "requirement")
16-
load("//python:pip.bzl", "compile_pip_requirements")
17+
load("//python:py_binary.bzl", "py_binary")
1718
load("//python/private:bzlmod_enabled.bzl", "BZLMOD_ENABLED") # buildifier: disable=bzl-visibility
1819
load("//python/private:util.bzl", "IS_BAZEL_7_OR_HIGHER") # buildifier: disable=bzl-visibility
1920
load("//sphinxdocs:readthedocs.bzl", "readthedocs_install")
@@ -125,10 +126,69 @@ sphinx_build_binary(
125126
],
126127
)
127128

129+
_REQUIREMENTS_TARGET_COMPATIBLE_WITH = select({
130+
"@platforms//os:linux": [],
131+
"@platforms//os:macos": [],
132+
"@platforms//os:windows": [],
133+
"//conditions:default": ["@platforms//:incompatible"],
134+
}) if BZLMOD_ENABLED else ["@platforms//:incompatible"]
135+
128136
# Run bazel run //docs/sphinx:requirements.update
129-
compile_pip_requirements(
137+
genrule(
130138
name = "requirements",
131-
src = "pyproject.toml",
132-
requirements_txt = "requirements.txt",
133-
target_compatible_with = _TARGET_COMPATIBLE_WITH,
139+
srcs = ["pyproject.toml"],
140+
outs = ["_requirements.txt"],
141+
cmd = "$(UV_BIN) pip compile " + " ".join([
142+
"--custom-compile-command='bazel run //docs/sphinx:requirements.update'",
143+
"--generate-hashes",
144+
"--universal",
145+
"--emit-index-url",
146+
"--no-strip-extras",
147+
"--no-build",
148+
"--python=$(PYTHON3)",
149+
"$<",
150+
"--output-file=$@",
151+
# Always try upgrading
152+
"--upgrade",
153+
]),
154+
tags = [
155+
"local",
156+
"manual",
157+
"no-cache",
158+
],
159+
target_compatible_with = _REQUIREMENTS_TARGET_COMPATIBLE_WITH,
160+
toolchains = [
161+
"//python/uv:current_toolchain",
162+
"//python:current_py_toolchain",
163+
],
164+
)
165+
166+
# Write a script that can be used for updating the in-tree version of the
167+
# requirements file
168+
write_file(
169+
name = "gen_update_requirements",
170+
out = "requirements.update.py",
171+
content = [
172+
"from os import environ",
173+
"from pathlib import Path",
174+
"from sys import stderr",
175+
"",
176+
'src = Path(environ["REQUIREMENTS_FILE"])',
177+
'dst = Path(environ["BUILD_WORKSPACE_DIRECTORY"]) / "docs" / "sphinx" / "requirements.txt"',
178+
'print(f"Writing requirements contents from {src} to {dst}", file=stderr)',
179+
"dst.write_text(src.read_text())",
180+
'print("Success!", file=stderr)',
181+
],
182+
target_compatible_with = _REQUIREMENTS_TARGET_COMPATIBLE_WITH,
183+
)
184+
185+
py_binary(
186+
name = "requirements.update",
187+
srcs = ["requirements.update.py"],
188+
data = [":requirements"],
189+
env = {
190+
"REQUIREMENTS_FILE": "$(location :requirements)",
191+
},
192+
tags = ["manual"],
193+
target_compatible_with = _REQUIREMENTS_TARGET_COMPATIBLE_WITH,
134194
)

docs/sphinx/requirements.txt

+28-26
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.11
3-
# by the following command:
4-
#
1+
# This file was autogenerated by uv via the following command:
52
# bazel run //docs/sphinx:requirements.update
6-
#
3+
--index-url https://pypi.org/simple
4+
75
absl-py==2.1.0 \
86
--hash=sha256:526a04eadab8b4ee719ce68f204172ead1027549089702d99b9059f129ff1308 \
97
--hash=sha256:7820790efbb316739cde8b4e19357243fc3608a152024288513dd968d7d959ff
10-
# via rules_python_docs (docs/sphinx/pyproject.toml)
8+
# via rules-python-docs (docs/sphinx/pyproject.toml)
119
alabaster==0.7.16 \
1210
--hash=sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65 \
1311
--hash=sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92
@@ -112,6 +110,10 @@ charset-normalizer==3.3.2 \
112110
--hash=sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519 \
113111
--hash=sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561
114112
# via requests
113+
colorama==0.4.6 ; sys_platform == 'win32' \
114+
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
115+
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
116+
# via sphinx
115117
docutils==0.20.1 \
116118
--hash=sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6 \
117119
--hash=sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b
@@ -213,7 +215,7 @@ mdurl==0.1.2 \
213215
myst-parser==3.0.1 \
214216
--hash=sha256:6457aaa33a5d474aca678b8ead9b3dc298e89c68e67012e73146ea6fd54babf1 \
215217
--hash=sha256:88f0cb406cb363b077d176b51c476f62d60604d68a8dcdf4832e080441301a87
216-
# via rules_python_docs (docs/sphinx/pyproject.toml)
218+
# via rules-python-docs (docs/sphinx/pyproject.toml)
217219
packaging==24.1 \
218220
--hash=sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 \
219221
--hash=sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124
@@ -280,7 +282,7 @@ pyyaml==6.0.1 \
280282
readthedocs-sphinx-ext==2.2.5 \
281283
--hash=sha256:ee5fd5b99db9f0c180b2396cbce528aa36671951b9526bb0272dbfce5517bd27 \
282284
--hash=sha256:f8c56184ea011c972dd45a90122568587cc85b0127bc9cf064d17c68bc809daa
283-
# via rules_python_docs (docs/sphinx/pyproject.toml)
285+
# via rules-python-docs (docs/sphinx/pyproject.toml)
284286
requests==2.32.3 \
285287
--hash=sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760 \
286288
--hash=sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6
@@ -291,29 +293,29 @@ snowballstemmer==2.2.0 \
291293
--hash=sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1 \
292294
--hash=sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a
293295
# via sphinx
294-
sphinx==7.3.7 \
295-
--hash=sha256:413f75440be4cacf328f580b4274ada4565fb2187d696a84970c23f77b64d8c3 \
296-
--hash=sha256:a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc
296+
sphinx==7.4.7 \
297+
--hash=sha256:242f92a7ea7e6c5b406fdc2615413890ba9f699114a9c09192d7dfead2ee9cfe \
298+
--hash=sha256:c2419e2135d11f1951cd994d6eb18a1835bd8fdd8429f9ca375dc1f3281bd239
297299
# via
300+
# rules-python-docs (docs/sphinx/pyproject.toml)
298301
# myst-parser
299-
# rules_python_docs (docs/sphinx/pyproject.toml)
300302
# sphinx-rtd-theme
301303
# sphinxcontrib-jquery
302304
sphinx-rtd-theme==2.0.0 \
303305
--hash=sha256:bd5d7b80622406762073a04ef8fadc5f9151261563d47027de09910ce03afe6b \
304306
--hash=sha256:ec93d0856dc280cf3aee9a4c9807c60e027c7f7b461b77aeffed682e68f0e586
305-
# via rules_python_docs (docs/sphinx/pyproject.toml)
306-
sphinxcontrib-applehelp==1.0.8 \
307-
--hash=sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619 \
308-
--hash=sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4
307+
# via rules-python-docs (docs/sphinx/pyproject.toml)
308+
sphinxcontrib-applehelp==2.0.0 \
309+
--hash=sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1 \
310+
--hash=sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5
309311
# via sphinx
310-
sphinxcontrib-devhelp==1.0.6 \
311-
--hash=sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f \
312-
--hash=sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3
312+
sphinxcontrib-devhelp==2.0.0 \
313+
--hash=sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad \
314+
--hash=sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2
313315
# via sphinx
314-
sphinxcontrib-htmlhelp==2.0.6 \
315-
--hash=sha256:1b9af5a2671a61410a868fce050cab7ca393c218e6205cbc7f590136f207395c \
316-
--hash=sha256:c6597da06185f0e3b4dc952777a04200611ef563882e0c244d27a15ee22afa73
316+
sphinxcontrib-htmlhelp==2.1.0 \
317+
--hash=sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8 \
318+
--hash=sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9
317319
# via sphinx
318320
sphinxcontrib-jquery==4.1 \
319321
--hash=sha256:1620739f04e36a2c779f1a131a2dfd49b2fd07351bf1968ced074365933abc7a \
@@ -327,14 +329,14 @@ sphinxcontrib-qthelp==2.0.0 \
327329
--hash=sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab \
328330
--hash=sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb
329331
# via sphinx
330-
sphinxcontrib-serializinghtml==1.1.10 \
331-
--hash=sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7 \
332-
--hash=sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f
332+
sphinxcontrib-serializinghtml==2.0.0 \
333+
--hash=sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331 \
334+
--hash=sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d
333335
# via sphinx
334336
typing-extensions==4.12.2 \
335337
--hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \
336338
--hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8
337-
# via rules_python_docs (docs/sphinx/pyproject.toml)
339+
# via rules-python-docs (docs/sphinx/pyproject.toml)
338340
urllib3==2.2.2 \
339341
--hash=sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472 \
340342
--hash=sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168

python/private/pypi/BUILD.bazel

+11
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ bzl_library(
6161
":attrs_bzl",
6262
":hub_repository_bzl",
6363
":parse_requirements_bzl",
64+
":evaluate_markers_bzl",
6465
":parse_whl_name_bzl",
6566
":pip_repository_attrs_bzl",
6667
":simpleapi_download_bzl",
@@ -89,6 +90,14 @@ bzl_library(
8990
],
9091
)
9192

93+
bzl_library(
94+
name = "evaluate_markers_bzl",
95+
srcs = ["evaluate_markers.bzl"],
96+
deps = [
97+
":pypi_repo_utils_bzl",
98+
],
99+
)
100+
92101
bzl_library(
93102
name = "flags_bzl",
94103
srcs = ["flags.bzl"],
@@ -215,6 +224,7 @@ bzl_library(
215224
srcs = ["pip_repository.bzl"],
216225
deps = [
217226
":attrs_bzl",
227+
":evaluate_markers_bzl",
218228
":parse_requirements_bzl",
219229
":pip_repository_attrs_bzl",
220230
":render_pkg_aliases_bzl",
@@ -235,6 +245,7 @@ bzl_library(
235245
srcs = ["pypi_repo_utils.bzl"],
236246
deps = [
237247
"//python/private:repo_utils_bzl",
248+
"@bazel_skylib//lib:types",
238249
],
239250
)
240251

0 commit comments

Comments
 (0)