summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-04-13 10:00:49 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-06-15 16:43:43 +0100
commit0e6870b5256d36ebda9fbea8553df2e699dc373c (patch)
tree6e4ee9ca2d29037b900e3ae3ae728db1cb0ebd45 /setuptools/command
parent1afb6c0613a5171e3e8caa6fc5b020e671930df7 (diff)
downloadpython-setuptools-git-0e6870b5256d36ebda9fbea8553df2e699dc373c.tar.gz
Avoid creating dist_info_dir before the command runs
Diffstat (limited to 'setuptools/command')
-rw-r--r--setuptools/command/dist_info.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/setuptools/command/dist_info.py b/setuptools/command/dist_info.py
index 79647bc7..aa7af48c 100644
--- a/setuptools/command/dist_info.py
+++ b/setuptools/command/dist_info.py
@@ -42,7 +42,6 @@ class dist_info(Command):
dist = self.distribution
project_dir = dist.src_root or os.curdir
self.output_dir = Path(self.output_dir or project_dir)
- self.output_dir.mkdir(parents=True, exist_ok=True)
egg_info = self.reinitialize_command('egg_info')
egg_info.egg_base = str(self.output_dir)
@@ -55,6 +54,7 @@ class dist_info(Command):
self.dist_info_dir = os.path.join(self.output_dir, f"{self.name}.dist-info")
def run(self):
+ self.output_dir.mkdir(parents=True, exist_ok=True)
self.egg_info.run()
egg_info_dir = self.egg_info.egg_info
log.info("creating '{}'".format(os.path.abspath(self.dist_info_dir)))