Skip to content

Commit ebc980f

Browse files
committed
Small adjustments in dist_info
1 parent 48b12b9 commit ebc980f

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
@@ -75,7 +75,7 @@ def finalize_options(self):
7575
project_dir = dist.src_root or os.curdir
7676
self.output_dir = Path(self.output_dir or project_dir)
7777

78-
egg_info = self.reinitialize_command("egg_info")
78+
egg_info = self.reinitialize_command("egg_info", reinit_subcommands=True)
7979
egg_info.egg_base = str(self.output_dir)
8080
self._sync_tag_details(egg_info)
8181
egg_info.finalize_options()
@@ -110,7 +110,9 @@ def run(self):
110110
# If in the future we don't want to use egg_info, we have to create the files:
111111
# METADATA, entry-points.txt
112112
shutil.copytree(egg_info_dir, dist_info_dir, ignore=lambda _, __: _IGNORE)
113-
shutil.copy2(egg_info_dir / "PKG-INFO", dist_info_dir / "METADATA")
113+
metadata_file = dist_info_dir / "METADATA"
114+
shutil.copy2(egg_info_dir / "PKG-INFO", metadata_file)
115+
log.debug(f"creating {str(os.path.abspath(metadata_file))!r}")
114116
if self.distribution.dependency_links:
115117
shutil.copy2(egg_info_dir / "dependency_links.txt", dist_info_dir)
116118

0 commit comments

Comments
 (0)