diff options
Diffstat (limited to 'setuptools/tests/files.py')
| -rw-r--r-- | setuptools/tests/files.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py index 4364241b..98de9fc3 100644 --- a/setuptools/tests/files.py +++ b/setuptools/tests/files.py @@ -1,6 +1,9 @@ import os +import pkg_resources.py31compat + + def build_files(file_defs, prefix=""): """ Build a set of files/directories, as described by the file_defs dictionary. @@ -24,8 +27,7 @@ def build_files(file_defs, prefix=""): for name, contents in file_defs.items(): full_name = os.path.join(prefix, name) if isinstance(contents, dict): - if not os.path.exists(full_name): - os.makedirs(full_name) + pkg_resources.py31compat.makedirs(full_name, exist_ok=True) build_files(contents, prefix=full_name) else: with open(full_name, 'w') as f: |
