Skip to content

Commit 9ffcca7

Browse files
committed
Allow shared namespaces across modules
1 parent 04315c4 commit 9ffcca7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/fastpb/generator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ def main():
175175
if package not in parents:
176176
initPy = response.file.add()
177177
initPy.name = os.path.join('src', filePath, '__init__.py')
178-
initPy.content = ''
178+
initPy.content = """
179+
import pkg_resources
180+
pkg_resources.declare_namespace('%s')
181+
""" % package
179182
parents.add(package)
180183

181184
# Write the C file.

0 commit comments

Comments
 (0)