diff options
-rw-r--r-- | setuptools/command/egg_info.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 25888ed8..95c81845 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -295,7 +295,11 @@ class egg_info(InfoCommon, Command): def run(self): self.mkpath(self.egg_info) - os.utime(self.egg_info, None) + try: + os.utime(self.egg_info, None) + except OSError as e: + msg = f"Cannot update time stamp of directory '{self.egg_info}'" + raise distutils.errors.DistutilsFileError(msg) from e for ep in metadata.entry_points(group='egg_info.writers'): writer = ep.load() writer(self, ep.name, os.path.join(self.egg_info, ep.name)) |