File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/pyproject_dependencies Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 1111from build .util import project_wheel_metadata
1212from packaging .requirements import Requirement
1313from packaging .utils import canonicalize_name
14+ from packaging .version import Version
1415from pyproject_metadata import RFC822Message , StandardMetadata
1516
1617from .compat import Protocol , tomllib
@@ -93,6 +94,10 @@ def pyproject_metadata(
9394 or "optional-dependencies" in metadata .dynamic
9495 ):
9596 return None
97+ if not metadata .version :
98+ # Fill-in metadata.version because it cannot be dynamic when converting
99+ # to rfc822 format. We don't use it as we are only interested in Requires-Dist.
100+ metadata .version = Version ("0" )
96101 return RFC822MessageAdapter (metadata .as_rfc822 ())
97102
98103
You can’t perform that action at this time.
0 commit comments