diff options
Diffstat (limited to 'setuptools/_path.py')
-rw-r--r-- | setuptools/_path.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/setuptools/_path.py b/setuptools/_path.py new file mode 100644 index 00000000..ede9cb00 --- /dev/null +++ b/setuptools/_path.py @@ -0,0 +1,7 @@ +import os + + +def ensure_directory(path): + """Ensure that the parent directory of `path` exists""" + dirname = os.path.dirname(path) + os.makedirs(dirname, exist_ok=True) |