Skip to content

Commit e0ced67

Browse files
The Zope hack.
This is necessary to make Zope packages like zope.interface usable, which in turn enables fun things like Twisted.
1 parent c2ee29e commit e0ced67

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

aws_lambda/aws_lambda.py

Lines changed: 7 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')

0 commit comments

Comments
 (0)