We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0b0dc9c + 3edd8eb commit 82f9e17Copy full SHA for 82f9e17
scripts/build_lambda.py
@@ -13,6 +13,8 @@
13
import tempfile
14
import zipfile
15
16
+logger = logging.getLogger()
17
+
18
def build(src_dir, output_path, install_dependencies):
19
with tempfile.TemporaryDirectory() as build_dir:
20
copy_tree(src_dir, build_dir)
@@ -44,8 +46,13 @@ def make_archive(src_dir, output_path):
44
46
45
47
with zipfile.ZipFile(output_path, 'w') as archive:
48
for root, dirs, files in os.walk(src_dir):
49
50
for file in files:
- if file.endswith('.pyc'):
51
+ if file.endswith('.pyc') or '.dist-info' in root:
52
+ logger.info('Skipping {r}/{f}'.format(
53
+ r=root,
54
+ f=file
55
+ ))
56
break
57
metadata = zipfile.ZipInfo(
58
os.path.join(root, file).replace(src_dir, '').lstrip(os.sep)
0 commit comments