summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/archive_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/archive_util.py')
-rw-r--r--Lib/distutils/archive_util.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/distutils/archive_util.py b/Lib/distutils/archive_util.py
index 78ae575..b002dc3 100644
--- a/Lib/distutils/archive_util.py
+++ b/Lib/distutils/archive_util.py
@@ -166,7 +166,15 @@ def make_zipfile(base_name, base_dir, verbose=0, dry_run=0):
zip = zipfile.ZipFile(zip_filename, "w",
compression=zipfile.ZIP_STORED)
+ if base_dir != os.curdir:
+ path = os.path.normpath(os.path.join(base_dir, ''))
+ zip.write(path, path)
+ log.info("adding '%s'", path)
for dirpath, dirnames, filenames in os.walk(base_dir):
+ for name in dirnames:
+ path = os.path.normpath(os.path.join(dirpath, name, ''))
+ zip.write(path, path)
+ log.info("adding '%s'", path)
for name in filenames:
path = os.path.normpath(os.path.join(dirpath, name))
if os.path.isfile(path):