aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/files.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-09-03 19:57:54 -0400
committerJason R. Coombs <jaraco@jaraco.com>2017-09-03 20:01:45 -0400
commitdcb24ad15465c266a3f258471766fbbe8fc8a42e (patch)
tree13123440610d78e398476a8ce1e8cc3d9f9ec72e /setuptools/tests/files.py
parentf14930e66601b462699c44384c482cd966f53b8f (diff)
parent1b192005562d5cf0de30c02154c58fd1dca577c8 (diff)
downloadexternal_python_setuptools-dcb24ad15465c266a3f258471766fbbe8fc8a42e.tar.gz
external_python_setuptools-dcb24ad15465c266a3f258471766fbbe8fc8a42e.tar.bz2
external_python_setuptools-dcb24ad15465c266a3f258471766fbbe8fc8a42e.zip
Merge branch 'master' into drop-py26
Diffstat (limited to 'setuptools/tests/files.py')
-rw-r--r--setuptools/tests/files.py6
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: