Skip to content

Commit 68fce62

Browse files
authored
Merge pull request nficano#36 from CorbinSimpsonAcquia/zope-hack
A hack for Zope and a transparency buff
2 parents c2ee29e + 3e7b98c commit 68fce62

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

aws_lambda/aws_lambda.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ def build(src, requirements=False, local_package=None):
176176
requirements=requirements,
177177
local_package=local_package)
178178

179+
# Hack for Zope.
180+
if "zope" in os.listdir(path_to_temp):
181+
print("Zope packages detected; fixing Zope package paths to make them importable.")
182+
# Touch.
183+
with open(os.path.join(path_to_temp, "zope/__init__.py"), "wb"):
184+
pass
185+
179186
# Gracefully handle whether ".zip" was included in the filename or not.
180187
output_filename = ('{0}.zip'.format(output_filename)
181188
if not output_filename.endswith('.zip')
@@ -188,6 +195,7 @@ def build(src, requirements=False, local_package=None):
188195
continue
189196
if filename == 'config.yaml':
190197
continue
198+
print("Bundling: %r" % filename)
191199
files.append(os.path.join(src, filename))
192200

193201
# "cd" into `temp_path` directory.

0 commit comments

Comments
 (0)