Skip to content

Commit fb3aaee

Browse files
committed
Small adjustments in dist_info
1 parent 0c548bf commit fb3aaee

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setuptools/command/dist_info.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def finalize_options(self):
6767
project_dir = dist.src_root or os.curdir
6868
self.output_dir = Path(self.output_dir or project_dir)
6969

70-
egg_info = self.reinitialize_command("egg_info")
70+
egg_info = self.reinitialize_command("egg_info", reinit_subcommands=True)
7171
egg_info.egg_base = str(self.output_dir)
7272
self._sync_tag_details(egg_info)
7373
egg_info.finalize_options()
@@ -102,7 +102,9 @@ def run(self):
102102
# If in the future we don't want to use egg_info, we have to create the files:
103103
# METADATA, entry-points.txt
104104
shutil.copytree(egg_info_dir, dist_info_dir, ignore=lambda _, __: _IGNORE)
105-
shutil.copy2(egg_info_dir / "PKG-INFO", dist_info_dir / "METADATA")
105+
metadata_file = dist_info_dir / "METADATA"
106+
shutil.copy2(egg_info_dir / "PKG-INFO", metadata_file)
107+
log.debug(f"creating {str(os.path.abspath(metadata_file))!r}")
106108
if self.distribution.dependency_links:
107109
shutil.copy2(egg_info_dir / "dependency_links.txt", dist_info_dir)
108110

0 commit comments

Comments
 (0)