From 599f573a4abb0b20411aa22298dd3ec0c5a1eaf1 Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 3 Apr 2024 14:25:03 +0000 Subject: [PATCH] Python: Preserve comments and docstrings in extractor --- python/extractor/make_zips.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/python/extractor/make_zips.py b/python/extractor/make_zips.py index b91b1bf458d..faf595acc37 100755 --- a/python/extractor/make_zips.py +++ b/python/extractor/make_zips.py @@ -8,7 +8,6 @@ import optparse import compileall from python_tracer import getzipfilename -from unparse import strip_comments_and_docstrings # TO DO -- Add options to set destination directory and source directory @@ -84,9 +83,7 @@ def write_source(zipped, root, name, extensions=[".py"]): if ext not in extensions: continue path = os.path.join(dirpath, name) - temp = strip_comments_and_docstrings(path) - zipped.write(temp, os.path.relpath(path, root)) - os.remove(temp) + zipped.write(path, os.path.relpath(path, root)) def main(): parser = optparse.OptionParser(usage = "usage: %prog [install-dir]")