File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
backend/src/hatchling/metadata Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,12 @@ def core_raw_metadata(self) -> dict[str, Any]:
8686 with open (pkg_info , encoding = 'utf-8' ) as f :
8787 pkg_info_contents = f .read ()
8888
89- base_metadata = project_metadata_from_core_metadata (pkg_info_contents )
89+ # Give `PKG-INFO` first priority to set the values of dynamic metadata
90+ pkg_info_metadata = project_metadata_from_core_metadata (pkg_info_contents )
9091 defined_dynamic = core_raw_metadata .get ('dynamic' , [])
9192 for field in list (defined_dynamic ):
92- if field in PROJECT_CORE_METADATA_FIELDS and field in base_metadata :
93- core_raw_metadata [field ] = base_metadata [field ]
93+ if field in PROJECT_CORE_METADATA_FIELDS and field in pkg_info_metadata :
94+ core_raw_metadata [field ] = pkg_info_metadata [field ]
9495 defined_dynamic .remove (field )
9596
9697 return core_raw_metadata
You can’t perform that action at this time.
0 commit comments