summaryrefslogtreecommitdiff
path: root/setuptools/tests/files.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-04-26 11:52:22 -0400
committerJason R. Coombs <jaraco@jaraco.com>2016-04-26 11:52:22 -0400
commitb35f7cdf9f0af923af0385c9878a23d3e6494d24 (patch)
tree84a5a44163fabd4b4afd68d183831ad1e20b80b5 /setuptools/tests/files.py
parent661440a9248792656455022b6fba51343e58cd50 (diff)
downloadpython-setuptools-git-b35f7cdf9f0af923af0385c9878a23d3e6494d24.tar.gz
Remove all but ez_setup.py from bootstrap branch.
Diffstat (limited to 'setuptools/tests/files.py')
-rw-r--r--setuptools/tests/files.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py
deleted file mode 100644
index 4364241b..00000000
--- a/setuptools/tests/files.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import os
-
-
-def build_files(file_defs, prefix=""):
- """
- Build a set of files/directories, as described by the file_defs dictionary.
-
- Each key/value pair in the dictionary is interpreted as a filename/contents
- pair. If the contents value is a dictionary, a directory is created, and the
- dictionary interpreted as the files within it, recursively.
-
- For example:
-
- {"README.txt": "A README file",
- "foo": {
- "__init__.py": "",
- "bar": {
- "__init__.py": "",
- },
- "baz.py": "# Some code",
- }
- }
- """
- 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)
- build_files(contents, prefix=full_name)
- else:
- with open(full_name, 'w') as f:
- f.write(contents)