diff --git a/hooks/upgrade-charm b/hooks/upgrade-charm index 14948004..71a85b0a 100755 --- a/hooks/upgrade-charm +++ b/hooks/upgrade-charm @@ -1,4 +1,9 @@ #!/bin/bash -e -# Re-install dependencies to deal with py2->py3 switch for charm +# Wrapper to ensure that old python bytecode isn't hanging around +# after we upgrade the charm with newer libraries +find . -iname '*.pyc' -delete +find . -name '__pycache__' -prune -exec rm -rf "{}" \; + +# Re-install dependencies to deal with py2->py3 switch for charm ./hooks/install_deps