Skip to content

Commit 005bede

Browse files
committed
review feedback
1 parent 065e9d7 commit 005bede

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Unreleased changes template.
9494
* (toolchains) Run the check on the Python interpreter in isolated mode, to ensure it's not affected by userland environment variables, such as `PYTHONPATH`.
9595
* (toolchains) Ensure temporary `.pyc` and `.pyo` files are also excluded from the interpreters repository files.
9696
* (pypi) Run interpreter version call in isolated mode, to ensure it's not affected by userland environment variables, such as `PYTHONPATH`.
97+
* (packaging) An empty `requires_file` is treated as if it were omitted, resulting in a valid `METADATA` file.
9798

9899
{#v0-0-0-added}
99100
### Added

examples/wheel/wheel_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ def test_requires_file_and_extra_requires_files(self):
483483
if line.startswith(b"Requires-Dist:"):
484484
requires.append(line.decode("utf-8").strip())
485485

486-
print(requires)
487486
self.assertEqual(
488487
[
489488
"Requires-Dist: tomli>=2.0.0",
@@ -516,7 +515,6 @@ def test_empty_requires_file(self):
516515
if line.startswith("Requires-Dist:"):
517516
requires.append(line.strip())
518517

519-
print(requires)
520518
self.assertEqual([], requires)
521519

522520
def test_minimal_data_files(self):

python/packaging.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ def py_wheel(
171171
These are subject to make var expansion, as with the `args` attribute.
172172
Note that you can also pass additional args to the bazel run command as in the example above.
173173
**kwargs: other named parameters passed to the underlying [py_wheel rule](#py_wheel_rule)
174+
175+
:::{versionchanged} VERSION_NEXT_FEATURE
176+
From now on, an empty `requires_file` is treated as if it were omitted, resulting in a valid
177+
`METADATA` file.
178+
:::
174179
"""
175180
tags = kwargs.pop("tags", [])
176181
manual_tags = depset(tags + ["manual"]).to_list()

0 commit comments

Comments
 (0)