Skip to content

Commit

Permalink
fix(extensions): ensure __init__.py in extension dir is present (#20)
Browse files Browse the repository at this point in the history
`gen_proto.sh` was deleting this file (or not recreating it) and if it
isn't present,
then it isn't possible to grab the extension yaml files in Python using
`importlib.resources.files`.

This restores the missing __init__.py file and also adds a `touch` to
the
`gen_proto.sh` script to make sure it sticks around.
  • Loading branch information
gforsyth authored Aug 22, 2023
1 parent 71ebd09 commit 55c3d1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gen_proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ rm -rf "$extension_dir"
cp -fr "$submodule_dir"/extensions "$extension_dir"
find "$extension_dir" -type f -exec chmod u+rw {} +

# Ensure there's an __init__.py file in the extension directory
touch $extension_dir/__init__.py

# Remove the temporary work dir
rm -rf "$tmp_dir"
Empty file.

0 comments on commit 55c3d1b

Please sign in to comment.